[gtk+/wip/matthiasc/font-variations: 2/13] font chooser: Add a tweak page



commit 32e7201e47078292028be09871a790cd2ad51761
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Dec 28 10:05:37 2017 -0500

    font chooser: Add a tweak page
    
    Add a button the dialog's header bar that lets us
    switch to a second page where we can customize
    the selected font.
    
    We show another preview entry and size slider here,
    and th font features are now added to this page.

 gtk/gtkfontchooserdialog.c        |   55 +++++-
 gtk/gtkfontchooserwidget.c        |   23 ++-
 gtk/gtkfontchooserwidgetprivate.h |    3 +
 gtk/ui/gtkfontchooserdialog.ui    |    4 +-
 gtk/ui/gtkfontchooserwidget.ui    |  388 +++++++++++++++++++++----------------
 5 files changed, 297 insertions(+), 176 deletions(-)
---
diff --git a/gtk/gtkfontchooserdialog.c b/gtk/gtkfontchooserdialog.c
index db1a383..c0637f5 100644
--- a/gtk/gtkfontchooserdialog.c
+++ b/gtk/gtkfontchooserdialog.c
@@ -36,6 +36,8 @@
 #include "gtkwidget.h"
 #include "gtksettings.h"
 #include "gtkdialogprivate.h"
+#include "gtktogglebutton.h"
+#include "gtkheaderbar.h"
 
 struct _GtkFontChooserDialogPrivate
 {
@@ -43,6 +45,7 @@ struct _GtkFontChooserDialogPrivate
 
   GtkWidget *select_button;
   GtkWidget *cancel_button;
+  GtkWidget *tweak_button;
 };
 
 /**
@@ -137,6 +140,51 @@ gtk_font_chooser_dialog_key_press_event (GtkWidget   *dialog,
 }
 
 static void
+tweak_font (GtkFontChooserDialog *dialog)
+{
+  gtk_font_chooser_widget_tweak_font (dialog->priv->fontchooser,
+                                      gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON 
(dialog->priv->tweak_button)));
+}
+
+static void
+setup_tweak_button (GtkFontChooserDialog *dialog)
+{
+  gboolean use_header;
+
+  if (dialog->priv->tweak_button)
+    return;
+
+  g_object_get (dialog, "use-header-bar", &use_header, NULL);
+  if (use_header)
+    {
+      GtkWidget *button;
+      GtkWidget *header;
+
+      button = gtk_toggle_button_new ();
+      gtk_widget_set_focus_on_click (button, FALSE);
+      gtk_widget_set_valign (button, GTK_ALIGN_CENTER);
+      gtk_button_set_icon_name (button, "emblem-system-symbolic");
+
+      header = gtk_dialog_get_header_bar (GTK_DIALOG (dialog));
+      gtk_header_bar_pack_end (GTK_HEADER_BAR (header), button);
+
+      g_signal_connect_swapped (button, "notify::active", G_CALLBACK (tweak_font), dialog);
+
+      dialog->priv->tweak_button = button;
+    }
+}
+
+static void
+gtk_font_chooser_dialog_map (GtkWidget *widget)
+{
+  GtkFontChooserDialog *dialog = GTK_FONT_CHOOSER_DIALOG (widget);
+
+  setup_tweak_button (dialog);
+
+  GTK_WIDGET_CLASS (gtk_font_chooser_dialog_parent_class)->map (widget);
+}
+
+static void
 gtk_font_chooser_dialog_class_init (GtkFontChooserDialogClass *klass)
 {
   GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
@@ -146,6 +194,7 @@ gtk_font_chooser_dialog_class_init (GtkFontChooserDialogClass *klass)
   gobject_class->set_property = gtk_font_chooser_dialog_set_property;
 
   widget_class->key_press_event = gtk_font_chooser_dialog_key_press_event;
+  widget_class->map = gtk_font_chooser_dialog_map;
 
   _gtk_font_chooser_install_properties (gobject_class);
 
@@ -157,7 +206,10 @@ gtk_font_chooser_dialog_class_init (GtkFontChooserDialogClass *klass)
                                               "/org/gtk/libgtk/ui/gtkfontchooserdialog.ui");
 
   gtk_widget_class_bind_template_child_private (widget_class, GtkFontChooserDialog, fontchooser);
+  gtk_widget_class_bind_template_child_private (widget_class, GtkFontChooserDialog, select_button);
+  gtk_widget_class_bind_template_child_private (widget_class, GtkFontChooserDialog, cancel_button);
   gtk_widget_class_bind_template_callback (widget_class, font_activated_cb);
+  gtk_widget_class_bind_template_callback (widget_class, tweak_font);
 }
 
 static void
@@ -171,9 +223,6 @@ gtk_font_chooser_dialog_init (GtkFontChooserDialog *fontchooserdiag)
   gtk_widget_init_template (GTK_WIDGET (fontchooserdiag));
   gtk_dialog_set_use_header_bar_from_setting (GTK_DIALOG (fontchooserdiag));
 
-  priv->select_button = gtk_dialog_get_widget_for_response (GTK_DIALOG (fontchooserdiag), GTK_RESPONSE_OK);
-  priv->cancel_button = gtk_dialog_get_widget_for_response (GTK_DIALOG (fontchooserdiag), 
GTK_RESPONSE_CANCEL);
-
   _gtk_font_chooser_set_delegate (GTK_FONT_CHOOSER (fontchooserdiag),
                                   GTK_FONT_CHOOSER (priv->fontchooser));
 }
diff --git a/gtk/gtkfontchooserwidget.c b/gtk/gtkfontchooserwidget.c
index dfa7b7b..ba68131 100644
--- a/gtk/gtkfontchooserwidget.c
+++ b/gtk/gtkfontchooserwidget.c
@@ -103,6 +103,7 @@
 
 struct _GtkFontChooserWidgetPrivate
 {
+  GtkWidget    *stack;
   GtkWidget    *grid;
   GtkWidget    *search_entry;
 
@@ -674,7 +675,7 @@ gtk_font_chooser_widget_measure (GtkWidget       *widget,
   GtkFontChooserWidget *self = GTK_FONT_CHOOSER_WIDGET (widget);
   GtkFontChooserWidgetPrivate *priv = gtk_font_chooser_widget_get_instance_private (self);
 
-  gtk_widget_measure (priv->grid, orientation, for_size,
+  gtk_widget_measure (priv->stack, orientation, for_size,
                       minimum, natural,
                       minimum_baseline, natural_baseline);
 }
@@ -686,7 +687,7 @@ gtk_font_chooser_widget_snapshot (GtkWidget   *widget,
   GtkFontChooserWidget *self = GTK_FONT_CHOOSER_WIDGET (widget);
   GtkFontChooserWidgetPrivate *priv = gtk_font_chooser_widget_get_instance_private (self);
 
-  gtk_widget_snapshot_child (widget, priv->grid, snapshot);
+  gtk_widget_snapshot_child (widget, priv->stack, snapshot);
 }
 
 static void
@@ -700,7 +701,7 @@ gtk_font_chooser_widget_size_allocate (GtkWidget           *widget,
 
   GTK_WIDGET_CLASS (gtk_font_chooser_widget_parent_class)->size_allocate (widget, allocation, -1, out_clip);
 
-  gtk_widget_size_allocate (priv->grid, allocation, -1, out_clip);
+  gtk_widget_size_allocate (priv->stack, allocation, -1, out_clip);
 }
 
 static void
@@ -709,10 +710,10 @@ gtk_font_chooser_widget_dispose (GObject *object)
   GtkFontChooserWidget *self = GTK_FONT_CHOOSER_WIDGET (object);
   GtkFontChooserWidgetPrivate *priv = gtk_font_chooser_widget_get_instance_private (self);
 
-  if (priv->grid)
+  if (priv->stack)
     {
-      gtk_widget_unparent (priv->grid);
-      priv->grid = NULL;
+      gtk_widget_unparent (priv->stack);
+      priv->stack = NULL;
     }
 
   G_OBJECT_CLASS (gtk_font_chooser_widget_parent_class)->dispose (object);
@@ -755,6 +756,7 @@ gtk_font_chooser_widget_class_init (GtkFontChooserWidgetClass *klass)
   gtk_widget_class_bind_template_child_private (widget_class, GtkFontChooserWidget, size_label);
   gtk_widget_class_bind_template_child_private (widget_class, GtkFontChooserWidget, size_spin);
   gtk_widget_class_bind_template_child_private (widget_class, GtkFontChooserWidget, size_slider);
+  gtk_widget_class_bind_template_child_private (widget_class, GtkFontChooserWidget, stack);
   gtk_widget_class_bind_template_child_private (widget_class, GtkFontChooserWidget, grid);
   gtk_widget_class_bind_template_child_private (widget_class, GtkFontChooserWidget, font_grid);
   gtk_widget_class_bind_template_child_private (widget_class, GtkFontChooserWidget, feature_box);
@@ -2930,3 +2932,12 @@ gtk_font_chooser_widget_handle_event (GtkWidget   *widget,
 
   return gtk_search_entry_handle_event (GTK_SEARCH_ENTRY (priv->search_entry), event);
 }
+
+void
+gtk_font_chooser_widget_tweak_font (GtkWidget *widget,
+                                    gboolean   tweak)
+{
+  GtkFontChooserWidget *fontchooser = GTK_FONT_CHOOSER_WIDGET (widget);
+
+  gtk_stack_set_visible_child_name (GTK_STACK (fontchooser->priv->stack), tweak ? "tweaks" : "list");
+}
diff --git a/gtk/gtkfontchooserwidgetprivate.h b/gtk/gtkfontchooserwidgetprivate.h
index f51447e..19a8eda 100644
--- a/gtk/gtkfontchooserwidgetprivate.h
+++ b/gtk/gtkfontchooserwidgetprivate.h
@@ -25,6 +25,9 @@ G_BEGIN_DECLS
 gboolean gtk_font_chooser_widget_handle_event (GtkWidget   *widget,
                                                GdkEventKey *event);
 
+void  gtk_font_chooser_widget_tweak_font (GtkWidget *fontchooser,
+                                          gboolean   tweak);
+
 G_END_DECLS
 
 #endif /* __GTK_FONT_CHOOSER_WIDGET_PRIVATE_H__ */
diff --git a/gtk/ui/gtkfontchooserdialog.ui b/gtk/ui/gtkfontchooserdialog.ui
index 1baee0b..c3b2882 100644
--- a/gtk/ui/gtkfontchooserdialog.ui
+++ b/gtk/ui/gtkfontchooserdialog.ui
@@ -27,7 +27,7 @@
       </object>
     </child>
     <child type="action">
-      <object class="GtkButton" id="ok_button">
+      <object class="GtkButton" id="select_button">
         <property name="label" translatable="yes">_Select</property>
         <property name="use-underline">1</property>
         <property name="can-default">1</property>
@@ -35,7 +35,7 @@
     </child>
     <action-widgets>
       <action-widget response="cancel">cancel_button</action-widget>
-      <action-widget response="ok" default="true">ok_button</action-widget>
+      <action-widget response="ok" default="true">select_button</action-widget>
     </action-widgets>
   </template>
 </interface>
diff --git a/gtk/ui/gtkfontchooserwidget.ui b/gtk/ui/gtkfontchooserwidget.ui
index 34ea6ca..9f1fd35 100644
--- a/gtk/ui/gtkfontchooserwidget.ui
+++ b/gtk/ui/gtkfontchooserwidget.ui
@@ -32,201 +32,266 @@
   </object>
   <template class="GtkFontChooserWidget" parent="GtkWidget">
     <child>
-      <object class="GtkGrid" id="grid">
-        <property name="row-spacing">6</property>
-        <property name="column-spacing">6</property>
+      <object class="GtkStack" id="stack">
         <child>
-          <object class="GtkBox">
-            <style>
-              <class name="linked"/>
-            </style>
-            <child>
-              <object class="GtkSearchEntry" id="search_entry">
-                <property name="can-focus">1</property>
-                <property name="hexpand">1</property>
-                <property name="activates-default">1</property>
-                <property name="primary-icon-name">edit-find-symbolic</property>
-                <property name="primary-icon-activatable">0</property>
-                <property name="secondary-icon-activatable">0</property>
-                <property name="primary-icon-sensitive">0</property>
-                <property name="secondary-icon-sensitive">0</property>
-                <property name="placeholder-text" translatable="yes">Search font name</property>
-                <signal name="search-changed" handler="text_changed_cb" swapped="no"/>
-                <signal name="stop-search" handler="stop_search_cb" swapped="no"/>
-              </object>
-            </child>
+          <object class="GtkGrid" id="grid">
+            <property name="row-spacing">6</property>
+            <property name="column-spacing">6</property>
             <child>
-              <object class="GtkMenuButton" id="filter_button">
-                <property name="popover">filter_popover</property>
+              <object class="GtkBox">
+                <style>
+                  <class name="linked"/>
+                </style>
+                <child>
+                  <object class="GtkSearchEntry" id="search_entry">
+                    <property name="can-focus">1</property>
+                    <property name="hexpand">1</property>
+                    <property name="activates-default">1</property>
+                    <property name="primary-icon-name">edit-find-symbolic</property>
+                    <property name="primary-icon-activatable">0</property>
+                    <property name="secondary-icon-activatable">0</property>
+                    <property name="primary-icon-sensitive">0</property>
+                    <property name="secondary-icon-sensitive">0</property>
+                    <property name="placeholder-text" translatable="yes">Search font name</property>
+                    <signal name="search-changed" handler="text_changed_cb" swapped="no"/>
+                    <signal name="stop-search" handler="stop_search_cb" swapped="no"/>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkMenuButton" id="filter_button">
+                    <property name="popover">filter_popover</property>
+                  </object>
+                </child>
               </object>
+              <packing>
+                <property name="left-attach">0</property>
+                <property name="top-attach">0</property>
+              </packing>
             </child>
-          </object>
-          <packing>
-            <property name="left-attach">0</property>
-            <property name="top-attach">0</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkStack" id="list_stack">
             <child>
-              <object class="GtkGrid" id="font_grid">
-                <property name="row-spacing">6</property>
-                <property name="column-spacing">6</property>
+              <object class="GtkStack" id="list_stack">
                 <child>
-                  <object class="GtkScrolledWindow" id="list_scrolled_window">
-                    <property name="width-request">400</property>
-                    <property name="height-request">300</property>
-                    <property name="can-focus">1</property>
-                    <property name="hexpand">1</property>
-                    <property name="vexpand">1</property>
-                    <property name="hscrollbar-policy">never</property>
-                    <property name="shadow-type">etched-in</property>
+                  <object class="GtkGrid" id="font_grid">
+                    <property name="row-spacing">6</property>
+                    <property name="column-spacing">6</property>
                     <child>
-                      <object class="GtkTreeView" id="family_face_list">
+                      <object class="GtkScrolledWindow" id="list_scrolled_window">
+                        <property name="width-request">400</property>
+                        <property name="height-request">300</property>
                         <property name="can-focus">1</property>
-                        <property name="model">filter_model</property>
-                        <property name="headers-visible">0</property>
-                        <property name="enable-search">0</property>
-                        <property name="fixed-height-mode">1</property>
-                        <signal name="cursor-changed" handler="cursor_changed_cb" swapped="no"/>
-                        <signal name="row-activated" handler="row_activated_cb" swapped="no"/>
-                        <signal name="style-updated" handler="gtk_font_chooser_widget_set_cell_size" 
object="GtkFontChooserWidget" after="yes" swapped="yes"/>
-                        <child internal-child="selection">
-                          <object class="GtkTreeSelection" id="treeview-selection1">
-                            <property name="mode">browse</property>
-                          </object>
-                        </child>
+                        <property name="hexpand">1</property>
+                        <property name="vexpand">1</property>
+                        <property name="hscrollbar-policy">never</property>
+                        <property name="shadow-type">etched-in</property>
                         <child>
-                          <object class="GtkTreeViewColumn" id="family_face_column">
-                            <property name="sizing">fixed</property>
-                            <property name="title" translatable="yes">Font Family</property>
+                          <object class="GtkTreeView" id="family_face_list">
+                            <property name="can-focus">1</property>
+                            <property name="model">filter_model</property>
+                            <property name="headers-visible">0</property>
+                            <property name="enable-search">0</property>
+                            <property name="fixed-height-mode">1</property>
+                            <signal name="cursor-changed" handler="cursor_changed_cb" swapped="no"/>
+                            <signal name="row-activated" handler="row_activated_cb" swapped="no"/>
+                            <signal name="style-updated" handler="gtk_font_chooser_widget_set_cell_size" 
object="GtkFontChooserWidget" after="yes" swapped="yes"/>
+                            <child internal-child="selection">
+                              <object class="GtkTreeSelection" id="treeview-selection1">
+                                <property name="mode">browse</property>
+                              </object>
+                            </child>
                             <child>
-                              <object class="GtkCellRendererText" id="family_face_cell">
-                                <property name="ellipsize">end</property>
+                              <object class="GtkTreeViewColumn" id="family_face_column">
+                                <property name="sizing">fixed</property>
+                                <property name="title" translatable="yes">Font Family</property>
+                                <child>
+                                  <object class="GtkCellRendererText" id="family_face_cell">
+                                    <property name="ellipsize">end</property>
+                                  </object>
+                                </child>
                               </object>
                             </child>
                           </object>
                         </child>
                       </object>
+                      <packing>
+                        <property name="left-attach">0</property>
+                        <property name="top-attach">1</property>
+                        <property name="width">3</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkEntry" id="preview">
+                        <property name="can-focus">1</property>
+                        <property name="placeholder-text" translatable="yes">Preview text</property>
+                        <signal name="scroll-event" handler="resize_by_scroll_cb" swapped="no"/>
+                      </object>
+                      <packing>
+                        <property name="left-attach">0</property>
+                        <property name="top-attach">2</property>
+                        <property name="width">3</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="size_label">
+                        <property name="label" translatable="yes">Size</property>
+                        <property name="xalign">0</property>
+                        <property name="valign">baseline</property>
+                      </object>
+                      <packing>
+                        <property name="left-attach">0</property>
+                        <property name="top-attach">3</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkScale" id="size_slider">
+                        <property name="can-focus">1</property>
+                        <property name="hexpand">1</property>
+                        <property name="adjustment">slider_adjustment</property>
+                        <property name="draw-value">0</property>
+                        <property name="round-digits">0</property>
+                        <signal name="scroll-event" handler="resize_by_scroll_cb" swapped="no"/>
+                      </object>
+                      <packing>
+                        <property name="left-attach">1</property>
+                        <property name="top-attach">3</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkSpinButton" id="size_spin">
+                        <property name="can-focus">1</property>
+                        <property name="adjustment">spin_adjustment</property>
+                        <signal name="output" handler="output_cb"/>
+                      </object>
+                      <packing>
+                        <property name="left-attach">2</property>
+                        <property name="top-attach">3</property>
+                      </packing>
                     </child>
                   </object>
                   <packing>
-                    <property name="left-attach">0</property>
-                    <property name="top-attach">1</property>
-                    <property name="width">3</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkEntry" id="preview">
-                    <property name="can-focus">1</property>
-                    <property name="placeholder-text" translatable="yes">Preview text</property>
-                    <signal name="scroll-event" handler="resize_by_scroll_cb" swapped="no"/>
-                  </object>
-                  <packing>
-                    <property name="left-attach">0</property>
-                    <property name="top-attach">2</property>
-                    <property name="width">3</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="size_label">
-                    <property name="visible">1</property>
-                    <property name="label" translatable="yes">Size</property>
-                    <property name="xalign">0</property>
-                    <property name="valign">baseline</property>
-                  </object>
-                  <packing>
-                    <property name="left-attach">0</property>
-                    <property name="top-attach">3</property>
+                    <property name="name">list</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkScale" id="size_slider">
-                    <property name="can-focus">1</property>
+                  <object class="GtkGrid">
+                    <property name="row-spacing">12</property>
                     <property name="hexpand">1</property>
-                    <property name="adjustment">slider_adjustment</property>
-                    <property name="draw-value">0</property>
-                    <property name="round-digits">0</property>
-                    <signal name="scroll-event" handler="resize_by_scroll_cb" swapped="no"/>
-                  </object>
-                  <packing>
-                    <property name="left-attach">1</property>
-                    <property name="top-attach">3</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkSpinButton" id="size_spin">
-                    <property name="can-focus">1</property>
-                    <property name="adjustment">spin_adjustment</property>
-                    <signal name="output" handler="output_cb"/>
-                  </object>
-                  <packing>
-                    <property name="left-attach">2</property>
-                    <property name="top-attach">3</property>
-                  </packing>
-                </child>
-              </object>
-              <packing>
-                <property name="name">list</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkGrid">
-                <property name="row-spacing">12</property>
-                <property name="hexpand">1</property>
-                <property name="vexpand">1</property>
-                <property name="halign">center</property>
-                <property name="valign">center</property>
-                <style>
-                  <class name="dim-label"/>
-                </style>
-                <child>
-                  <object class="GtkImage">
-                    <property name="gicon">fonticon</property>
-                    <property name="pixel-size">64</property>
-                  </object>
-                  <packing>
-                    <property name="left-attach">0</property>
-                    <property name="top-attach">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel">
-                    <property name="label" translatable="yes">No Fonts Found</property>
-                    <attributes>
-                      <attribute name="weight" value="bold"/>
-                      <attribute name="scale" value="1.2"/>
-                    </attributes>
+                    <property name="vexpand">1</property>
+                    <property name="halign">center</property>
+                    <property name="valign">center</property>
+                    <style>
+                      <class name="dim-label"/>
+                    </style>
+                    <child>
+                      <object class="GtkImage">
+                        <property name="gicon">fonticon</property>
+                        <property name="pixel-size">64</property>
+                      </object>
+                      <packing>
+                        <property name="left-attach">0</property>
+                        <property name="top-attach">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel">
+                        <property name="label" translatable="yes">No Fonts Found</property>
+                        <attributes>
+                          <attribute name="weight" value="bold"/>
+                          <attribute name="scale" value="1.2"/>
+                        </attributes>
+                      </object>
+                      <packing>
+                        <property name="left-attach">0</property>
+                        <property name="top-attach">1</property>
+                      </packing>
+                    </child>
                   </object>
                   <packing>
-                    <property name="left-attach">0</property>
-                    <property name="top-attach">1</property>
+                    <property name="name">empty</property>
                   </packing>
                 </child>
               </object>
               <packing>
-                <property name="name">empty</property>
+                <property name="left-attach">0</property>
+                <property name="top-attach">1</property>
               </packing>
             </child>
           </object>
           <packing>
-            <property name="left-attach">0</property>
-            <property name="top-attach">1</property>
+            <property name="name">list</property>
           </packing>
         </child>
         <child>
-          <object class="GtkExpander" id="feature_expander">
-            <property name="label" translatable="yes">Font Features</property>
+          <object class="GtkBox">
+            <property name="orientation">vertical</property>
+            <property name="spacing">6</property>
             <child>
-              <object class="GtkBox" id="feature_box">
-                <property name="orientation">vertical</property>
+              <object class="GtkEntry" id="preview2">
+                <property name="can-focus">1</property>
+                <property name="placeholder-text" translatable="yes">Preview text</property>
+                <property name="text" bind-source="preview" bind-property="text" bind-flags="bidirectional"/>
+                <property name="attributes" bind-source="preview" bind-property="attributes" 
bind-flags="bidirectional"/>
+                <signal name="scroll-event" handler="resize_by_scroll_cb" swapped="no"/>
+              </object>
+            </child>
+            <child>
+              <object class="GtkScrolledWindow">
+                <property name="hscrollbar-policy">never</property>
+                <property name="shadow-type">in</property>
+                <property name="vexpand">1</property>
+                <style>
+                  <class name="view"/>
+                </style>
                 <child>
-                  <object class="GtkComboBox" id="feature_language_combo">
+                  <object class="GtkBox">
+                    <property name="orientation">vertical</property>
+                    <property name="spacing">12</property>
+                    <property name="margin">12</property>
+                    <child>
+                      <object class="GtkBox">
+                        <property name="spacing">6</property>
+                        <child>
+                          <object class="GtkLabel" id="size_label2">
+                            <property name="label" translatable="yes">Size</property>
+                            <property name="xalign">0</property>
+                            <property name="valign">baseline</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkScale" id="size_slider2">
+                            <property name="can-focus">1</property>
+                            <property name="hexpand">1</property>
+                            <property name="adjustment">slider_adjustment</property>
+                            <property name="draw-value">0</property>
+                            <property name="round-digits">0</property>
+                            <signal name="scroll-event" handler="resize_by_scroll_cb" swapped="no"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkSpinButton" id="size_spin2">
+                            <property name="can-focus">1</property>
+                            <property name="adjustment">spin_adjustment</property>
+                            <signal name="output" handler="output_cb"/>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
                     <child>
-                      <object class="GtkCellRendererText"/>
-                      <attributes>
-                        <attribute name="text">0</attribute>
-                      </attributes>
+                      <object class="GtkBox" id="feature_box">
+                        <property name="orientation">vertical</property>
+                        <property name="spacing">12</property>
+                        <child>
+                          <object class="GtkComboBox" id="feature_language_combo">
+                            <property name="halign">start</property>
+                            <property name="margin-top">10</property>
+                            <child>
+                              <object class="GtkCellRendererText"/>
+                              <attributes>
+                                <attribute name="text">0</attribute>
+                              </attributes>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
                     </child>
                   </object>
                 </child>
@@ -234,8 +299,7 @@
             </child>
           </object>
           <packing>
-            <property name="left-attach">0</property>
-            <property name="top-attach">2</property>
+            <property name="name">tweaks</property>
           </packing>
         </child>
       </object>
@@ -278,7 +342,6 @@ emblem-documents-symbolic</property>
                 </child>
                 <child>
                   <object class="GtkImage">
-                    <property name="visible">1</property>
                     <property name="icon-name">pan-down-symbolic</property>
                     <property name="icon-size">1</property>
                   </object>
@@ -306,12 +369,10 @@ emblem-documents-symbolic</property>
                   <object class="GtkScrolledWindow">
                     <property name="shadow-type">in</property>
                     <property name="hscrollbar-policy">never</property>
-                    <property name="vscrollbar-policy">automatic</property>
                     <property name="propagate-natural-height">1</property>
                     <property name="max-content-height">200</property>
                     <child>
                       <object class="GtkListBox" id="script_list">
-                        <property name="visible">1</property>
                         <property name="selection-mode">none</property>
                         <signal name="row-activated" handler="script_row_activated"/>
                       </object>
@@ -348,7 +409,6 @@ emblem-documents-symbolic</property>
                 </child>
                 <child>
                   <object class="GtkImage">
-                    <property name="visible">1</property>
                     <property name="icon-name">pan-down-symbolic</property>
                     <property name="icon-size">1</property>
                   </object>
@@ -376,12 +436,10 @@ emblem-documents-symbolic</property>
                   <object class="GtkScrolledWindow">
                     <property name="shadow-type">in</property>
                     <property name="hscrollbar-policy">never</property>
-                    <property name="vscrollbar-policy">automatic</property>
                     <property name="propagate-natural-height">1</property>
                     <property name="max-content-height">200</property>
                     <child>
                       <object class="GtkListBox" id="language_list">
-                        <property name="visible">1</property>
                         <property name="selection-mode">none</property>
                         <signal name="row-activated" handler="language_row_activated"/>
                       </object>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]