From 53ead5269c16cf7decee30713b0cd0d1456e7138 Mon Sep 17 00:00:00 2001 From: Nathan Lee <2431820-nathanal@users.noreply.gitlab.com> Date: Sat, 30 Mar 2019 12:39:59 +1100 Subject: Tidy various dialog UIs --- src/ui/widget/font-selector.cpp | 2 ++ src/ui/widget/font-variants.cpp | 63 +++++++++++++++++++++++++++++++++++------ 2 files changed, 56 insertions(+), 9 deletions(-) (limited to 'src/ui/widget') diff --git a/src/ui/widget/font-selector.cpp b/src/ui/widget/font-selector.cpp index 4b9cdb87e..0b096995c 100644 --- a/src/ui/widget/font-selector.cpp +++ b/src/ui/widget/font-selector.cpp @@ -89,6 +89,8 @@ FontSelector::FontSelector (bool with_size, bool with_variations) // Grid set_name ("FontSelectorGrid"); + set_row_spacing(4); + set_column_spacing(4); attach (family_frame, 0, 0, 1, 2); attach (style_frame, 1, 0, 2, 1); if (with_size) { // Glyph panel does not use size. diff --git a/src/ui/widget/font-variants.cpp b/src/ui/widget/font-variants.cpp index a8ff3893f..2fb5b615b 100644 --- a/src/ui/widget/font-variants.cpp +++ b/src/ui/widget/font-variants.cpp @@ -220,6 +220,14 @@ namespace Widget { _ligatures_grid.attach( _ligatures_label_discretionary, 1, 1, 1, 1); _ligatures_grid.attach( _ligatures_label_historical, 1, 2, 1, 1); _ligatures_grid.attach( _ligatures_label_contextual, 1, 3, 1, 1); + +#if GTK_CHECK_VERSION(3,12,0) + _ligatures_grid.set_margin_start(15); + _ligatures_grid.set_margin_end(15); +#else + _ligatures_grid.set_margin_left(15); + _ligatures_grid.set_margin_right(15); +#endif _ligatures_frame.add( _ligatures_grid ); pack_start( _ligatures_frame, Gtk::PACK_SHRINK ); @@ -246,6 +254,14 @@ namespace Widget { _position_grid.attach( _position_normal, 0, 0, 1, 1); _position_grid.attach( _position_sub, 1, 0, 1, 1); _position_grid.attach( _position_super, 2, 0, 1, 1); + +#if GTK_CHECK_VERSION(3,12,0) + _position_grid.set_margin_start(15); + _position_grid.set_margin_end(15); +#else + _position_grid.set_margin_left(15); + _position_grid.set_margin_right(15); +#endif _position_frame.add( _position_grid ); pack_start( _position_frame, Gtk::PACK_SHRINK ); @@ -288,6 +304,14 @@ namespace Widget { _caps_grid.attach( _caps_all_small, 1, 1, 1, 1); _caps_grid.attach( _caps_petite, 2, 1, 1, 1); _caps_grid.attach( _caps_all_petite, 3, 1, 1, 1); + +#if GTK_CHECK_VERSION(3,12,0) + _caps_grid.set_margin_start(15); + _caps_grid.set_margin_end(15); +#else + _caps_grid.set_margin_left(15); + _caps_grid.set_margin_right(15); +#endif _caps_frame.add( _caps_grid ); pack_start( _caps_frame, Gtk::PACK_SHRINK ); @@ -359,6 +383,13 @@ namespace Widget { _numeric_grid.attach (_numeric_slashed_zero, 0, 4, 1, 1); _numeric_grid.attach (_numeric_slashed_zero_label, 1, 4, 1, 1); +#if GTK_CHECK_VERSION(3,12,0) + _numeric_grid.set_margin_start(15); + _numeric_grid.set_margin_end(15); +#else + _numeric_grid.set_margin_left(15); + _numeric_grid.set_margin_right(15); +#endif _numeric_frame.add( _numeric_grid ); pack_start( _numeric_frame, Gtk::PACK_SHRINK ); @@ -394,15 +425,22 @@ namespace Widget { _asian_grid.attach (_asian_default_variant, 0, 0, 1, 1); _asian_grid.attach (_asian_jis78, 1, 0, 1, 1); _asian_grid.attach (_asian_jis83, 2, 0, 1, 1); - _asian_grid.attach (_asian_jis90, 3, 0, 1, 1); - _asian_grid.attach (_asian_jis04, 4, 0, 1, 1); - _asian_grid.attach (_asian_simplified, 5, 0, 1, 1); - _asian_grid.attach (_asian_traditional, 6, 0, 1, 1); - _asian_grid.attach (_asian_default_width, 0, 1, 1, 1); - _asian_grid.attach (_asian_full_width, 1, 1, 1, 1); - _asian_grid.attach (_asian_proportional_width, 2, 1, 1, 1); - _asian_grid.attach (_asian_ruby, 0, 2, 1, 1); - + _asian_grid.attach (_asian_jis90, 1, 1, 1, 1); + _asian_grid.attach (_asian_jis04, 2, 1, 1, 1); + _asian_grid.attach (_asian_simplified, 1, 2, 1, 1); + _asian_grid.attach (_asian_traditional, 2, 2, 1, 1); + _asian_grid.attach (_asian_default_width, 0, 3, 1, 1); + _asian_grid.attach (_asian_full_width, 1, 3, 1, 1); + _asian_grid.attach (_asian_proportional_width, 2, 3, 1, 1); + _asian_grid.attach (_asian_ruby, 0, 4, 1, 1); + +#if GTK_CHECK_VERSION(3,12,0) + _asian_grid.set_margin_start(15); + _asian_grid.set_margin_end(15); +#else + _asian_grid.set_margin_left(15); + _asian_grid.set_margin_right(15); +#endif _asian_frame.add( _asian_grid ); pack_start( _asian_frame, Gtk::PACK_SHRINK ); @@ -438,6 +476,13 @@ namespace Widget { _feature_vbox.pack_start( _feature_substitutions ); _feature_vbox.pack_start( _feature_list ); +#if GTK_CHECK_VERSION(3,12,0) + _feature_vbox.set_margin_start(15); + _feature_vbox.set_margin_end(15); +#else + _feature_vbox.set_margin_left(15); + _feature_vbox.set_margin_right(15); +#endif _feature_frame.add( _feature_vbox ); pack_start( _feature_frame, Gtk::PACK_SHRINK ); -- cgit v1.2.3