[nautilus/wip/coreyberla/app-picker-followups] app-chooser: Improve layout
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/coreyberla/app-picker-followups] app-chooser: Improve layout
- Date: Sat, 6 Aug 2022 19:55:06 +0000 (UTC)
commit 89ee717da5f34e0318323a7efafdb9ade0f7cca0
Author: António Fernandes <antoniof gnome org>
Date: Sat Aug 6 20:47:16 2022 +0100
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.
src/resources/ui/nautilus-app-chooser.ui | 139 +++++++++++++++++--------------
1 file changed, 77 insertions(+), 62 deletions(-)
---
diff --git a/src/resources/ui/nautilus-app-chooser.ui b/src/resources/ui/nautilus-app-chooser.ui
index d70e62f83..dd355341d 100644
--- a/src/resources/ui/nautilus-app-chooser.ui
+++ b/src/resources/ui/nautilus-app-chooser.ui
@@ -11,15 +11,6 @@
<child internal-child="content_area">
<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>
@@ -27,74 +18,98 @@
<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="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">
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]