[nautilus/wip/apoos-maximus/gsoc2020: 66/73] properties-window: use top-widget margins for spacing between widget groups
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/apoos-maximus/gsoc2020: 66/73] properties-window: use top-widget margins for spacing between widget groups
- Date: Sun, 2 Aug 2020 12:33:40 +0000 (UTC)
commit 718c555577eb76ade40673f5422a16cd3c363090
Author: Apoorv Sachan <apoorv 99 sachan gmail com>
Date: Wed Jul 22 02:51:44 2020 +0530
properties-window: use top-widget margins for spacing between widget groups
It is recommended that widget margins should be used to apply
spacing between widget groups instead of empty labels.
In case of the Basic page, due to the conditionality of the
rows which appear together with spacing-widget the empty label
has been replaced with an empty box as it allows for minimum
height to be set. Thus enabling a flexible design.
src/nautilus-properties-window.c | 13 --
src/resources/ui/nautilus-properties-window.ui | 166 ++++++++++++-------------
2 files changed, 79 insertions(+), 100 deletions(-)
---
diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c
index f6b30737f..5d9afdb9e 100644
--- a/src/nautilus-properties-window.c
+++ b/src/nautilus-properties-window.c
@@ -183,18 +183,12 @@ struct _NautilusPropertiesWindow
GtkWidget *others_file_access_label;
GtkWidget *others_file_access_combo;
- GtkWidget *spacer_6;
-
GtkWidget *execute_label;
GtkWidget *execute_checkbox;
- GtkWidget *spacer_7;
-
GtkWidget *security_context_title_label;
GtkWidget *security_context_value_label;
- GtkWidget *spacer_8;
-
GtkWidget *change_permissions_button_box;
GtkWidget *change_permissions_button;
@@ -3260,7 +3254,6 @@ setup_execute_checkbox_with_label (NautilusPropertiesWindow *window,
GtkLabel *label_for;
label_for = GTK_LABEL (window->execute_label);
- gtk_widget_show (window->spacer_6);
gtk_widget_show (window->execute_label);
gtk_widget_show (window->execute_checkbox);
@@ -4258,7 +4251,6 @@ create_permissions_page (NautilusPropertiesWindow *window)
create_simple_permissions (window, GTK_GRID (window->permissions_grid));
#ifdef HAVE_SELINUX
- gtk_widget_show (window->spacer_7);
gtk_widget_show (window->security_context_title_label);
gtk_widget_show (window->security_context_value_label);
@@ -4270,8 +4262,6 @@ create_permissions_page (NautilusPropertiesWindow *window)
window->security_context_value_label);
#endif
- gtk_widget_show (window->spacer_8);
-
if (window->has_recursive_apply)
{
gtk_widget_show_all (window->change_permissions_button_box);
@@ -5356,13 +5346,10 @@ nautilus_properties_window_class_init (NautilusPropertiesWindowClass *klass)
gtk_widget_class_bind_template_child (widget_class, NautilusPropertiesWindow, others_access_combo);
gtk_widget_class_bind_template_child (widget_class, NautilusPropertiesWindow,
others_folder_access_combo);
gtk_widget_class_bind_template_child (widget_class, NautilusPropertiesWindow, others_file_access_combo);
- gtk_widget_class_bind_template_child (widget_class, NautilusPropertiesWindow, spacer_6);
gtk_widget_class_bind_template_child (widget_class, NautilusPropertiesWindow, execute_label);
gtk_widget_class_bind_template_child (widget_class, NautilusPropertiesWindow, execute_checkbox);
- gtk_widget_class_bind_template_child (widget_class, NautilusPropertiesWindow, spacer_7);
gtk_widget_class_bind_template_child (widget_class, NautilusPropertiesWindow,
security_context_title_label);
gtk_widget_class_bind_template_child (widget_class, NautilusPropertiesWindow,
security_context_value_label);
- gtk_widget_class_bind_template_child (widget_class, NautilusPropertiesWindow, spacer_8);
gtk_widget_class_bind_template_child (widget_class, NautilusPropertiesWindow,
change_permissions_button_box);
gtk_widget_class_bind_template_child (widget_class, NautilusPropertiesWindow, change_permissions_button);
diff --git a/src/resources/ui/nautilus-properties-window.ui b/src/resources/ui/nautilus-properties-window.ui
index e8c3ddc1b..6b6247042 100644
--- a/src/resources/ui/nautilus-properties-window.ui
+++ b/src/resources/ui/nautilus-properties-window.ui
@@ -246,16 +246,6 @@
<property name="top_attach">4</property>
</packing>
</child>
- <child>
- <object class="GtkLabel" id="spacer_1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">5</property>
- </packing>
- </child>
<child>
<object class="GtkLabel" id="parent_folder_title_label">
<property name="can_focus">False</property>
@@ -368,15 +358,6 @@
<property name="top_attach">12</property>
</packing>
</child>
- <child>
- <object class="GtkLabel" id="spacer_2">
- <property name="can_focus">False</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">8</property>
- </packing>
- </child>
<child>
<object class="GtkLabel" id="accessed_title_label">
<property name="can_focus">False</property>
@@ -429,15 +410,6 @@
<property name="top_attach">10</property>
</packing>
</child>
- <child>
- <object class="GtkLabel" id="spacer_3">
- <property name="can_focus">False</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">13</property>
- </packing>
- </child>
<child>
<object class="GtkLabel" id="free_space_title_label">
<property name="can_focus">False</property>
@@ -689,6 +661,49 @@
<property name="width">3</property>
</packing>
</child>
+ <child>
+ <object class="GtkBox" id="spacer_1">
+ <property name="height_request">6</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">5</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="spacer_2">
+ <property name="height_request">6</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">8</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="spacer_3">
+ <property name="height_request">6</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">13</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">False</property>
@@ -889,20 +904,11 @@
<property name="top_attach">3</property>
</packing>
</child>
- <child>
- <object class="GtkLabel" id="spacer_4">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">4</property>
- </packing>
- </child>
<child>
<object class="GtkLabel" id="group_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="margin_top">12</property>
<property name="label" translatable="yes">_Group</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">group_combo_box</property>
@@ -925,6 +931,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
+ <property name="margin_top">12</property>
</object>
<packing>
<property name="name">combo_box</property>
@@ -935,6 +942,7 @@
<object class="GtkLabel" id="group_value_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="margin_top">12</property>
<property name="selectable">True</property>
<property name="xalign">0</property>
</object>
@@ -1019,20 +1027,11 @@
<property name="top_attach">8</property>
</packing>
</child>
- <child>
- <object class="GtkLabel" id="spacer_5">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">9</property>
- </packing>
- </child>
<child>
<object class="GtkLabel" id="others_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="margin_top">12</property>
<property name="label" translatable="yes">Others</property>
<property name="xalign">1</property>
<style>
@@ -1113,18 +1112,10 @@
<property name="top_attach">13</property>
</packing>
</child>
- <child>
- <object class="GtkLabel" id="spacer_6">
- <property name="can_focus">False</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">14</property>
- </packing>
- </child>
<child>
<object class="GtkLabel" id="execute_label">
<property name="can_focus">False</property>
+ <property name="margin_top">12</property>
<property name="label" translatable="yes">Execute</property>
<property name="xalign">1</property>
<style>
@@ -1136,30 +1127,10 @@
<property name="top_attach">15</property>
</packing>
</child>
- <child>
- <object class="GtkCheckButton" id="execute_checkbox">
- <property name="label" translatable="yes">Allow _executing file as program</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">15</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="spacer_7">
- <property name="can_focus">False</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">16</property>
- </packing>
- </child>
<child>
<object class="GtkLabel" id="security_context_title_label">
<property name="can_focus">False</property>
+ <property name="margin_top">12</property>
<property name="label" translatable="yes">Security context</property>
<property name="xalign">1</property>
<style>
@@ -1174,6 +1145,7 @@
<child>
<object class="GtkLabel" id="security_context_value_label">
<property name="can_focus">False</property>
+ <property name="margin_top">12</property>
<property name="selectable">True</property>
<property name="max_width_chars">24</property>
<property name="xalign">0</property>
@@ -1183,18 +1155,10 @@
<property name="top_attach">17</property>
</packing>
</child>
- <child>
- <object class="GtkLabel" id="spacer_8">
- <property name="can_focus">False</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">18</property>
- </packing>
- </child>
<child>
<object class="GtkBox" id="change_permissions_button_box">
<property name="can_focus">False</property>
+ <property name="margin_top">12</property>
<child>
<object class="GtkButton" id="change_permissions_button">
<property name="label" translatable="yes">Change Permissions for Enclosed
Files…</property>
@@ -1214,6 +1178,34 @@
<property name="width">2</property>
</packing>
</child>
+ <child>
+ <object class="GtkCheckButton" id="execute_checkbox">
+ <property name="label" translatable="yes">Allow _executing file as program</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="margin_top">12</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">15</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
<child>
<placeholder/>
</child>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]