Skip to content

Commit

Permalink
prefdiag: Remove compile conditions for adding member function (#429)
Browse files Browse the repository at this point in the history
GTK3で追加されたメンバ関数のコンパイル条件を整理します。
  • Loading branch information
ma8ma committed Aug 1, 2020
1 parent b2b8faa commit 153e3d1
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 10 deletions.
2 changes: 0 additions & 2 deletions src/config/aboutconfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,7 @@ void AboutConfig::pack_widgets()
get_vbox()->pack_start( m_scrollwin );

set_title( "about:config 高度な設定" );
#if GTKMM_CHECK_VERSION(3,0,0)
set_default_size_ratio( 0.666 );
#endif
show_all_children();

append_rows();
Expand Down
2 changes: 0 additions & 2 deletions src/control/mousekeypref.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -534,9 +534,7 @@ MouseKeyPref::MouseKeyPref( Gtk::Window* parent, const std::string& url, const s
get_vbox()->pack_start( m_scrollwin );
get_vbox()->pack_start( m_hbox, Gtk::PACK_SHRINK );

#if GTKMM_CHECK_VERSION(3,0,0)
set_default_size_ratio( 0.666 );
#endif
show_all_children();
set_title( target + "設定" );
}
Expand Down
2 changes: 0 additions & 2 deletions src/fontcolorpref.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,7 @@ FontColorPref::FontColorPref( Gtk::Window* parent, const std::string& url )
m_fontbutton.set_tooltip_text( m_tooltips_font[ 0 ] );

set_title( "フォントと色の詳細設定" );
#if GTKMM_CHECK_VERSION(3,0,0)
set_default_size_ratio( 0.5 );
#endif
show_all_children();
}

Expand Down
2 changes: 0 additions & 2 deletions src/skeleton/prefdiag.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,13 @@ int PrefDiag::run(){


// ダイアログのサイズをデフォルトのスクリーンに対する比率で設定する
#if GTKMM_CHECK_VERSION(3,0,0)
void PrefDiag::set_default_size_ratio( double ratio )
{
const auto screen = Gdk::Screen::get_default();
const int width = static_cast< int >( screen->get_width() * ratio );
const int height = static_cast< int >( screen->get_height() * ratio );
Gtk::Dialog::set_default_size( width, height );
}
#endif


// タイマーのslot関数
Expand Down
2 changes: 0 additions & 2 deletions src/skeleton/prefdiag.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ namespace SKELETON
virtual void slot_cancel_clicked(){}
virtual void slot_apply_clicked(){}

#if GTKMM_CHECK_VERSION(3,0,0)
void set_default_size_ratio( double ratio );
#endif

private:

Expand Down

0 comments on commit 153e3d1

Please sign in to comment.