[gtk/wip/exalm/polish: 3/7] inspector: Use .toolbar for toolbars
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/exalm/polish: 3/7] inspector: Use .toolbar for toolbars
- Date: Sat, 23 Oct 2021 23:07:48 +0000 (UTC)
commit bec9141233f2139dcc6ec08da27a0c7f10be38d8
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Sun Oct 24 03:10:54 2021 +0500
inspector: Use .toolbar for toolbars
Remove all of the manual margins, spacing and has-frame=0, be more
consistent.
gtk/inspector/css-editor.ui | 10 +++-------
gtk/inspector/recorder.ui | 14 +++-----------
gtk/inspector/tree-data.ui | 9 +++------
gtk/inspector/window.ui | 44 +++++++-------------------------------------
4 files changed, 16 insertions(+), 61 deletions(-)
---
diff --git a/gtk/inspector/css-editor.ui b/gtk/inspector/css-editor.ui
index dc4649904c..c1163efba4 100644
--- a/gtk/inspector/css-editor.ui
+++ b/gtk/inspector/css-editor.ui
@@ -22,14 +22,11 @@
<property name="orientation">vertical</property>
<child>
<object class="GtkBox">
- <property name="spacing">6</property>
- <property name="margin-start">6</property>
- <property name="margin-end">6</property>
- <property name="margin-top">6</property>
- <property name="margin-bottom">6</property>
+ <style>
+ <class name="toolbar"/>
+ </style>
<child>
<object class="GtkToggleButton" id="disable_button">
- <property name="has-frame">0</property>
<property name="tooltip-text" translatable="yes">Disable this custom CSS</property>
<property name="icon-name">media-playback-pause-symbolic</property>
<signal name="toggled" handler="disable_toggled"/>
@@ -37,7 +34,6 @@
</child>
<child>
<object class="GtkButton" id="save_button">
- <property name="has-frame">0</property>
<property name="tooltip-text" translatable="yes">Save the current CSS</property>
<property name="icon-name">document-save-symbolic</property>
<signal name="clicked" handler="save_clicked"/>
diff --git a/gtk/inspector/recorder.ui b/gtk/inspector/recorder.ui
index de0d7cd9f3..ce25148196 100644
--- a/gtk/inspector/recorder.ui
+++ b/gtk/inspector/recorder.ui
@@ -6,14 +6,11 @@
<property name="orientation">vertical</property>
<child>
<object class="GtkBox">
- <property name="spacing">6</property>
- <property name="margin-start">6</property>
- <property name="margin-end">6</property>
- <property name="margin-top">6</property>
- <property name="margin-bottom">6</property>
+ <style>
+ <class name="toolbar"/>
+ </style>
<child>
<object class="GtkToggleButton">
- <property name="has-frame">0</property>
<property name="icon-name">media-record-symbolic</property>
<property name="tooltip-text" translatable="yes">Record frames</property>
<property name="active" bind-source="GtkInspectorRecorder" bind-property="recording"
bind-flags="bidirectional|sync-create"/>
@@ -21,7 +18,6 @@
</child>
<child>
<object class="GtkButton">
- <property name="has-frame">0</property>
<property name="icon-name">edit-clear-all-symbolic</property>
<property name="tooltip-text" translatable="yes">Clear recorded frames</property>
<signal name="clicked" handler="recordings_clear_all"/>
@@ -29,7 +25,6 @@
</child>
<child>
<object class="GtkToggleButton">
- <property name="has-frame">0</property>
<property name="icon-name">insert-object-symbolic</property>
<property name="tooltip-text" translatable="yes">Add debug nodes</property>
<property name="active" bind-source="GtkInspectorRecorder" bind-property="debug-nodes"
bind-flags="bidirectional|sync-create"/>
@@ -39,7 +34,6 @@
</child>
<child>
<object class="GtkToggleButton" id="dark_mode_button">
- <property name="has-frame">0</property>
<property name="icon-name">display-brightness-symbolic</property>
<property name="tooltip-text" translatable="yes">Use a dark background</property>
<signal name="notify::active" handler="toggle_dark_mode" swapped="0"
object="render_node_view"/>
@@ -47,7 +41,6 @@
</child>
<child>
<object class="GtkButton" id="render_node_save_button">
- <property name="has-frame">0</property>
<property name="sensitive">0</property>
<property name="icon-name">document-save-as-symbolic</property>
<property name="tooltip-text" translatable="yes">Save selected node</property>
@@ -56,7 +49,6 @@
</child>
<child>
<object class="GtkButton" id="render_node_clip_button">
- <property name="has-frame">0</property>
<property name="sensitive">0</property>
<property name="icon-name">edit-copy-symbolic</property>
<property name="tooltip-text" translatable="yes">Copy to clipboard</property>
diff --git a/gtk/inspector/tree-data.ui b/gtk/inspector/tree-data.ui
index 84fe5acd6f..d06c228136 100644
--- a/gtk/inspector/tree-data.ui
+++ b/gtk/inspector/tree-data.ui
@@ -2,14 +2,11 @@
<template class="GtkInspectorTreeData" parent="GtkWidget">
<child>
<object class="GtkBox">
- <property name="spacing">6</property>
- <property name="margin-start">6</property>
- <property name="margin-end">6</property>
- <property name="margin-top">6</property>
- <property name="margin-bottom">6</property>
+ <style>
+ <class name="toolbar"/>
+ </style>
<child>
<object class="GtkToggleButton" id="show_button">
- <property name="has-frame">0</property>
<property name="tooltip-text" translatable="yes">Show data</property>
<property name="icon-name">view-refresh-symbolic</property>
<signal name="toggled" handler="toggle_show"/>
diff --git a/gtk/inspector/window.ui b/gtk/inspector/window.ui
index 52ba9f065a..c56f941bdd 100644
--- a/gtk/inspector/window.ui
+++ b/gtk/inspector/window.ui
@@ -214,16 +214,13 @@
<object class="GtkCenterBox">
<child type="start">
<object class="GtkBox">
+ <style>
+ <class name="toolbar"/>
+ </style>
<child>
<object class="GtkToggleButton" id="sidebar_toggle">
<property name="icon-name">open-menu-symbolic</property>
<property name="tooltip-text" translatable="yes">Toggle
Sidebar</property>
- <property name="margin-start">6</property>
- <property name="margin-end">6</property>
- <property name="margin-top">6</property>
- <property name="margin-bottom">6</property>
- <property name="halign">center</property>
- <property name="valign">center</property>
<property name="active">1</property>
</object>
</child>
@@ -244,13 +241,8 @@
<property name="name">actions</property>
<property name="child">
<object class="GtkButton" id="refresh_actions_button">
- <property name="margin-start">6</property>
- <property name="margin-end">6</property>
- <property name="margin-top">6</property>
- <property name="margin-bottom">6</property>
<property name="icon-name">view-refresh-symbolic</property>
<property name="tooltip-text" translatable="yes">Refresh
action state</property>
- <property name="has-frame">0</property>
</object>
</property>
</object>
@@ -260,10 +252,6 @@
<property name="name">magnifier</property>
<property name="child">
<object class="GtkScale">
- <property name="margin-start">6</property>
- <property name="margin-end">6</property>
- <property name="margin-top">6</property>
- <property name="margin-bottom">6</property>
<property name="width-request">150</property>
<property name="draw-value">0</property>
<property
name="adjustment">magnification_adjustment</property>
@@ -302,11 +290,8 @@
<property name="name">prop-search</property>
<property name="child">
<object class="GtkSearchEntry" id="prop_search_entry">
- <property name="margin-start">6</property>
- <property name="margin-end">6</property>
- <property name="margin-top">6</property>
- <property name="margin-bottom">6</property>
<property name="max-width-chars">40</property>
+ <property name="valign">center</property>
</object>
</property>
</object>
@@ -316,10 +301,6 @@
<property name="name">layout-prop-search</property>
<property name="child">
<object class="GtkSearchEntry" id="layout_prop_search_entry">
- <property name="margin-start">6</property>
- <property name="margin-end">6</property>
- <property name="margin-top">6</property>
- <property name="margin-bottom">6</property>
<property name="max-width-chars">40</property>
</object>
</property>
@@ -329,15 +310,13 @@
</child>
<child type="end">
<object class="GtkBox">
- <property name="margin-start">6</property>
- <property name="margin-end">6</property>
+ <style>
+ <class name="toolbar"/>
+ </style>
<child>
<object class="GtkButton" id="go_up_button">
<property name="icon-name">go-up-symbolic</property>
<property name="tooltip-text" translatable="yes">Previous
object</property>
- <property name="has-frame">0</property>
- <property name="halign">center</property>
- <property name="valign">center</property>
<signal name="clicked" handler="go_up_cb"/>
</object>
</child>
@@ -345,9 +324,6 @@
<object class="GtkButton" id="go_down_button">
<property name="icon-name">go-down-symbolic</property>
<property name="tooltip-text" translatable="yes">Child
object</property>
- <property name="has-frame">0</property>
- <property name="halign">center</property>
- <property name="valign">center</property>
<signal name="clicked" handler="go_down_cb"/>
</object>
</child>
@@ -355,9 +331,6 @@
<object class="GtkButton" id="go_previous_button">
<property name="icon-name">go-previous-symbolic</property>
<property name="tooltip-text" translatable="yes">Previous
sibling</property>
- <property name="has-frame">0</property>
- <property name="halign">center</property>
- <property name="valign">center</property>
<signal name="clicked" handler="go_previous_cb"/>
</object>
</child>
@@ -370,9 +343,6 @@
<object class="GtkButton" id="go_next_button">
<property name="icon-name">go-next-symbolic</property>
<property name="tooltip-text" translatable="yes">Next
sibling</property>
- <property name="has-frame">0</property>
- <property name="halign">center</property>
- <property name="valign">center</property>
<signal name="clicked" handler="go_next_cb"/>
</object>
</child>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]