diff options
author | António Fernandes <antoniof@gnome.org> | 2022-08-06 20:47:16 +0100 |
---|---|---|
committer | António Fernandes <antoniof@gnome.org> | 2022-08-07 01:15:29 +0000 |
commit | eac32fcad6dc829a6388a7cc78a189dc83844a85 (patch) | |
tree | 8d4c39b2d1df68229bbaf1f5f1427d462b15b18a /src/resources/ui/nautilus-app-chooser.ui | |
parent | eee342797748d3f1c757c5b972cb7fc470c0a928 (diff) | |
download | nautilus-eac32fcad6dc829a6388a7cc78a189dc83844a85.tar.gz |
app-chooser: Improve layout
On the verge of UI freeze, spliting this among previous commits is not
possible, unfortunately. So, this packs a few changes at once:
* Avoid double scrollbars. The GtkScrolledWindow is preserved for
future use when we get rid of GtkAppChooserWidger, but otherwise
it doesn't scroll.
* Add a separator above default switch row.
* Make the switch row and make the whole row clickable.
* Fine-tune margins.
Diffstat (limited to 'src/resources/ui/nautilus-app-chooser.ui')
-rw-r--r-- | src/resources/ui/nautilus-app-chooser.ui | 140 |
1 files changed, 78 insertions, 62 deletions
diff --git a/src/resources/ui/nautilus-app-chooser.ui b/src/resources/ui/nautilus-app-chooser.ui index d32ede0e5..002a9083f 100644 --- a/src/resources/ui/nautilus-app-chooser.ui +++ b/src/resources/ui/nautilus-app-chooser.ui @@ -12,89 +12,105 @@ <object class="GtkBox" id="content_area"> <property name="orientation">vertical</property> <child> - <object class="GtkLabel" id="label_description"> - <property name="margin-top">18</property> - <property name="wrap">True</property> - <property name="wrap-mode">PANGO_WRAP_WORD_CHAR</property> - <property name="halign">center</property> - <property name="label" translatable="yes">Choose an application to open the selected files.</property> - </object> - </child> - <child> <object class="GtkStack"> <property name="hexpand">True</property> <child> <object class="GtkStackPage"> <property name="name">list</property> <property name="child"> - <object class="GtkScrolledWindow"> - <property name="margin-top">18</property> - <property name="margin-bottom">18</property> - <property name="margin-start">18</property> - <property name="margin-end">18</property> - <property name="hscrollbar-policy">never</property> - <property name="vexpand">true</property> - <property name="child"> - <object class="AdwClamp"> + <object class="GtkBox"> + <property name="orientation">vertical</property> + <child> + <object class="GtkScrolledWindow"> + <property name="hscrollbar-policy">never</property> + <property name="vscrollbar-policy">never</property> + <property name="vexpand">true</property> <style> <class name="background"/> </style> <property name="child"> - <object class="GtkBox"> - <property name="orientation">vertical</property> - <property name="spacing">12</property> - <child> - <object class="GtkBox" id="app_chooser_widget_box"> - <property name="margin-start">18</property> - <property name="margin-end">18</property> - <property name="vexpand">True</property> + <object class="AdwClamp"> + <property name="margin-top">18</property> + <property name="margin-bottom">18</property> + <property name="margin-start">18</property> + <property name="margin-end">18</property> + <property name="child"> + <object class="GtkBox"> <property name="orientation">vertical</property> + <property name="spacing">12</property> + <child> + <object class="GtkLabel" id="label_description"> + <property name="wrap">True</property> + <property name="wrap-mode">PANGO_WRAP_WORD_CHAR</property> + <property name="justify">center</property> + <property name="label" translatable="yes">Choose an application to open the selected files.</property> + </object> + </child> + <child> + <object class="GtkBox" id="app_chooser_widget_box"> + <property name="halign">center</property> + <property name="vexpand">True</property> + </object> + </child> </object> - </child> + </property> </object> </property> </object> - </property> + </child> + <child> + <object class="GtkBox" id="set_default_box"> + <property name="orientation">vertical</property> + <style> + <class name="background"/> + </style> + <child> + <object class="GtkSeparator"/> + </child> + <child> + <object class="AdwActionRow" id="set_default_row"> + <property name="hexpand">true</property> + <property name="selectable">false</property> + <property name="activatable-widget">set_as_default_switch</property> + <child type="prefix"> + <object class="GtkBox"> + <property name="orientation">vertical</property> + <property name="spacing">3</property> + <property name="hexpand">true</property> + <property name="valign">center</property> + <child> + <object class="GtkLabel"> + <property name="label" translatable="yes">Always use for this file type</property> + <property name="halign">start</property> + </object> + </child> + <child> + <object class="GtkLabel" id="label_content_type_description"> + <property name="halign">start</property> + <style> + <class name="caption"/> + <class name="dim-label"/> + </style> + </object> + </child> + </object> + </child> + <child> + <object class="GtkSwitch" id="set_as_default_switch"> + <property name="halign">end</property> + <property name="valign">center</property> + </object> + </child> + </object> + </child> + </object> + </child> </object> </property> </object> </child> </object> </child> - <child> - <object class="GtkBox" id="set_default_box"> - <property name="margin-bottom">18</property> - <property name="margin-start">18</property> - <property name="margin-end">18</property> - <child> - <object class="GtkBox"> - <property name="orientation">vertical</property> - <child> - <object class="GtkLabel"> - <property name="halign">start</property> - <property name="hexpand">True</property> - <property name="label" translatable="yes">Always use for this file type</property> - </object> - </child> - <child> - <object class="GtkLabel" id="label_content_type_description"> - <property name="halign">start</property> - <style> - <class name="dim-label"/> - <class name="caption"/> - </style> - </object> - </child> - </object> - </child> - <child> - <object class="GtkSwitch" id="set_as_default_switch"> - <property name="halign">end</property> - <property name="valign">center</property> - </object> - </child> - </object> - </child> </object> </child> <child type="action"> |