[gtk+] inspector: Reorganize stack
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] inspector: Reorganize stack
- Date: Wed, 29 Nov 2017 03:23:16 +0000 (UTC)
commit 4ebbb19e256db17ee76df7037e0246b7424dd96a
Author: Benjamin Otte <otte redhat com>
Date: Wed Nov 29 04:02:24 2017 +0100
inspector: Reorganize stack
There are too many stack elements in the main stack. So add a substack
for the pages that display common global state. The appropriate name I
found for it was "Global".
It's used to house the General, Visual, Resources and Statistics pages
for now.
gtk/inspector/window.ui | 166 +++++++++++++++++++++++++++--------------------
1 files changed, 96 insertions(+), 70 deletions(-)
---
diff --git a/gtk/inspector/window.ui b/gtk/inspector/window.ui
index 560ae2e..9ab5774 100644
--- a/gtk/inspector/window.ui
+++ b/gtk/inspector/window.ui
@@ -67,48 +67,70 @@
</packing>
</child>
<child>
- <object class="GtkToggleButton" id="record_statistics_button">
- <property name="focus-on-click">0</property>
- <property name="tooltip-text" translatable="yes">Collect Statistics</property>
- <property name="halign">start</property>
- <property name="valign">center</property>
- <property name="icon-name">media-record-symbolic</property>
- </object>
- <packing>
- <property name="name">statistics</property>
- </packing>
- </child>
- <child>
- <object class="GtkStack" id="resource_buttons">
- <property name="halign">start</property>
- <property name="valign">center</property>
+ <object class="GtkStack" id="global_button_stack">
+ <property name="visible-child-name" bind-source="global_stack"
bind-property="visible-child-name"/>
<child>
- <object class="GtkButton">
- <property name="focus-on-click">0</property>
- <property name="tooltip-text" translatable="yes">Show Details</property>
- <property name="halign">center</property>
+ <object class="GtkBox">
+ </object>
+ <packing>
+ <property name="name">general</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox">
+ </object>
+ <packing>
+ <property name="name">visual</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkStack" id="resource_buttons">
+ <property name="halign">start</property>
<property name="valign">center</property>
- <property name="icon-name">dialog-information-symbolic</property>
+ <child>
+ <object class="GtkButton">
+ <property name="focus-on-click">0</property>
+ <property name="tooltip-text" translatable="yes">Show Details</property>
+ <property name="halign">center</property>
+ <property name="valign">center</property>
+ <property name="icon-name">dialog-information-symbolic</property>
+ </object>
+ <packing>
+ <property name="name">list</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton">
+ <property name="focus-on-click">0</property>
+ <property name="tooltip-text" translatable="yes">Show all Resources</property>
+ <property name="halign">center</property>
+ <property name="valign">center</property>
+ <property name="icon-name">view-list-symbolic</property>
+ </object>
+ <packing>
+ <property name="name">details</property>
+ </packing>
+ </child>
</object>
<packing>
- <property name="name">list</property>
+ <property name="name">resources</property>
</packing>
</child>
<child>
- <object class="GtkButton">
+ <object class="GtkToggleButton" id="record_statistics_button">
<property name="focus-on-click">0</property>
- <property name="tooltip-text" translatable="yes">Show all Resources</property>
- <property name="halign">center</property>
+ <property name="tooltip-text" translatable="yes">Collect Statistics</property>
+ <property name="halign">start</property>
<property name="valign">center</property>
- <property name="icon-name">view-list-symbolic</property>
+ <property name="icon-name">media-record-symbolic</property>
</object>
<packing>
- <property name="name">details</property>
+ <property name="name">statistics</property>
</packing>
</child>
</object>
<packing>
- <property name="name">resources</property>
+ <property name="name">global</property>
</packing>
</child>
<child>
@@ -125,20 +147,6 @@
<property name="name">recorder</property>
</packing>
</child>
- <child>
- <object class="GtkBox">
- </object>
- <packing>
- <property name="name">visual</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox">
- </object>
- <packing>
- <property name="name">general</property>
- </packing>
- </child>
</object>
</child>
<child type="title">
@@ -396,21 +404,55 @@
</packing>
</child>
<child>
- <object class="GtkInspectorStatistics">
- <property name="button">record_statistics_button</property>
- </object>
- <packing>
- <property name="name">statistics</property>
- <property name="title" translatable="yes">Statistics</property>
- </packing>
- </child>
- <child>
- <object class="GtkInspectorResourceList">
- <property name="buttons">resource_buttons</property>
+ <object class="GtkBox">
+ <property name="orientation">horizontal</property>
+ <child>
+ <object class="GtkStackSidebar">
+ <property name="stack">global_stack</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkStack" id="global_stack">
+ <child>
+ <object class="GtkInspectorGeneral">
+ </object>
+ <packing>
+ <property name="name">general</property>
+ <property name="title" translatable="yes">General</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkInspectorVisual">
+ </object>
+ <packing>
+ <property name="name">visual</property>
+ <property name="title" translatable="yes">Visual</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkInspectorResourceList">
+ <property name="buttons">resource_buttons</property>
+ </object>
+ <packing>
+ <property name="name">resources</property>
+ <property name="title" translatable="yes">Resources</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkInspectorStatistics">
+ <property name="button">record_statistics_button</property>
+ </object>
+ <packing>
+ <property name="name">statistics</property>
+ <property name="title" translatable="yes">Statistics</property>
+ </packing>
+ </child>
+ </object>
+ </child>
</object>
<packing>
- <property name="name">resources</property>
- <property name="title" translatable="yes">Resources</property>
+ <property name="name">global</property>
+ <property name="title" translatable="yes">Global</property>
</packing>
</child>
<child>
@@ -429,22 +471,6 @@
<property name="title" translatable="yes">Recorder</property>
</packing>
</child>
- <child>
- <object class="GtkInspectorVisual">
- </object>
- <packing>
- <property name="name">visual</property>
- <property name="title" translatable="yes">Visual</property>
- </packing>
- </child>
- <child>
- <object class="GtkInspectorGeneral">
- </object>
- <packing>
- <property name="name">general</property>
- <property name="title" translatable="yes">General</property>
- </packing>
- </child>
</object>
</child>
</template>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]