[sysprof/wip/gtk4-port: 83/125] libsysprof-ui: port more UI to GTK 4




commit 05521bef06f0f2478fd67cf643319aa5d5afcfb7
Author: Christian Hergert <chergert redhat com>
Date:   Fri Oct 1 11:41:57 2021 -0700

    libsysprof-ui: port more UI to GTK 4

 src/libsysprof-ui/sysprof-details-page.ui | 168 +++++++++++++++---------------
 src/libsysprof-ui/sysprof-display.ui      | 108 ++++++++++---------
 2 files changed, 140 insertions(+), 136 deletions(-)
---
diff --git a/src/libsysprof-ui/sysprof-details-page.ui b/src/libsysprof-ui/sysprof-details-page.ui
index 66e8f86b..b455fac6 100644
--- a/src/libsysprof-ui/sysprof-details-page.ui
+++ b/src/libsysprof-ui/sysprof-details-page.ui
@@ -24,11 +24,11 @@
                 <style>
                   <class name="dim-label"/>
                 </style>
+                <layout>
+                  <property name="column">left</property>
+                  <property name="row">0</property>
+                </layout>
               </object>
-              <packing>
-                <property name="column">left</property>
-                <property name="row">0</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel">
@@ -38,11 +38,11 @@
                 <style>
                   <class name="dim-label"/>
                 </style>
+                <layout>
+                  <property name="column">left</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
-              <packing>
-                <property name="column">left</property>
-                <property name="row">1</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel">
@@ -53,11 +53,11 @@
                 <style>
                   <class name="dim-label"/>
                 </style>
+                <layout>
+                  <property name="column">left</property>
+                  <property name="row">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="column">left</property>
-                <property name="row">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel">
@@ -68,11 +68,11 @@
                 <style>
                   <class name="dim-label"/>
                 </style>
+                <layout>
+                  <property name="column">left</property>
+                  <property name="row">3</property>
+                </layout>
               </object>
-              <packing>
-                <property name="column">left</property>
-                <property name="row">3</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel">
@@ -83,11 +83,11 @@
                 <style>
                   <class name="dim-label"/>
                 </style>
+                <layout>
+                  <property name="column">left</property>
+                  <property name="row">4</property>
+                </layout>
               </object>
-              <packing>
-                <property name="column">left</property>
-                <property name="row">4</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel">
@@ -97,11 +97,11 @@
                 <style>
                   <class name="dim-label"/>
                 </style>
+                <layout>
+                  <property name="column">left</property>
+                  <property name="row">5</property>
+                </layout>
               </object>
-              <packing>
-                <property name="column">left</property>
-                <property name="row">5</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel">
@@ -111,11 +111,11 @@
                 <style>
                   <class name="dim-label"/>
                 </style>
+                <layout>
+                  <property name="column">left</property>
+                  <property name="row">6</property>
+                </layout>
               </object>
-              <packing>
-                <property name="column">left</property>
-                <property name="row">6</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel">
@@ -125,11 +125,11 @@
                 <style>
                   <class name="dim-label"/>
                 </style>
+                <layout>
+                  <property name="column">left</property>
+                  <property name="row">7</property>
+                </layout>
               </object>
-              <packing>
-                <property name="column">left</property>
-                <property name="row">7</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel">
@@ -139,11 +139,11 @@
                 <style>
                   <class name="dim-label"/>
                 </style>
+                <layout>
+                  <property name="column">left</property>
+                  <property name="row">8</property>
+                </layout>
               </object>
-              <packing>
-                <property name="column">left</property>
-                <property name="row">8</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel">
@@ -154,11 +154,11 @@
                 <style>
                   <class name="dim-label"/>
                 </style>
+                <layout>
+                  <property name="column">left</property>
+                  <property name="row">9</property>
+                </layout>
               </object>
-              <packing>
-                <property name="column">left</property>
-                <property name="row">9</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="filename">
@@ -168,11 +168,11 @@
                 <property name="ellipsize">start</property>
                 <property name="xalign">0</property>
                 <property name="selectable">True</property>
+                <layout>
+                  <property name="column">1</property>
+                  <property name="row">0</property>
+                </layout>
               </object>
-              <packing>
-                <property name="column">1</property>
-                <property name="row">0</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="start_time">
@@ -181,11 +181,11 @@
                 <property name="ellipsize">start</property>
                 <property name="xalign">0</property>
                 <property name="selectable">True</property>
+                <layout>
+                  <property name="column">center</property>
+                  <property name="row">1</property>
+                </layout>
               </object>
-              <packing>
-                <property name="column">center</property>
-                <property name="row">1</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="duration">
@@ -193,11 +193,11 @@
                 <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="selectable">True</property>
+                <layout>
+                  <property name="column">center</property>
+                  <property name="row">2</property>
+                </layout>
               </object>
-              <packing>
-                <property name="column">center</property>
-                <property name="row">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="cpu_label">
@@ -206,11 +206,11 @@
                 <property name="ellipsize">end</property>
                 <property name="xalign">0</property>
                 <property name="selectable">True</property>
+                <layout>
+                  <property name="column">center</property>
+                  <property name="row">3</property>
+                </layout>
               </object>
-              <packing>
-                <property name="column">center</property>
-                <property name="row">3</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="samples">
@@ -220,11 +220,11 @@
                 <property name="ellipsize">start</property>
                 <property name="xalign">0</property>
                 <property name="selectable">True</property>
+                <layout>
+                  <property name="column">center</property>
+                  <property name="row">4</property>
+                </layout>
               </object>
-              <packing>
-                <property name="column">center</property>
-                <property name="row">4</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="marks">
@@ -233,11 +233,11 @@
                 <property name="ellipsize">start</property>
                 <property name="xalign">0</property>
                 <property name="selectable">True</property>
+                <layout>
+                  <property name="column">center</property>
+                  <property name="row">5</property>
+                </layout>
               </object>
-              <packing>
-                <property name="column">center</property>
-                <property name="row">5</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="processes">
@@ -246,11 +246,11 @@
                 <property name="ellipsize">start</property>
                 <property name="xalign">0</property>
                 <property name="selectable">True</property>
+                <layout>
+                  <property name="column">center</property>
+                  <property name="row">6</property>
+                </layout>
               </object>
-              <packing>
-                <property name="column">center</property>
-                <property name="row">6</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="forks">
@@ -259,11 +259,11 @@
                 <property name="ellipsize">start</property>
                 <property name="xalign">0</property>
                 <property name="selectable">True</property>
+                <layout>
+                  <property name="column">center</property>
+                  <property name="row">7</property>
+                </layout>
               </object>
-              <packing>
-                <property name="column">center</property>
-                <property name="row">7</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="counters">
@@ -272,11 +272,11 @@
                 <property name="ellipsize">start</property>
                 <property name="xalign">0</property>
                 <property name="selectable">True</property>
+                <layout>
+                  <property name="column">center</property>
+                  <property name="row">8</property>
+                </layout>
               </object>
-              <packing>
-                <property name="column">center</property>
-                <property name="row">8</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="allocations">
@@ -286,11 +286,11 @@
                 <property name="margin-bottom">12</property>
                 <property name="xalign">0</property>
                 <property name="selectable">True</property>
+                <layout>
+                  <property name="column">center</property>
+                  <property name="row">9</property>
+                </layout>
               </object>
-              <packing>
-                <property name="column">center</property>
-                <property name="row">9</property>
-              </packing>
             </child>
             <child>
               <object class="GtkFrame">
@@ -372,11 +372,11 @@
                     </child>
                   </object>
                 </child>
+                <layout>
+                  <property name="column">center</property>
+                  <property name="row">10</property>
+                </layout>
               </object>
-              <packing>
-                <property name="column">center</property>
-                <property name="row">10</property>
-              </packing>
             </child>
           </object>
         </child>
diff --git a/src/libsysprof-ui/sysprof-display.ui b/src/libsysprof-ui/sysprof-display.ui
index ac6292da..ccdc8120 100644
--- a/src/libsysprof-ui/sysprof-display.ui
+++ b/src/libsysprof-ui/sysprof-display.ui
@@ -1,79 +1,83 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
+  <requires lib="gtk" version="4.0"/>
   <template class="SysprofDisplay" parent="GtkWidget">
     <child>
       <object class="GtkStack" id="stack">
-        <property name="hhomogeneous">false</property>
-        <property name="vhomogeneous">false</property>
-        <property name="visible">true</property>
+        <property name="hhomogeneous">0</property>
+        <property name="vhomogeneous">0</property>
         <child>
-          <object class="SysprofProfilerAssistant" id="assistant">
-            <property name="visible">true</property>
-          </object>
-          <packing>
+          <object class="GtkStackPage">
             <property name="name">assistant</property>
-          </packing>
+            <property name="child">
+              <object class="SysprofProfilerAssistant" id="assistant">
+                <property name="visible">true</property>
+              </object>
+            </property>
+          </object>
         </child>
         <child>
-          <object class="GtkPaned">
-            <property name="orientation">vertical</property>
-            <property name="visible">true</property>
-            <child>
-              <object class="GtkBox">
-                <property name="vexpand">false</property>
+          <object class="GtkStackPage">
+            <property name="name">view</property>
+            <property name="child">
+              <object class="GtkPaned">
                 <property name="orientation">vertical</property>
-                <property name="visible">true</property>
                 <child>
-                  <object class="SysprofVisualizersFrame" id="visualizers">
-                    <property name="vexpand">true</property>
-                    <property name="visible">true</property>
+                  <object class="GtkBox">
+                    <property name="vexpand">0</property>
+                    <property name="orientation">vertical</property>
+                    <child>
+                      <object class="SysprofVisualizersFrame" id="visualizers">
+                        <property name="vexpand">true</property>
+                        <property name="visible">true</property>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkSeparator"/>
+                    </child>
                   </object>
                 </child>
                 <child>
-                  <object class="GtkSeparator">
-                    <property name="orientation">horizontal</property>
-                    <property name="visible">true</property>
-                  </object>
-                </child>
-              </object>
-            </child>
-            <child>
-              <object class="GtkStack" id="pages">
-                <property name="hhomogeneous">false</property>
-                <property name="vhomogeneous">false</property>
-                <property name="vexpand">true</property>
-                <property name="visible">true</property>
-                <child>
-                  <object class="SysprofDetailsPage" id="details">
-                    <property name="visible">true</property>
+                  <object class="GtkStack" id="pages">
+                    <property name="hhomogeneous">0</property>
+                    <property name="vhomogeneous">0</property>
+                    <property name="vexpand">1</property>
+                    <child>
+                      <object class="GtkStackPage">
+                        <property name="title" translatable="yes">Details</property>
+                        <property name="name">details</property>
+                        <property name="child">
+                          <object class="SysprofDetailsPage" id="details">
+                            <property name="visible">true</property>
+                          </object>
+                        </property>
+                      </object>
+                    </child>
                   </object>
-                  <packing>
-                    <property name="title" translatable="yes">Details</property>
-                    <property name="name">details</property>
-                  </packing>
                 </child>
               </object>
-            </child>
+            </property>
           </object>
-          <packing>
-            <property name="name">view</property>
-          </packing>
         </child>
         <child>
-          <object class="SysprofRecordingStateView" id="recording_view">
-            <property name="visible">true</property>
-          </object>
-          <packing>
+          <object class="GtkStackPage">
             <property name="name">record</property>
-          </packing>
+            <property name="child">
+              <object class="SysprofRecordingStateView" id="recording_view">
+                <property name="visible">true</property>
+              </object>
+            </property>
+          </object>
         </child>
         <child>
-          <object class="SysprofFailedStateView" id="failed_view">
-            <property name="visible">true</property>
-          </object>
-          <packing>
+          <object class="GtkStackPage">
             <property name="name">failed</property>
-          </packing>
+            <property name="child">
+              <object class="SysprofFailedStateView" id="failed_view">
+                <property name="visible">true</property>
+              </object>
+            </property>
+          </object>
         </child>
       </object>
     </child>


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