Merge branch 'wip/exalm/polish' into 'master'

A few inspector papercut fixes

See merge request GNOME/gtk!4092
This commit is contained in:
Matthias Clasen 2021-10-24 19:04:48 +00:00
commit c953e3cc0f
8 changed files with 52 additions and 111 deletions

View File

@ -182,6 +182,7 @@ gtk_inspector_controllers_init (GtkInspectorControllers *self)
g_signal_connect (factory, "bind", G_CALLBACK (bind_name), NULL);
column = gtk_column_view_column_new ("Name", factory);
gtk_column_view_column_set_expand (column, TRUE);
gtk_column_view_append_column (GTK_COLUMN_VIEW (self->view), column);
g_object_unref (column);

View File

@ -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"/>
@ -45,6 +41,9 @@
</child>
</object>
</child>
<child>
<object class="GtkSeparator"/>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="hscrollbar-policy">never</property>
@ -57,6 +56,8 @@
<property name="monospace">1</property>
<property name="left-margin">6</property>
<property name="right-margin">6</property>
<property name="top-margin">6</property>
<property name="bottom-margin">6</property>
<property name="has-tooltip">1</property>
<signal name="query-tooltip" handler="query_tooltip_cb"/>
</object>

View File

@ -1,57 +1,29 @@
/* some style for the inspector */
.list header {
background: white;
border: 1px solid lightgray;
}
.list header button {
background: none;
}
.list header button.dnd {
background: gray;
}
.list header>* {
padding: 2px;
font-weight: bold;
}
.list header sort_indicator {
min-width: 16px;
}
.list header>*:not(:last-child) {
border-right: 1px solid lightgray;
}
.list .cell {
.list cell {
font-size: smaller;
padding: 0 2px;
padding-top: 1px;
padding-bottom: 1px;
min-height: 24px;
}
.list .cell entry,
.list .cell spinbutton,
.list .cell button,
.list .cell dropdown
.list .cell combobox {
.list cell entry,
.list cell spinbutton,
.list cell button,
.list cell dropdown
.list cell combobox {
min-height: 24px;
min-width: 0;
}
.list .cell entry,
.list .cell button,
.list .cell dropdown
.list .cell combobox {
.list cell entry,
.list cell spinbutton text,
.list cell button,
.list cell dropdown
.list cell combobox {
padding: 0 4px;
}
stacksidebar.object-details {
border-top: 1px solid lightgray;
}
picture.dark {
background: gray;
}

View File

@ -17,6 +17,7 @@
<object class="GtkColumnView" id="list">
<style>
<class name="data-table"/>
<class name="list"/>
</style>
<child>
<object class="GtkColumnViewColumn" id="name">

View File

@ -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>
@ -77,9 +69,6 @@
<object class="GtkScrolledWindow">
<property name="hscrollbar-policy">never</property>
<property name="propagate-natural-width">1</property>
<style>
<class name="sidebar"/>
</style>
<child>
<object class="GtkListBox" id="recordings_list">
<property name="vexpand">1</property>
@ -88,13 +77,13 @@
</child>
</object>
</child>
<child>
<object class="GtkSeparator"/>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="hscrollbar-policy">never</property>
<property name="propagate-natural-width">1</property>
<style>
<class name="sidebar"/>
</style>
<child>
<object class="GtkListView" id="render_node_list">
<property name="vexpand">1</property>
@ -103,6 +92,9 @@
</child>
</object>
</child>
<child>
<object class="GtkSeparator"/>
</child>
<child>
<object class="GtkPaned" id="render_paned">
<property name="orientation">vertical</property>

View File

@ -201,6 +201,10 @@
<object class="GtkTextView">
<property name="editable">0</property>
<property name="buffer">buffer</property>
<property name="left-margin">6</property>
<property name="right-margin">6</property>
<property name="top-margin">6</property>
<property name="bottom-margin">6</property>
</object>
</child>
</object>

View File

@ -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"/>

View File

@ -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,24 +331,21 @@
<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>
<child>
<object class="GtkLabel" id="list_position_label">
<property name="tooltip-text" translatable="yes">List Position</property>
<attributes>
<attribute name="font-features" value="tnum=1"/>
</attributes>
</object>
</child>
<child>
<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>
@ -380,6 +353,9 @@
</child>
</object>
</child>
<child>
<object class="GtkSeparator"/>
</child>
<child>
<object class="GtkBox">
<child>
@ -389,9 +365,6 @@
<child>
<object class="GtkStackSidebar">
<property name="stack">object_details</property>
<style>
<class name="object-details"/>
</style>
</object>
</child>
</object>