[xdg-desktop-portal-gnome/gbsneto/post-restore-screencast-cleanups: 7/19] screencastwidget: Remove GtkGrid




commit ee9629aa308cc415c917872dc823d199448ca0bd
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Sat Nov 13 21:31:25 2021 -0300

    screencastwidget: Remove GtkGrid
    
    It has a single child now, we can simply remove it.

 src/screencastwidget.ui | 232 +++++++++++++++++++++++-------------------------
 1 file changed, 112 insertions(+), 120 deletions(-)
---
diff --git a/src/screencastwidget.ui b/src/screencastwidget.ui
index 652f4ac..a884a2f 100644
--- a/src/screencastwidget.ui
+++ b/src/screencastwidget.ui
@@ -4,23 +4,65 @@
   <template class="ScreenCastWidget" parent="GtkBox">
     <property name="orientation">vertical</property>
     <child>
-      <object class="GtkGrid">
+      <object class="GtkStack" id="source_type">
+        <property name="transition-type">crossfade</property>
+        <!-- Window selection page -->
         <child>
-          <object class="GtkStack" id="source_type">
-            <property name="transition-type">crossfade</property>
-            <!-- Window selection page -->
-            <child>
-              <object class="GtkStackPage">
-                <property name="visible" bind-source="window_selection" bind-property="visible" 
bind-flags="sync-create"/>
-                <property name="name">windows_page</property>
-                <property name="title" translatable="yes">Single Window</property>
-                <property name="child">
-                  <object class="GtkBox" id="window_selection">
-                    <property name="orientation">vertical</property>
-                    <property name="visible">0</property>
-                    <property name="margin_top">12</property>
+          <object class="GtkStackPage">
+            <property name="visible" bind-source="window_selection" bind-property="visible" 
bind-flags="sync-create"/>
+            <property name="name">windows_page</property>
+            <property name="title" translatable="yes">Single Window</property>
+            <property name="child">
+              <object class="GtkBox" id="window_selection">
+                <property name="orientation">vertical</property>
+                <property name="visible">0</property>
+                <property name="margin_top">12</property>
+                <child>
+                  <object class="GtkLabel" id="window_heading">
+                    <property name="xalign">0.0</property>
+                    <property name="margin_bottom">12</property>
+                    <attributes>
+                      <attribute name="weight" value="bold"></attribute>
+                    </attributes>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkScrolledWindow" id="window_list_scrolled">
+                    <property name="propagate-natural-height">1</property>
+                    <property name="max-content-height">500</property>
+                    <property name="child">
+                      <object class="GtkListBox" id="window_list">
+                        <property name="hexpand">1</property>
+                        <property name="vexpand">1</property>
+                        <style>
+                          <class name="content" />
+                        </style>
+                      </object>
+                    </property>
+                  </object>
+                </child>
+              </object>
+            </property>
+          </object>
+        </child>
+
+        <!-- Physical monitor selection page -->
+        <child>
+          <object class="GtkStackPage">
+            <property name="visible" bind-source="monitor_selection" bind-property="visible" 
bind-flags="sync-create"/>
+            <property name="name">monitors_page</property>
+            <property name="title" translatable="yes">Entire Screen</property>
+            <property name="child">
+              <object class="GtkBox" id="monitor_selection">
+                <property name="visible">0</property>
+                <property name="orientation">vertical</property>
+                <property name="margin_top">12</property>
+                <child>
+                  <object class="GtkBox">
+                    <property name="hexpand">1</property>
+                    <property name="halign">start</property>
                     <child>
-                      <object class="GtkLabel" id="window_heading">
+                      <object class="GtkLabel" id="monitor_heading">
                         <property name="xalign">0.0</property>
                         <property name="margin_bottom">12</property>
                         <attributes>
@@ -28,128 +70,78 @@
                         </attributes>
                       </object>
                     </child>
-                    <child>
-                      <object class="GtkScrolledWindow" id="window_list_scrolled">
-                        <property name="propagate-natural-height">1</property>
-                        <property name="max-content-height">500</property>
-                        <property name="child">
-                          <object class="GtkListBox" id="window_list">
-                            <property name="hexpand">1</property>
-                            <property name="vexpand">1</property>
-                            <style>
-                              <class name="content" />
-                            </style>
-                          </object>
-                        </property>
-                      </object>
-                    </child>
                   </object>
-                </property>
+                </child>
+                <child>
+                  <object class="GtkListBox" id="monitor_list">
+                    <property name="hexpand">1</property>
+                    <property name="vexpand">1</property>
+                    <style>
+                      <class name="content" />
+                    </style>
+                  </object>
+                </child>
               </object>
-            </child>
+            </property>
+          </object>
+        </child>
 
-            <!-- Physical monitor selection page -->
-            <child>
-              <object class="GtkStackPage">
-                <property name="visible" bind-source="monitor_selection" bind-property="visible" 
bind-flags="sync-create"/>
-                <property name="name">monitors_page</property>
-                <property name="title" translatable="yes">Entire Screen</property>
-                <property name="child">
-                  <object class="GtkBox" id="monitor_selection">
-                    <property name="visible">0</property>
-                    <property name="orientation">vertical</property>
-                    <property name="margin_top">12</property>
-                    <child>
-                      <object class="GtkBox">
-                        <property name="hexpand">1</property>
-                        <property name="halign">start</property>
-                        <child>
-                          <object class="GtkLabel" id="monitor_heading">
-                            <property name="xalign">0.0</property>
-                            <property name="margin_bottom">12</property>
-                            <attributes>
-                              <attribute name="weight" value="bold"></attribute>
-                            </attributes>
-                          </object>
-                        </child>
-                      </object>
-                    </child>
+        <!-- Virtual monitor selection page -->
+        <child>
+          <object class="GtkStackPage">
+            <property name="visible" bind-source="virtual_selection" bind-property="visible" 
bind-flags="sync-create"/>
+            <property name="name">virtual_page</property>
+            <property name="title" translatable="yes">Virtual monitor</property>
+            <property name="child">
+              <object class="GtkBox" id="virtual_selection">
+                <property name="orientation">vertical</property>
+                <property name="visible">0</property>
+                <property name="margin_top">12</property>
+
+                <!-- Virtual monitor selection label -->
+                <child>
+                  <object class="GtkBox">
+                    <property name="hexpand">True</property>
+                    <property name="halign">start</property>
                     <child>
-                      <object class="GtkListBox" id="monitor_list">
-                        <property name="hexpand">1</property>
-                        <property name="vexpand">1</property>
-                        <style>
-                          <class name="content" />
-                        </style>
+                      <object class="GtkLabel" id="virtual_heading">
+                        <property name="label"/>
+                        <property name="xalign">0.0</property>
+                        <property name="margin_bottom">12</property>
+                        <attributes>
+                          <attribute name="weight" value="bold"/>
+                        </attributes>
                       </object>
                     </child>
                   </object>
-                </property>
-              </object>
-            </child>
-
-            <!-- Virtual monitor selection page -->
-            <child>
-              <object class="GtkStackPage">
-                <property name="visible" bind-source="virtual_selection" bind-property="visible" 
bind-flags="sync-create"/>
-                <property name="name">virtual_page</property>
-                <property name="title" translatable="yes">Virtual monitor</property>
-                <property name="child">
-                  <object class="GtkBox" id="virtual_selection">
-                    <property name="orientation">vertical</property>
-                    <property name="visible">0</property>
-                    <property name="margin_top">12</property>
+                </child>
 
-                    <!-- Virtual monitor selection label -->
+                <!-- Virtual monitor switch view -->
+                <child>
+                  <object class="GtkBox">
+                    <property name="can_focus">False</property>
+                    <property name="orientation">horizontal</property>
                     <child>
-                      <object class="GtkBox">
+                      <object class="GtkLabel">
+                        <property name="label" translatable="yes">
+                          Create virtual monitor?
+                        </property>
                         <property name="hexpand">True</property>
-                        <property name="halign">start</property>
-                        <child>
-                          <object class="GtkLabel" id="virtual_heading">
-                            <property name="label"/>
-                            <property name="xalign">0.0</property>
-                            <property name="margin_bottom">12</property>
-                            <attributes>
-                              <attribute name="weight" value="bold"/>
-                            </attributes>
-                          </object>
-                        </child>
+                        <property name="vexpand">False</property>
                       </object>
                     </child>
-
-                    <!-- Virtual monitor switch view -->
                     <child>
-                      <object class="GtkBox">
-                        <property name="can_focus">False</property>
-                        <property name="orientation">horizontal</property>
-                        <child>
-                          <object class="GtkLabel">
-                            <property name="label" translatable="yes">
-                              Create virtual monitor?
-                            </property>
-                            <property name="hexpand">True</property>
-                            <property name="vexpand">False</property>
-                          </object>
-                        </child>
-                        <child>
-                          <object class="GtkSwitch" id="virtual_switch">
-                            <property name="can_focus">True</property>
-                            <property name="hexpand">False</property>
-                            <property name="vexpand">False</property>
-                            <property name="valign">center</property>
-                          </object>
-                        </child>
+                      <object class="GtkSwitch" id="virtual_switch">
+                        <property name="can_focus">True</property>
+                        <property name="hexpand">False</property>
+                        <property name="vexpand">False</property>
+                        <property name="valign">center</property>
                       </object>
                     </child>
                   </object>
-                </property>
+                </child>
               </object>
-            </child>
-            <layout>
-              <property name="column">0</property>
-              <property name="row">1</property>
-            </layout>
+            </property>
           </object>
         </child>
       </object>


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