summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2023-04-21 07:58:08 +0000
committerMatthias Clasen <mclasen@redhat.com>2023-04-21 07:58:08 +0000
commitf0f122898244589ee194c299eb6fc44d5ae8e0aa (patch)
treee9947d57b8c0887ac2326b3324939a6887df0724
parenta6010b40f231d57a3604248fef81b9c483564889 (diff)
parentb03f21193bfea6d88ceea64d019edaeb071259a4 (diff)
downloadgtk+-f0f122898244589ee194c299eb6fc44d5ae8e0aa.tar.gz
Merge branch 'backports-for-4-10' into 'gtk-4-10'
Accumulated backports for 4.10 This branch has my cherry-picks from main since we branched after 4.10.1. Two inscription reftests are failing, but they were also failing before. See merge request GNOME/gtk!5856
-rw-r--r--demos/gtk-demo/demo3widget.c7
-rw-r--r--demos/gtk-demo/listbox_controls.ui398
-rw-r--r--demos/gtk-demo/paint.c34
-rw-r--r--demos/gtk-demo/transparent.c2
-rw-r--r--demos/node-editor/node-editor-window.c31
-rw-r--r--demos/node-editor/node-editor-window.ui6
-rw-r--r--docs/reference/gtk/broadway.md17
-rw-r--r--docs/reference/gtk/input-handling.md6
-rw-r--r--docs/reference/gtk/question_index.md13
-rw-r--r--gdk/broadway/broadway-server.c8
-rw-r--r--gdk/broadway/broadway-server.h3
-rw-r--r--gdk/broadway/broadwayd.c5
-rw-r--r--gdk/gdkdisplay.c2
-rw-r--r--gdk/gdkdisplayprivate.h1
-rw-r--r--gdk/gdkglcontext.c14
-rw-r--r--gdk/gdkglcontextprivate.h7
-rw-r--r--gdk/gdktoplevel.c11
-rw-r--r--gdk/wayland/gdkprimary-wayland.c15
-rw-r--r--gdk/wayland/gdksurface-wayland.c4
-rw-r--r--gdk/win32/gdkdisplay-win32.c1
-rw-r--r--gdk/win32/gdkglcontext-win32-egl.c7
-rw-r--r--gdk/x11/gdkglcontext-glx.c2
-rw-r--r--gsk/gl/gskglcommandqueue.c10
-rw-r--r--gsk/gl/gskgldriver.c2
-rw-r--r--gsk/gl/gskglrenderer.c6
-rw-r--r--gsk/gl/gskglrenderjob.c68
-rw-r--r--gtk/a11y/gtkatspicontext.c3
-rw-r--r--gtk/a11y/gtkatspiutils.c2
-rw-r--r--gtk/gskpango.c3
-rw-r--r--gtk/gtkaccessible.c1
-rw-r--r--gtk/gtkactionmuxer.c2
-rw-r--r--gtk/gtkactionmuxerprivate.h2
-rw-r--r--gtk/gtkalertdialog.c3
-rw-r--r--gtk/gtkbutton.c6
-rw-r--r--gtk/gtkcheckbutton.c12
-rw-r--r--gtk/gtkcolordialog.c3
-rw-r--r--gtk/gtkentry.c2
-rw-r--r--gtk/gtkexpander.c8
-rw-r--r--gtk/gtkfilechooserentry.c29
-rw-r--r--gtk/gtkfiledialog.c15
-rw-r--r--gtk/gtkflowbox.c2
-rw-r--r--gtk/gtkfontdialog.c11
-rw-r--r--gtk/gtkgestureclick.c10
-rw-r--r--gtk/gtkgesturestylus.c2
-rw-r--r--gtk/gtklabel.c59
-rw-r--r--gtk/gtklinkbutton.c57
-rw-r--r--gtk/gtklistbox.c5
-rw-r--r--gtk/gtklistitem.c2
-rw-r--r--gtk/gtkmagnifier.c22
-rw-r--r--gtk/gtkmain.c2
-rw-r--r--gtk/gtkmediacontrols.c12
-rw-r--r--gtk/gtkopenuriportal.c6
-rw-r--r--gtk/gtkpopover.c46
-rw-r--r--gtk/gtkrange.c2
-rw-r--r--gtk/gtkrendernodepaintable.c4
-rw-r--r--gtk/gtkscalebutton.c49
-rw-r--r--gtk/gtkscrolledwindow.c5
-rw-r--r--gtk/gtksnapshot.c9
-rw-r--r--gtk/gtktext.c47
-rw-r--r--gtk/gtktexthandle.c17
-rw-r--r--gtk/gtktextiter.c34
-rw-r--r--gtk/gtktextview.c63
-rw-r--r--gtk/gtktooltipwindow.c2
-rw-r--r--gtk/gtkwidget.c11
-rw-r--r--gtk/gtkwindow.c2
-rw-r--r--gtk/inspector/action-editor.c133
-rw-r--r--gtk/inspector/action-editor.h4
-rw-r--r--gtk/inspector/action-holder.c17
-rw-r--r--gtk/inspector/action-holder.h1
-rw-r--r--gtk/inspector/actions.c304
-rw-r--r--gtk/inspector/actions.ui3
-rw-r--r--gtk/inspector/clipboard.ui157
-rw-r--r--gtk/inspector/general.c6
-rw-r--r--gtk/inspector/general.ui1135
-rw-r--r--gtk/inspector/misc-info.c6
-rw-r--r--gtk/inspector/misc-info.ui1071
-rw-r--r--gtk/inspector/variant-editor.c38
-rw-r--r--gtk/inspector/visual.ui1065
-rw-r--r--gtk/theme/Default/_common.scss36
-rw-r--r--gtk/ui/gtkmediacontrols.ui1
-rw-r--r--gtk/ui/gtkprintunixdialog.ui3
-rw-r--r--po/POTFILES.in1
-rw-r--r--testsuite/gtk/builder.c2
-rw-r--r--testsuite/gtk/meson.build1
-rw-r--r--testsuite/gtk/shortcuts.c1
-rw-r--r--testsuite/gtk/test-focus-chain.c14
86 files changed, 2824 insertions, 2427 deletions
diff --git a/demos/gtk-demo/demo3widget.c b/demos/gtk-demo/demo3widget.c
index 147ccf571d..e2ddf744e1 100644
--- a/demos/gtk-demo/demo3widget.c
+++ b/demos/gtk-demo/demo3widget.c
@@ -224,7 +224,14 @@ demo3_widget_set_property (GObject *object,
case PROP_TEXTURE:
g_clear_object (&self->texture);
self->texture = g_value_dup_object (value);
+ self->scale = 1.f;
+ self->angle = 0.f;
+ self->filter = GSK_SCALING_FILTER_LINEAR;
+ update_actions (self);
gtk_widget_queue_resize (GTK_WIDGET (object));
+ g_object_notify (object, "scale");
+ g_object_notify (object, "angle");
+ g_object_notify (object, "filter");
break;
case PROP_SCALE:
diff --git a/demos/gtk-demo/listbox_controls.ui b/demos/gtk-demo/listbox_controls.ui
index c2c8a1f1cf..ab4419e54d 100644
--- a/demos/gtk-demo/listbox_controls.ui
+++ b/demos/gtk-demo/listbox_controls.ui
@@ -30,90 +30,86 @@
</object>
</child>
<child>
- <object class="GtkFrame">
- <child>
- <object class="GtkListBox">
- <property name="selection-mode">none</property>
- <property name="show-separators">1</property>
- <signal name="row-activated" handler="row_activated"/>
- <style>
- <class name="rich-list"/>
- </style>
+ <object class="GtkListBox">
+ <property name="selection-mode">none</property>
+ <signal name="row-activated" handler="row_activated"/>
+ <style>
+ <class name="rich-list"/>
+ <class name="boxed-list"/>
+ </style>
+ <child>
+ <object class="GtkListBoxRow">
<child>
- <object class="GtkListBoxRow">
+ <object class="GtkBox">
+ <child>
+ <object class="GtkLabel" id="switch_label">
+ <property name="label" translatable="yes">Switch</property>
+ <property name="xalign">0</property>
+ <property name="halign">start</property>
+ <property name="valign">center</property>
+ <property name="hexpand">1</property>
+ </object>
+ </child>
<child>
- <object class="GtkBox">
- <child>
- <object class="GtkLabel" id="switch_label">
- <property name="label" translatable="yes">Switch</property>
- <property name="xalign">0</property>
- <property name="halign">start</property>
- <property name="valign">center</property>
- <property name="hexpand">1</property>
- </object>
- </child>
- <child>
- <object class="GtkSwitch" id="switch">
- <property name="halign">end</property>
- <property name="valign">center</property>
- </object>
- </child>
+ <object class="GtkSwitch" id="switch">
+ <property name="halign">end</property>
+ <property name="valign">center</property>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow">
<child>
- <object class="GtkListBoxRow">
+ <object class="GtkBox">
+ <child>
+ <object class="GtkLabel" id="check_label">
+ <property name="label" translatable="yes">Check</property>
+ <property name="xalign">0</property>
+ <property name="halign">start</property>
+ <property name="valign">center</property>
+ <property name="hexpand">1</property>
+ </object>
+ </child>
<child>
- <object class="GtkBox">
- <child>
- <object class="GtkLabel" id="check_label">
- <property name="label" translatable="yes">Check</property>
- <property name="xalign">0</property>
- <property name="halign">start</property>
- <property name="valign">center</property>
- <property name="hexpand">1</property>
- </object>
- </child>
- <child>
- <object class="GtkCheckButton" id="check">
- <property name="halign">end</property>
- <property name="valign">center</property>
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="active">1</property>
- </object>
- </child>
+ <object class="GtkCheckButton" id="check">
+ <property name="halign">end</property>
+ <property name="valign">center</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="active">1</property>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow">
<child>
- <object class="GtkListBoxRow">
+ <object class="GtkBox">
+ <child>
+ <object class="GtkLabel" id="image_label">
+ <property name="label" translatable="yes">Click here!</property>
+ <property name="xalign">0</property>
+ <property name="halign">start</property>
+ <property name="valign">center</property>
+ <property name="hexpand">1</property>
+ </object>
+ </child>
<child>
- <object class="GtkBox">
- <child>
- <object class="GtkLabel" id="image_label">
- <property name="label" translatable="yes">Click here!</property>
- <property name="xalign">0</property>
- <property name="halign">start</property>
- <property name="valign">center</property>
- <property name="hexpand">1</property>
- </object>
- </child>
- <child>
- <object class="GtkImage" id="image">
- <property name="icon-name">object-select-symbolic</property>
- <property name="halign">end</property>
- <property name="valign">center</property>
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="opacity">0</property>
- </object>
- </child>
+ <object class="GtkImage" id="image">
+ <property name="icon-name">object-select-symbolic</property>
+ <property name="halign">end</property>
+ <property name="valign">center</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="opacity">0</property>
</object>
</child>
</object>
@@ -134,146 +130,142 @@
</style>
</object>
</child>
- <child>
- <object class="GtkFrame">
- <child>
- <object class="GtkListBox">
- <property name="selection-mode">none</property>
- <property name="show-separators">1</property>
- <style>
- <class name="rich-list"/>
- </style>
+ <child>
+ <object class="GtkListBox">
+ <property name="selection-mode">none</property>
+ <style>
+ <class name="rich-list"/>
+ <class name="boxed-list"/>
+ </style>
- <child>
- <object class="GtkListBoxRow">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <child>
- <object class="GtkLabel" id="scale_label">
- <property name="label" translatable="yes">Scale</property>
- <property name="xalign">0</property>
- <property name="halign">start</property>
- <property name="valign">center</property>
- <property name="hexpand">1</property>
- </object>
- </child>
- <child>
- <object class="GtkScale">
- <property name="halign">end</property>
- <property name="valign">center</property>
- <property name="draw-value">0</property>
- <property name="width-request">150</property>
- <property name="adjustment">
- <object class="GtkAdjustment">
- <property name="upper">100</property>
- <property name="value">50</property>
- <property name="step-increment">1</property>
- <property name="page-increment">10</property>
- </object>
- </property>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
+ <child>
+ <object class="GtkListBoxRow">
+ <property name="activatable">0</property>
+ <child>
+ <object class="GtkBox">
+ <child>
+ <object class="GtkLabel" id="scale_label">
+ <property name="label" translatable="yes">Scale</property>
+ <property name="xalign">0</property>
+ <property name="halign">start</property>
+ <property name="valign">center</property>
+ <property name="hexpand">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkScale">
+ <property name="halign">end</property>
+ <property name="valign">center</property>
+ <property name="draw-value">0</property>
+ <property name="width-request">150</property>
+ <property name="adjustment">
+ <object class="GtkAdjustment">
+ <property name="upper">100</property>
+ <property name="value">50</property>
+ <property name="step-increment">1</property>
+ <property name="page-increment">10</property>
+ </object>
+ </property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
- <child>
- <object class="GtkListBoxRow">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <child>
- <object class="GtkLabel" id="spin_label">
- <property name="label" translatable="yes">Spinbutton</property>
- <property name="xalign">0</property>
- <property name="halign">start</property>
- <property name="valign">center</property>
- <property name="hexpand">1</property>
- </object>
- </child>
- <child>
- <object class="GtkSpinButton">
- <property name="halign">end</property>
- <property name="valign">center</property>
- <property name="adjustment">
- <object class="GtkAdjustment">
- <property name="upper">100</property>
- <property name="value">50</property>
- <property name="step-increment">1</property>
- <property name="page-increment">10</property>
- </object>
- </property>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child>
- <object class="GtkListBoxRow">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <child>
- <object class="GtkLabel" id="dropdown_label">
- <property name="label" translatable="yes">Dropdown</property>
- <property name="xalign">0</property>
- <property name="halign">start</property>
- <property name="valign">center</property>
- <property name="hexpand">1</property>
- </object>
- </child>
- <child>
- <object class="GtkDropDown">
- <property name="halign">end</property>
- <property name="valign">center</property>
- <property name="model">
- <object class="GtkStringList">
- <items>
- <item>Choice 1</item>
- <item>Choice 2</item>
- <item>Choice 3</item>
- <item>Choice 4</item>
- </items>
- </object>
- </property>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
+ <child>
+ <object class="GtkListBoxRow">
+ <property name="activatable">0</property>
+ <child>
+ <object class="GtkBox">
+ <child>
+ <object class="GtkLabel" id="spin_label">
+ <property name="label" translatable="yes">Spinbutton</property>
+ <property name="xalign">0</property>
+ <property name="halign">start</property>
+ <property name="valign">center</property>
+ <property name="hexpand">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSpinButton">
+ <property name="halign">end</property>
+ <property name="valign">center</property>
+ <property name="adjustment">
+ <object class="GtkAdjustment">
+ <property name="upper">100</property>
+ <property name="value">50</property>
+ <property name="step-increment">1</property>
+ <property name="page-increment">10</property>
+ </object>
+ </property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow">
+ <property name="activatable">0</property>
+ <child>
+ <object class="GtkBox">
+ <child>
+ <object class="GtkLabel" id="dropdown_label">
+ <property name="label" translatable="yes">Dropdown</property>
+ <property name="xalign">0</property>
+ <property name="halign">start</property>
+ <property name="valign">center</property>
+ <property name="hexpand">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkDropDown">
+ <property name="halign">end</property>
+ <property name="valign">center</property>
+ <property name="model">
+ <object class="GtkStringList">
+ <items>
+ <item>Choice 1</item>
+ <item>Choice 2</item>
+ <item>Choice 3</item>
+ <item>Choice 4</item>
+ </items>
+ </object>
+ </property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
- <child>
- <object class="GtkListBoxRow">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <child>
- <object class="GtkLabel" id="entry_label">
- <property name="label" translatable="yes">Entry</property>
- <property name="xalign">0</property>
- <property name="halign">start</property>
- <property name="valign">center</property>
- <property name="hexpand">1</property>
- </object>
- </child>
- <child>
- <object class="GtkEntry">
- <property name="halign">end</property>
- <property name="valign">center</property>
- <property name="placeholder-text">Type here…</property>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
+ <child>
+ <object class="GtkListBoxRow">
+ <property name="activatable">0</property>
+ <child>
+ <object class="GtkBox">
+ <child>
+ <object class="GtkLabel" id="entry_label">
+ <property name="label" translatable="yes">Entry</property>
+ <property name="xalign">0</property>
+ <property name="halign">start</property>
+ <property name="valign">center</property>
+ <property name="hexpand">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkEntry">
+ <property name="halign">end</property>
+ <property name="valign">center</property>
+ <property name="placeholder-text">Type here…</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
- </object>
- </child>
</object>
</child>
</object>
diff --git a/demos/gtk-demo/paint.c b/demos/gtk-demo/paint.c
index 1696ca8e99..b9fb350215 100644
--- a/demos/gtk-demo/paint.c
+++ b/demos/gtk-demo/paint.c
@@ -24,6 +24,7 @@ typedef struct
GdkRGBA draw_color;
GtkPadController *pad_controller;
double brush_size;
+ GtkGesture *gesture;
} DrawingArea;
typedef struct
@@ -262,7 +263,7 @@ drawing_area_apply_stroke (DrawingArea *area,
double y,
double pressure)
{
- if (gdk_device_tool_get_tool_type (tool) == GDK_DEVICE_TOOL_TYPE_ERASER)
+ if (tool && gdk_device_tool_get_tool_type (tool) == GDK_DEVICE_TOOL_TYPE_ERASER)
{
cairo_set_line_width (area->cr, 10 * pressure * area->brush_size);
cairo_set_operator (area->cr, CAIRO_OPERATOR_DEST_OUT);
@@ -313,7 +314,9 @@ stylus_gesture_motion (GtkGestureStylus *gesture,
drawing_area_apply_stroke (area, tool,
backlog[i].axes[GDK_AXIS_X],
backlog[i].axes[GDK_AXIS_Y],
- backlog[i].axes[GDK_AXIS_PRESSURE]);
+ backlog[i].flags & GDK_AXIS_FLAG_PRESSURE
+ ? backlog[i].axes[GDK_AXIS_PRESSURE]
+ : 1);
}
g_free (backlog);
@@ -343,6 +346,8 @@ drawing_area_init (DrawingArea *area)
area->draw_color = (GdkRGBA) { 0, 0, 0, 1 };
area->brush_size = 1;
+
+ area->gesture = gesture;
}
static GtkWidget *
@@ -381,6 +386,12 @@ drawing_area_color_set (DrawingArea *area,
gtk_color_dialog_button_set_rgba (button, color);
}
+static GtkGesture *
+drawing_area_get_gesture (DrawingArea *area)
+{
+ return area->gesture;
+}
+
GtkWidget *
do_paint (GtkWidget *toplevel)
{
@@ -388,7 +399,7 @@ do_paint (GtkWidget *toplevel)
if (!window)
{
- GtkWidget *draw_area, *headerbar, *colorbutton;
+ GtkWidget *draw_area, *headerbar, *button;
window = gtk_window_new ();
@@ -397,15 +408,22 @@ do_paint (GtkWidget *toplevel)
headerbar = gtk_header_bar_new ();
- colorbutton = gtk_color_dialog_button_new (gtk_color_dialog_new ());
- g_signal_connect (colorbutton, "notify::rgba",
+ button = gtk_color_dialog_button_new (gtk_color_dialog_new ());
+ g_signal_connect (button, "notify::rgba",
G_CALLBACK (color_button_color_set), draw_area);
g_signal_connect (draw_area, "color-set",
- G_CALLBACK (drawing_area_color_set), colorbutton);
- gtk_color_dialog_button_set_rgba (GTK_COLOR_DIALOG_BUTTON (colorbutton),
+ G_CALLBACK (drawing_area_color_set), button);
+ gtk_color_dialog_button_set_rgba (GTK_COLOR_DIALOG_BUTTON (button),
&(GdkRGBA) { 0, 0, 0, 1 });
- gtk_header_bar_pack_end (GTK_HEADER_BAR (headerbar), colorbutton);
+ gtk_header_bar_pack_end (GTK_HEADER_BAR (headerbar), button);
+
+ button = gtk_check_button_new_with_label ("Stylus only");
+ g_object_bind_property (button, "active",
+ drawing_area_get_gesture ((DrawingArea *)draw_area), "stylus-only",
+ G_BINDING_SYNC_CREATE);
+ gtk_header_bar_pack_start (GTK_HEADER_BAR (headerbar), button);
+
gtk_window_set_titlebar (GTK_WINDOW (window), headerbar);
gtk_window_set_title (GTK_WINDOW (window), "Paint");
g_object_add_weak_pointer (G_OBJECT (window), (gpointer *)&window);
diff --git a/demos/gtk-demo/transparent.c b/demos/gtk-demo/transparent.c
index 10d9e81da0..626ef2c43d 100644
--- a/demos/gtk-demo/transparent.c
+++ b/demos/gtk-demo/transparent.c
@@ -1,5 +1,5 @@
/* Overlay/Transparency
- * #Keywords: GtkOverlay, GtkSnapshot
+ * #Keywords: GtkOverlay, GtkSnapshot, blur
*
* Blur the background behind an overlay.
*/
diff --git a/demos/node-editor/node-editor-window.c b/demos/node-editor/node-editor-window.c
index 3fe3d818c7..9eb5fcfac6 100644
--- a/demos/node-editor/node-editor-window.c
+++ b/demos/node-editor/node-editor-window.c
@@ -174,6 +174,7 @@ text_changed (GtkTextBuffer *buffer,
GtkTextIter iter;
GtkTextIter start, end;
float scale;
+ GskRenderNode *big_node;
g_array_remove_range (self->errors, 0, self->errors->len);
text = get_current_text (self->text_buffer);
@@ -186,13 +187,18 @@ text_changed (GtkTextBuffer *buffer,
self->node = gsk_render_node_deserialize (bytes, deserialize_error_func, self);
scale = gtk_scale_button_get_value (GTK_SCALE_BUTTON (self->scale_scale));
- if (self->node && scale != 1.0)
+ if (self->node && scale != 0.)
{
- GskRenderNode *node;
-
- node = gsk_transform_node_new (self->node, gsk_transform_scale (NULL, scale, scale));
- gsk_render_node_unref (self->node);
- self->node = node;
+ scale = pow (2., scale);
+ big_node = gsk_transform_node_new (self->node, gsk_transform_scale (NULL, scale, scale));
+ }
+ else if (self->node)
+ {
+ big_node = gsk_render_node_ref (self->node);
+ }
+ else
+ {
+ big_node = NULL;
}
g_bytes_unref (bytes);
@@ -205,17 +211,26 @@ text_changed (GtkTextBuffer *buffer,
guint i;
snapshot = gtk_snapshot_new ();
+ gsk_render_node_get_bounds (big_node, &bounds);
+ gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT (- bounds.origin.x, - bounds.origin.y));
+ gtk_snapshot_append_node (snapshot, big_node);
+ paintable = gtk_snapshot_free_to_paintable (snapshot, &bounds.size);
+ gtk_picture_set_paintable (GTK_PICTURE (self->picture), paintable);
+ g_clear_object (&paintable);
+
+ snapshot = gtk_snapshot_new ();
gsk_render_node_get_bounds (self->node, &bounds);
gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT (- bounds.origin.x, - bounds.origin.y));
gtk_snapshot_append_node (snapshot, self->node);
paintable = gtk_snapshot_free_to_paintable (snapshot, &bounds.size);
- gtk_picture_set_paintable (GTK_PICTURE (self->picture), paintable);
+
for (i = 0; i < g_list_model_get_n_items (G_LIST_MODEL (self->renderers)); i++)
{
gpointer item = g_list_model_get_item (G_LIST_MODEL (self->renderers), i);
gtk_renderer_paintable_set_paintable (item, paintable);
g_object_unref (item);
}
+
g_clear_object (&paintable);
}
else
@@ -223,6 +238,8 @@ text_changed (GtkTextBuffer *buffer,
gtk_picture_set_paintable (GTK_PICTURE (self->picture), NULL);
}
+ g_clear_pointer (&big_node, gsk_render_node_unref);
+
gtk_text_buffer_get_start_iter (self->text_buffer, &iter);
while (!gtk_text_iter_is_end (&iter))
diff --git a/demos/node-editor/node-editor-window.ui b/demos/node-editor/node-editor-window.ui
index 34d4452a4a..45a37cd952 100644
--- a/demos/node-editor/node-editor-window.ui
+++ b/demos/node-editor/node-editor-window.ui
@@ -163,9 +163,9 @@
<property name="valign">center</property>
<property name="adjustment">
<object class="GtkAdjustment">
- <property name="lower">1</property>
- <property name="value">1</property>
- <property name="upper">10</property>
+ <property name="lower">-4</property>
+ <property name="value">0</property>
+ <property name="upper">4</property>
<property name="step-increment">0.1</property>
<property name="page-increment">0.5</property>
</object>
diff --git a/docs/reference/gtk/broadway.md b/docs/reference/gtk/broadway.md
index 99987845cf..6877dd0c02 100644
--- a/docs/reference/gtk/broadway.md
+++ b/docs/reference/gtk/broadway.md
@@ -6,22 +6,15 @@ Slug: broadway
The GDK Broadway backend provides support for displaying GTK applications in
a web browser, using HTML5 and web sockets.
-To run your application in this way, select the Broadway backend by setting
-`GDK_BACKEND=broadway`. Then you can make your application appear in a web
-browser by pointing it at `http://127.0.0.1:8080`. Note that you need to
-enable web sockets in your web browser.
-
-You can choose a different port from the default 8080 by setting the
-`BROADWAY_DISPLAY` environment variable to the port that you want to use.
-
-It is also possible to use multiple GTK applications in the same web browser
-window, by using the Broadway server, `gtk4-broadwayd`, that ships with GTK.
-To start the Broadway server use:
+To run your application in this way, first run the broadway server,
+`gtk-broadwayd`, that ships with GTK:
```
gtk4-broadwayd :5
```
+The server expects the colon-prefixed display number as a commandline argument.
+
Then point your web browser at `http://127.0.0.1:8085`.
Once the Broadway server is running, you can start your applications like
@@ -31,6 +24,8 @@ this:
GDK_BACKEND=broadway BROADWAY_DISPLAY=:5 gtk4-demo
```
+Multiple applications can be presented in the same web browser window.
+
## Broadway-specific environment variables
### `BROADWAY_DISPLAY`
diff --git a/docs/reference/gtk/input-handling.md b/docs/reference/gtk/input-handling.md
index bc40e5d12d..59983f092d 100644
--- a/docs/reference/gtk/input-handling.md
+++ b/docs/reference/gtk/input-handling.md
@@ -103,14 +103,14 @@ fields, but e.g. buttons can take the focus too.
Input widgets can be given the focus by clicking on them, but focus
can also be moved around with certain key events (this is known as
-“keyboard navigation”). GTK reserves the Tab key to move the focus
-to the next location, and Shift-Tab to move it back to the previous
+“keyboard navigation”). GTK reserves the <kbd>Tab</kbd> key to move the focus
+to the next location, and <kbd>Shift</kbd>+<kbd>Tab</kbd> to move it back to the previous
one. In addition many containers allow “directional navigation” with
the arrow keys.
Many widgets can be “activated” to trigger and action. E.g., you can
activate a button or switch by clicking on them, but you can also
-activate them with the keyboard, by using the Enter or Space keys.
+activate them with the keyboard, by using the <kbd>Enter</kbd> or <kbd>␣</kbd> keys.
Apart from keyboard navigation, activation and directly typing into
entries or text views, GTK widgets can use key events for activating
diff --git a/docs/reference/gtk/question_index.md b/docs/reference/gtk/question_index.md
index 44a65f8800..8355613780 100644
--- a/docs/reference/gtk/question_index.md
+++ b/docs/reference/gtk/question_index.md
@@ -263,10 +263,13 @@ the question you have, this list is a good place to start.
* How do I load an image or animation from a file?
To load an image file straight into a display widget, use
- [ctor@Gtk.Picture.new_for_file] or [ctor@GTk.Picture.new_for_filename].
+ [ctor@Gtk.Picture.new_for_file] or [ctor@Gtk.Picture.new_for_filename].
To load an image for another purpose, use [ctor@Gdk.Texture.new_from_file].
To load a video from a file, use [ctor@Gtk.MediaFile.new_for_file].
+ Note that [class@Gtk.Image] is meant for fixed-size icons. For arbitrary
+ image files, you should use [class@Gtk.Picture].
+
* How do I draw text?
If you just want to put text into your user interface somewhere, it is
@@ -283,8 +286,8 @@ the question you have, this list is a good place to start.
pango_font_description_free (fontdesc);
g_object_unref (layout);
- See also the [Cairo Rendering](https://developer.gnome.org/pango/stable/pango-Cairo-Rendering.html)
- section of the [Pango documentation](https://developer.gnome.org/pango/stable/).
+ See also the [Cairo Rendering](https://docs.gtk.org/PangoCairo/pango_cairo.html)
+ section of the [Pango documentation](https://docs.gtk.org/Pango/).
To draw a piece of text in a widget [vfunc@Gtk.Widget.snapshot] implementation,
use [method@Gtk.Snapshot.append_layout].
@@ -301,8 +304,8 @@ the question you have, this list is a good place to start.
pango_font_description_free (fontdesc);
g_object_unref (layout);
- See also the [Layout Objects](https://developer.gnome.org/pango/stable/pango-Layout-Objects.html)
- section of the [Pango documentation](https://developer.gnome.org/pango/stable/).
+ See also the [Layout Objects](https://docs.gtk.org/Pango/class.Layout.html)
+ section of the [Pango documentation](https://docs.gtk.org/Pango/).
* Why are types not registered if I use their `GTK_TYPE_BLAH` macro?
diff --git a/gdk/broadway/broadway-server.c b/gdk/broadway/broadway-server.c
index f48ff0157d..6f6d6667bb 100644
--- a/gdk/broadway/broadway-server.c
+++ b/gdk/broadway/broadway-server.c
@@ -1574,7 +1574,8 @@ broadway_server_query_mouse (BroadwayServer *server,
void
broadway_server_destroy_surface (BroadwayServer *server,
- int id)
+ int id,
+ gboolean disconnected)
{
BroadwaySurface *surface;
gint32 transient_for = -1;
@@ -1589,8 +1590,7 @@ broadway_server_destroy_surface (BroadwayServer *server,
server->pointer_grab_surface_id = -1;
if (server->output)
- broadway_output_destroy_surface (server->output,
- id);
+ broadway_output_destroy_surface (server->output, id);
surface = broadway_server_lookup_surface (server, id);
if (surface != NULL)
@@ -1604,7 +1604,7 @@ broadway_server_destroy_surface (BroadwayServer *server,
broadway_surface_free (server, surface);
}
- if (transient_for != -1)
+ if (transient_for != -1 && !disconnected)
{
surface = broadway_server_lookup_surface (server, transient_for);
if (surface != NULL)
diff --git a/gdk/broadway/broadway-server.h b/gdk/broadway/broadway-server.h
index 1f7faad7ea..dc562b7056 100644
--- a/gdk/broadway/broadway-server.h
+++ b/gdk/broadway/broadway-server.h
@@ -93,7 +93,8 @@ guint32 broadway_server_new_surface (BroadwayServer *
int width,
int height);
void broadway_server_destroy_surface (BroadwayServer *server,
- int id);
+ int id,
+ gboolean disconnected);
gboolean broadway_server_surface_show (BroadwayServer *server,
int id);
gboolean broadway_server_surface_hide (BroadwayServer *server,
diff --git a/gdk/broadway/broadwayd.c b/gdk/broadway/broadwayd.c
index 2d1b4c1865..4ca99b4a10 100644
--- a/gdk/broadway/broadwayd.c
+++ b/gdk/broadway/broadwayd.c
@@ -101,8 +101,7 @@ client_disconnected (BroadwayClient *client)
}
for (l = client->surfaces; l != NULL; l = l->next)
- broadway_server_destroy_surface (server,
- GPOINTER_TO_UINT (l->data));
+ broadway_server_destroy_surface (server, GPOINTER_TO_UINT (l->data), TRUE);
g_list_free (client->surfaces);
client->surfaces = NULL;
@@ -268,7 +267,7 @@ client_handle_request (BroadwayClient *client,
client->surfaces =
g_list_remove (client->surfaces,
GUINT_TO_POINTER (request->destroy_surface.id));
- broadway_server_destroy_surface (server, request->destroy_surface.id);
+ broadway_server_destroy_surface (server, request->destroy_surface.id, FALSE);
break;
case BROADWAY_REQUEST_SHOW_SURFACE:
broadway_server_surface_show (server, request->show_surface.id);
diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c
index bebe26f38c..4f6fc60d2b 100644
--- a/gdk/gdkdisplay.c
+++ b/gdk/gdkdisplay.c
@@ -1723,8 +1723,6 @@ gdk_display_init_egl (GdkDisplay *self,
epoxy_has_egl_extension (priv->egl_display, "EGL_KHR_no_config_context");
self->have_egl_pixel_format_float =
epoxy_has_egl_extension (priv->egl_display, "EGL_EXT_pixel_format_float");
- self->have_egl_win32_libangle =
- epoxy_has_egl_extension (priv->egl_display, "EGL_ANGLE_d3d_share_handle_client_buffer");
if (self->have_egl_no_config_context)
priv->egl_config_high_depth = gdk_display_create_egl_config (self,
diff --git a/gdk/gdkdisplayprivate.h b/gdk/gdkdisplayprivate.h
index df88bec6ac..2d09708bd4 100644
--- a/gdk/gdkdisplayprivate.h
+++ b/gdk/gdkdisplayprivate.h
@@ -109,7 +109,6 @@ struct _GdkDisplay
guint have_egl_buffer_age : 1;
guint have_egl_no_config_context : 1;
guint have_egl_pixel_format_float : 1;
- guint have_egl_win32_libangle : 1;
};
struct _GdkDisplayClass
diff --git a/gdk/gdkglcontext.c b/gdk/gdkglcontext.c
index a46ffdb9d9..284db68e20 100644
--- a/gdk/gdkglcontext.c
+++ b/gdk/gdkglcontext.c
@@ -295,7 +295,6 @@ gdk_gl_context_create_egl_context (GdkGLContext *context,
/* We will use the default version matching the context status
* unless the user requested a version which makes sense */
gdk_gl_context_get_matching_version (api, legacy,
- display->have_egl_win32_libangle,
&min_major, &min_minor);
gdk_gl_context_get_clipped_version (context,
min_major, min_minor,
@@ -968,7 +967,6 @@ gdk_gl_context_get_forward_compatible (GdkGLContext *context)
void
gdk_gl_context_get_matching_version (GdkGLAPI api,
gboolean legacy,
- gboolean win32_libangle,
int *major,
int *minor)
{
@@ -989,16 +987,8 @@ gdk_gl_context_get_matching_version (GdkGLAPI api,
}
else
{
- if (win32_libangle)
- {
- maj = GDK_GL_MIN_GLES_WIN32_ANGLE_VERSION_MAJOR;
- min = GDK_GL_MIN_GLES_WIN32_ANGLE_VERSION_MINOR;
- }
- else
- {
- maj = GDK_GL_MIN_GLES_VERSION_MAJOR;
- min = GDK_GL_MIN_GLES_VERSION_MINOR;
- }
+ maj = GDK_GL_MIN_GLES_VERSION_MAJOR;
+ min = GDK_GL_MIN_GLES_VERSION_MINOR;
}
if (major != NULL)
diff --git a/gdk/gdkglcontextprivate.h b/gdk/gdkglcontextprivate.h
index 2ed799d6f7..d9860b11ef 100644
--- a/gdk/gdkglcontextprivate.h
+++ b/gdk/gdkglcontextprivate.h
@@ -37,8 +37,7 @@ G_BEGIN_DECLS
* Backends should make sure to never create a context of a previous version.
*
* The macros refer to OpenGL; OpenGL with OPENGL_COMPATIBILITY_PROFILE_BIT as
- * OPENGL_PROFILE_MASK; OpenGL ES; and OpenGL ES win32 Angle implementation,
- * respectively
+ * OPENGL_PROFILE_MASK; and OpenGL ES respectively
*/
#define GDK_GL_MIN_GL_VERSION_MAJOR (3)
#define GDK_GL_MIN_GL_VERSION_MINOR (2)
@@ -46,8 +45,6 @@ G_BEGIN_DECLS
#define GDK_GL_MIN_GL_LEGACY_VERSION_MINOR (0)
#define GDK_GL_MIN_GLES_VERSION_MAJOR (2)
#define GDK_GL_MIN_GLES_VERSION_MINOR (0)
-#define GDK_GL_MIN_GLES_WIN32_ANGLE_VERSION_MAJOR (3)
-#define GDK_GL_MIN_GLES_WIN32_ANGLE_VERSION_MINOR (0)
typedef enum {
GDK_GL_NONE = 0,
@@ -101,7 +98,6 @@ typedef struct {
} GdkGLContextProgram;
typedef struct {
- guint vertex_array_object;
guint tmp_framebuffer;
guint tmp_vertex_buffer;
@@ -141,7 +137,6 @@ void gdk_gl_context_get_clipped_version (GdkGLContext
int *minor);
void gdk_gl_context_get_matching_version (GdkGLAPI api,
gboolean legacy,
- gboolean win32_libangle,
int *major,
int *minor);
diff --git a/gdk/gdktoplevel.c b/gdk/gdktoplevel.c
index a7e4e42fcf..5a5c9e4d0f 100644
--- a/gdk/gdktoplevel.c
+++ b/gdk/gdktoplevel.c
@@ -261,15 +261,16 @@ gdk_toplevel_default_init (GdkToplevelInterface *iface)
/**
* GdkToplevel::compute-size:
* @toplevel: a `GdkToplevel`
- * @size: (type Gdk.ToplevelSize) (out caller-allocates): a `GdkToplevelSize`
+ * @size: (type Gdk.ToplevelSize): a `GdkToplevelSize`
*
* Emitted when the size for the surface needs to be computed, when
* it is present.
*
- * It will normally be emitted during or after [method@Gdk.Toplevel.present],
- * depending on the configuration received by the windowing system.
- * It may also be emitted at any other point in time, in response
- * to the windowing system spontaneously changing the configuration.
+ * This signal will normally be emitted during or after a call to
+ * [method@Gdk.Toplevel.present], depending on the configuration
+ * received by the windowing system. It may also be emitted at any
+ * other point in time, in response to the windowing system
+ * spontaneously changing the configuration of the toplevel surface.
*
* It is the responsibility of the toplevel user to handle this signal
* and compute the desired size of the toplevel, given the information
diff --git a/gdk/wayland/gdkprimary-wayland.c b/gdk/wayland/gdkprimary-wayland.c
index b501deb66b..9a9640d852 100644
--- a/gdk/wayland/gdkprimary-wayland.c
+++ b/gdk/wayland/gdkprimary-wayland.c
@@ -99,7 +99,7 @@ gdk_wayland_primary_claim_remote (GdkWaylandPrimary *cb,
if (cb->source)
{
- GDK_DISPLAY_DEBUG (gdk_clipboard_get_display (GDK_CLIPBOARD (cb)), CLIPBOARD, "%p: Ignoring clipboard offer for self", cb);
+ GDK_DISPLAY_DEBUG (gdk_clipboard_get_display (GDK_CLIPBOARD (cb)), CLIPBOARD, "%p: Ignoring primary offer for self", cb);
gdk_content_formats_unref (formats);
g_clear_pointer (&offer, zwp_primary_selection_offer_v1_destroy);
return;
@@ -111,7 +111,7 @@ gdk_wayland_primary_claim_remote (GdkWaylandPrimary *cb,
if (GDK_DISPLAY_DEBUG_CHECK (gdk_clipboard_get_display (GDK_CLIPBOARD (cb)), CLIPBOARD))
{
char *s = gdk_content_formats_to_string (formats);
- gdk_debug_message ("%p: remote clipboard claim for %s", cb, s);
+ gdk_debug_message ("%p: remote primary claim for %s", cb, s);
g_free (s);
}
#endif
@@ -119,8 +119,7 @@ gdk_wayland_primary_claim_remote (GdkWaylandPrimary *cb,
cb->offer_formats = formats;
cb->offer = offer;
- gdk_clipboard_claim_remote (GDK_CLIPBOARD (cb),
- cb->offer_formats);
+ gdk_clipboard_claim_remote (GDK_CLIPBOARD (cb), cb->offer_formats);
}
static void
@@ -271,6 +270,14 @@ gdk_wayland_primary_claim (GdkClipboard *clipboard,
{
GdkWaylandPrimary *cb = GDK_WAYLAND_PRIMARY (clipboard);
+#ifdef G_ENABLE_DEBUG
+ if (GDK_DISPLAY_DEBUG_CHECK (gdk_clipboard_get_display (clipboard), CLIPBOARD))
+ {
+ char *s = gdk_content_formats_to_string (formats);
+ gdk_debug_message ("%p: claim primary (%s) for %s", cb, local ? "local" : "remote", s);
+ g_free (s);
+ }
+#endif
if (local)
{
GdkWaylandDisplay *wdisplay = GDK_WAYLAND_DISPLAY (gdk_clipboard_get_display (clipboard));
diff --git a/gdk/wayland/gdksurface-wayland.c b/gdk/wayland/gdksurface-wayland.c
index a76a2c7247..4ded693385 100644
--- a/gdk/wayland/gdksurface-wayland.c
+++ b/gdk/wayland/gdksurface-wayland.c
@@ -520,8 +520,6 @@ _gdk_wayland_display_create_surface (GdkDisplay *display,
surface->width = width;
surface->height = height;
- g_object_ref (surface);
-
/* More likely to be right than just assuming 1 */
if (display_wayland->compositor_version >= WL_SURFACE_HAS_BUFFER_SCALE)
{
@@ -632,7 +630,7 @@ gdk_wayland_surface_dispose (GObject *object)
GDK_WAYLAND_DISPLAY (gdk_surface_get_display (surface));
display_wayland->event_queues =
- g_list_remove (display_wayland->event_queues, surface);
+ g_list_remove (display_wayland->event_queues, impl->event_queue);
g_clear_pointer (&impl->event_queue, wl_event_queue_destroy);
}
diff --git a/gdk/win32/gdkdisplay-win32.c b/gdk/win32/gdkdisplay-win32.c
index 5c53f247c2..d07a1c09cb 100644
--- a/gdk/win32/gdkdisplay-win32.c
+++ b/gdk/win32/gdkdisplay-win32.c
@@ -1207,6 +1207,7 @@ gdk_win32_display_init_gl (GdkDisplay *display,
{
return g_object_new (GDK_TYPE_WIN32_GL_CONTEXT_EGL,
"display", display,
+ "allowed-apis", GDK_GL_API_GLES,
NULL);
}
else
diff --git a/gdk/win32/gdkglcontext-win32-egl.c b/gdk/win32/gdkglcontext-win32-egl.c
index 0e8854de49..82019d6e6c 100644
--- a/gdk/win32/gdkglcontext-win32-egl.c
+++ b/gdk/win32/gdkglcontext-win32-egl.c
@@ -83,20 +83,13 @@ gdk_win32_gl_context_egl_end_frame (GdkDrawContext *draw_context,
cairo_region_t *painted)
{
GdkGLContext *context = GDK_GL_CONTEXT (draw_context);
- GdkWin32GLContextEGL *context_egl = GDK_WIN32_GL_CONTEXT_EGL (context);
GdkSurface *surface = gdk_gl_context_get_surface (context);
GdkDisplay *display = gdk_gl_context_get_display (context);
- cairo_rectangle_int_t whole_window;
EGLSurface egl_surface;
GDK_DRAW_CONTEXT_CLASS (gdk_win32_gl_context_egl_parent_class)->end_frame (draw_context, painted);
gdk_gl_context_make_current (context);
- whole_window =
- (GdkRectangle) { 0, 0,
- gdk_surface_get_width (surface),
- gdk_surface_get_height (surface)
- };
egl_surface = gdk_surface_get_egl_surface (surface);
diff --git a/gdk/x11/gdkglcontext-glx.c b/gdk/x11/gdkglcontext-glx.c
index db3040442c..bdcd3042cc 100644
--- a/gdk/x11/gdkglcontext-glx.c
+++ b/gdk/x11/gdkglcontext-glx.c
@@ -488,7 +488,7 @@ gdk_x11_context_create_glx_context (GdkGLContext *context,
/* We will use the default version matching the context status
* unless the user requested a version which makes sense */
- gdk_gl_context_get_matching_version (api, legacy, 0,
+ gdk_gl_context_get_matching_version (api, legacy,
&min_major, &min_minor);
gdk_gl_context_get_clipped_version (context, min_major, min_minor,
&major, &minor);
diff --git a/gsk/gl/gskglcommandqueue.c b/gsk/gl/gskglcommandqueue.c
index 8fee49fd15..a8624642f0 100644
--- a/gsk/gl/gskglcommandqueue.c
+++ b/gsk/gl/gskglcommandqueue.c
@@ -1002,8 +1002,11 @@ gsk_gl_command_queue_execute (GskGLCommandQueue *self,
glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
glBlendEquation (GL_FUNC_ADD);
- glGenVertexArrays (1, &vao_id);
- glBindVertexArray (vao_id);
+ if (!gdk_gl_context_get_use_es (self->context))
+ {
+ glGenVertexArrays (1, &vao_id);
+ glBindVertexArray (vao_id);
+ }
vbo_id = gsk_gl_buffer_submit (&self->vertices);
@@ -1159,7 +1162,8 @@ gsk_gl_command_queue_execute (GskGLCommandQueue *self,
}
glDeleteBuffers (1, &vbo_id);
- glDeleteVertexArrays (1, &vao_id);
+ if (!gdk_gl_context_get_use_es (self->context))
+ glDeleteVertexArrays (1, &vao_id);
gdk_profiler_set_int_counter (self->metrics.n_binds, n_binds);
gdk_profiler_set_int_counter (self->metrics.n_uniforms, n_uniforms);
diff --git a/gsk/gl/gskgldriver.c b/gsk/gl/gskgldriver.c
index 727ce079bb..da2bfb51bb 100644
--- a/gsk/gl/gskgldriver.c
+++ b/gsk/gl/gskgldriver.c
@@ -733,7 +733,7 @@ gsk_gl_driver_load_texture (GskGLDriver *self,
format = GL_RGBA8;
- if (GDK_IS_GL_TEXTURE (texture))
+ if (GDK_IS_GL_TEXTURE (texture) && min_filter == GL_LINEAR && mag_filter == GL_LINEAR)
{
GdkGLTexture *gl_texture = (GdkGLTexture *) texture;
GdkGLContext *texture_context = gdk_gl_texture_get_context (gl_texture);
diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c
index 9ed6a655bc..91973c2ba9 100644
--- a/gsk/gl/gskglrenderer.c
+++ b/gsk/gl/gskglrenderer.c
@@ -372,7 +372,11 @@ gsk_gl_renderer_render_texture (GskRenderer *renderer,
return texture;
}
- format = gsk_render_node_prefers_high_depth (root) ? GL_RGBA32F : GL_RGBA8;
+ if (gsk_render_node_prefers_high_depth (root) &&
+ gdk_gl_context_check_version (self->context, 3, 0, 3, 0))
+ format = GL_RGBA32F;
+ else
+ format = GL_RGBA8;
gdk_gl_context_make_current (self->context);
diff --git a/gsk/gl/gskglrenderjob.c b/gsk/gl/gskglrenderjob.c
index 30d7c9cc51..863d1efd31 100644
--- a/gsk/gl/gskglrenderjob.c
+++ b/gsk/gl/gskglrenderjob.c
@@ -254,7 +254,7 @@ gsk_rounded_rect_shrink_to_minimum (GskRoundedRect *self)
static inline gboolean G_GNUC_PURE
node_supports_2d_transform (const GskRenderNode *node)
{
- switch ((int)gsk_render_node_get_node_type (node))
+ switch (gsk_render_node_get_node_type (node))
{
case GSK_COLOR_NODE:
case GSK_OPACITY_NODE:
@@ -272,6 +272,7 @@ node_supports_2d_transform (const GskRenderNode *node)
case GSK_CAIRO_NODE:
case GSK_BLEND_NODE:
case GSK_BLUR_NODE:
+ case GSK_MASK_NODE:
return TRUE;
case GSK_SHADOW_NODE:
@@ -288,8 +289,18 @@ node_supports_2d_transform (const GskRenderNode *node)
}
return TRUE;
- default:
+ case GSK_BORDER_NODE:
+ case GSK_INSET_SHADOW_NODE:
+ case GSK_OUTSET_SHADOW_NODE:
+ case GSK_REPEAT_NODE:
+ case GSK_CLIP_NODE:
+ case GSK_ROUNDED_CLIP_NODE:
+ case GSK_GL_SHADER_NODE:
return FALSE;
+
+ case GSK_NOT_A_RENDER_NODE:
+ default:
+ g_assert_not_reached ();
}
}
@@ -303,7 +314,7 @@ node_supports_transform (const GskRenderNode *node)
* opacity or color matrix.
*/
- switch ((int)gsk_render_node_get_node_type (node))
+ switch (gsk_render_node_get_node_type (node))
{
case GSK_COLOR_NODE:
case GSK_OPACITY_NODE:
@@ -324,8 +335,25 @@ node_supports_transform (const GskRenderNode *node)
case GSK_TRANSFORM_NODE:
return node_supports_transform (gsk_transform_node_get_child (node));
- default:
+ case GSK_CONTAINER_NODE:
+ case GSK_LINEAR_GRADIENT_NODE:
+ case GSK_REPEATING_LINEAR_GRADIENT_NODE:
+ case GSK_RADIAL_GRADIENT_NODE:
+ case GSK_REPEATING_RADIAL_GRADIENT_NODE:
+ case GSK_CONIC_GRADIENT_NODE:
+ case GSK_BORDER_NODE:
+ case GSK_INSET_SHADOW_NODE:
+ case GSK_OUTSET_SHADOW_NODE:
+ case GSK_REPEAT_NODE:
+ case GSK_CLIP_NODE:
+ case GSK_ROUNDED_CLIP_NODE:
+ case GSK_GL_SHADER_NODE:
+ case GSK_TEXTURE_SCALE_NODE:
return FALSE;
+
+ case GSK_NOT_A_RENDER_NODE:
+ default:
+ g_assert_not_reached ();
}
}
@@ -535,23 +563,21 @@ extract_matrix_metadata (GskGLRenderModelview *modelview)
case GSK_TRANSFORM_CATEGORY_ANY:
case GSK_TRANSFORM_CATEGORY_3D:
{
- graphene_vec3_t col1;
- graphene_vec3_t col2;
-
- /* TODO: 90% sure this is incorrect. But we should never hit this code
- * path anyway. */
- graphene_vec3_init (&col1,
- graphene_matrix_get_value (&modelview->matrix, 0, 0),
- graphene_matrix_get_value (&modelview->matrix, 1, 0),
- graphene_matrix_get_value (&modelview->matrix, 2, 0));
-
- graphene_vec3_init (&col2,
- graphene_matrix_get_value (&modelview->matrix, 0, 1),
- graphene_matrix_get_value (&modelview->matrix, 1, 1),
- graphene_matrix_get_value (&modelview->matrix, 2, 1));
-
- modelview->scale_x = graphene_vec3_length (&col1);
- modelview->scale_y = graphene_vec3_length (&col2);
+ graphene_quaternion_t rotation;
+ graphene_vec4_t perspective;
+ graphene_vec3_t translation;
+ graphene_vec3_t scale;
+ graphene_vec3_t shear;
+
+ graphene_matrix_decompose (&modelview->matrix,
+ &translation,
+ &scale,
+ &rotation,
+ &shear,
+ &perspective);
+
+ modelview->scale_x = graphene_vec3_get_x (&scale);
+ modelview->scale_y = graphene_vec3_get_y (&scale);
modelview->dx = 0;
modelview->dy = 0;
}
diff --git a/gtk/a11y/gtkatspicontext.c b/gtk/a11y/gtkatspicontext.c
index e9339a7387..aa5e7a4a98 100644
--- a/gtk/a11y/gtkatspicontext.c
+++ b/gtk/a11y/gtkatspicontext.c
@@ -142,10 +142,10 @@ collect_states (GtkAtSpiContext *self,
accessible = gtk_at_context_get_accessible (ctx);
set_atspi_state (&states, ATSPI_STATE_VISIBLE);
+ set_atspi_state (&states, ATSPI_STATE_SHOWING);
if (ctx->accessible_role == GTK_ACCESSIBLE_ROLE_WINDOW)
{
- set_atspi_state (&states, ATSPI_STATE_SHOWING);
if (gtk_accessible_get_platform_state (accessible, GTK_ACCESSIBLE_PLATFORM_STATE_ACTIVE))
set_atspi_state (&states, ATSPI_STATE_ACTIVE);
}
@@ -918,6 +918,7 @@ gtk_at_spi_context_state_change (GtkATContext *ctx,
{
gtk_at_spi_root_child_changed (self->root, change, accessible);
emit_state_changed (self, "showing", gtk_boolean_accessible_value_get (value));
+ emit_state_changed (self, "visible", gtk_boolean_accessible_value_get (value));
}
else
{
diff --git a/gtk/a11y/gtkatspiutils.c b/gtk/a11y/gtkatspiutils.c
index 957ca29743..985594ad95 100644
--- a/gtk/a11y/gtkatspiutils.c
+++ b/gtk/a11y/gtkatspiutils.c
@@ -43,7 +43,7 @@ gtk_accessible_role_to_atspi_role (GtkAccessibleRole role)
return ATSPI_ROLE_ALERT;
case GTK_ACCESSIBLE_ROLE_ALERT_DIALOG:
- return ATSPI_ROLE_DIALOG;
+ return ATSPI_ROLE_ALERT;
case GTK_ACCESSIBLE_ROLE_BANNER:
break;
diff --git a/gtk/gskpango.c b/gtk/gskpango.c
index 41a4b1a7bc..c83f97f537 100644
--- a/gtk/gskpango.c
+++ b/gtk/gskpango.c
@@ -460,6 +460,9 @@ gsk_pango_renderer_release (GskPangoRenderer *renderer)
* Creates render nodes for rendering @layout in the given foregound @color
* and appends them to the current node of @snapshot without changing the
* current node.
+ *
+ * Note that if the layout does not produce any visible output, then nodes
+ * may not be added to the @snapshot.
**/
void
gtk_snapshot_append_layout (GtkSnapshot *snapshot,
diff --git a/gtk/gtkaccessible.c b/gtk/gtkaccessible.c
index dad85e2e00..4cba3b637f 100644
--- a/gtk/gtkaccessible.c
+++ b/gtk/gtkaccessible.c
@@ -830,6 +830,7 @@ static const char *role_names[] = {
[GTK_ACCESSIBLE_ROLE_TREE_ITEM] = NC_("accessibility", "tree item"),
[GTK_ACCESSIBLE_ROLE_WIDGET] = NC_("accessibility", "widget"),
[GTK_ACCESSIBLE_ROLE_WINDOW] = NC_("accessibility", "window"),
+ [GTK_ACCESSIBLE_ROLE_TOGGLE_BUTTON] = NC_("accessibility", "toggle button"),
};
/*< private >
diff --git a/gtk/gtkactionmuxer.c b/gtk/gtkactionmuxer.c
index 7af7bb413b..760f796354 100644
--- a/gtk/gtkactionmuxer.c
+++ b/gtk/gtkactionmuxer.c
@@ -232,6 +232,8 @@ gtk_action_muxer_list_actions (GtkActionMuxer *muxer,
GHashTable *actions;
char **keys;
+ g_return_val_if_fail (GTK_IS_ACTION_MUXER (muxer), NULL);
+
actions = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
for ( ; muxer != NULL; muxer = muxer->parent)
diff --git a/gtk/gtkactionmuxerprivate.h b/gtk/gtkactionmuxerprivate.h
index db69cabc9d..a3e3cf3fc5 100644
--- a/gtk/gtkactionmuxerprivate.h
+++ b/gtk/gtkactionmuxerprivate.h
@@ -74,7 +74,7 @@ gboolean gtk_action_muxer_query_action (GtkActi
const GVariantType **parameter_type,
const GVariantType **state_type,
GVariant **state_hint,
- GVariant **state);
+ GVariant **state) G_GNUC_WARN_UNUSED_RESULT;
void gtk_action_muxer_activate_action (GtkActionMuxer *muxer,
const char *action_name,
GVariant *parameter);
diff --git a/gtk/gtkalertdialog.c b/gtk/gtkalertdialog.c
index 33ccac37d9..efb4ed4a64 100644
--- a/gtk/gtkalertdialog.c
+++ b/gtk/gtkalertdialog.c
@@ -747,6 +747,9 @@ gtk_alert_dialog_choose_finish (GtkAlertDialog *self,
g_return_val_if_fail (g_task_is_valid (result, self), -1);
g_return_val_if_fail (g_task_get_source_tag (G_TASK (result)) == gtk_alert_dialog_choose, -1);
+ /* Destroy the dialog window not to be bound to GTask lifecycle */
+ g_task_set_task_data (G_TASK (result), NULL, NULL);
+
return (int) g_task_propagate_int (G_TASK (result), error);
}
diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c
index 318f68f308..d85586c82e 100644
--- a/gtk/gtkbutton.c
+++ b/gtk/gtkbutton.c
@@ -288,6 +288,9 @@ gtk_button_class_init (GtkButtonClass *klass)
*
* This is an action signal. Applications should never connect
* to this signal, but use the [signal@Gtk.Button::clicked] signal.
+ *
+ * The default bindings for this signal are all forms of the
+ * <kbd>␣</kbd> and <kbd>Enter</kbd> keys.
*/
button_signals[ACTIVATE] =
g_signal_new (I_("activate"),
@@ -669,7 +672,8 @@ gtk_button_new_from_icon_name (const char *icon_name)
* If characters in @label are preceded by an underscore, they are underlined.
* If you need a literal underscore character in a label, use “__” (two
* underscores). The first underlined character represents a keyboard
- * accelerator called a mnemonic. Pressing Alt and that key activates the button.
+ * accelerator called a mnemonic. Pressing <kbd>Alt</kbd> and that key
+ * activates the button.
*
* Returns: a new `GtkButton`
*/
diff --git a/gtk/gtkcheckbutton.c b/gtk/gtkcheckbutton.c
index 7b45cdf91f..b639f78faa 100644
--- a/gtk/gtkcheckbutton.c
+++ b/gtk/gtkcheckbutton.c
@@ -481,16 +481,15 @@ gtk_check_button_focus (GtkWidget *widget,
}
}
+ g_ptr_array_free (child_array, TRUE);
- if (new_focus)
+ if (new_focus && new_focus != widget)
{
gtk_widget_grab_focus (new_focus);
gtk_widget_activate (new_focus);
+ return TRUE;
}
-
- g_ptr_array_free (child_array, TRUE);
-
- return TRUE;
+ return FALSE;
}
else
{
@@ -673,6 +672,9 @@ gtk_check_button_class_init (GtkCheckButtonClass *class)
* Applications should never connect to this signal, but use the
* [signal@Gtk.CheckButton::toggled] signal.
*
+ * The default bindings for this signal are all forms of the
+ * <kbd>␣</kbd> and <kbd>Enter</kbd> keys.
+ *
* Since: 4.2
*/
signals[ACTIVATE] =
diff --git a/gtk/gtkcolordialog.c b/gtk/gtkcolordialog.c
index d93c68ad3f..a6e69be7e9 100644
--- a/gtk/gtkcolordialog.c
+++ b/gtk/gtkcolordialog.c
@@ -492,6 +492,9 @@ gtk_color_dialog_choose_rgba_finish (GtkColorDialog *self,
g_return_val_if_fail (g_task_is_valid (result, self), NULL);
g_return_val_if_fail (g_task_get_source_tag (G_TASK (result)) == gtk_color_dialog_choose_rgba, NULL);
+ /* Destroy the dialog window not to be bound to GTask lifecycle */
+ g_task_set_task_data (G_TASK (result), NULL, NULL);
+
return g_task_propagate_pointer (G_TASK (result), error);
}
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 1c0798ff97..e269b17f4e 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -2098,7 +2098,7 @@ gtk_entry_get_visibility (GtkEntry *entry)
}
/**
- * gtk_entry_set_invisible_char: (attributes org.gtk.Method.sets_property=invisible-char)
+ * gtk_entry_set_invisible_char: (attributes org.gtk.Method.set_property=invisible-char)
* @entry: a `GtkEntry`
* @ch: a Unicode character
*
diff --git a/gtk/gtkexpander.c b/gtk/gtkexpander.c
index 6b233ebe59..f4e7532332 100644
--- a/gtk/gtkexpander.c
+++ b/gtk/gtkexpander.c
@@ -98,16 +98,16 @@
* # CSS nodes
*
* ```
- * expander
+ * expander-widget
* ╰── box
* ├── title
- * │ ├── arrow
+ * │ ├── expander
* │ ╰── <label widget>
* ╰── <child>
* ```
*
- * `GtkExpander` has three CSS nodes, the main node with the name expander,
- * a subnode with name title and node below it with name arrow. The arrow of an
+ * `GtkExpander` has three CSS nodes, the main node with the name expander-widget,
+ * a subnode with name title and node below it with name expander. The arrow of an
* expander that is showing its child gets the :checked pseudoclass added to it.
*
* # Accessibility
diff --git a/gtk/gtkfilechooserentry.c b/gtk/gtkfilechooserentry.c
index 4f3d2f8c7f..e10ad94890 100644
--- a/gtk/gtkfilechooserentry.c
+++ b/gtk/gtkfilechooserentry.c
@@ -193,28 +193,30 @@ match_func (GtkEntryCompletion *compl,
gpointer user_data)
{
GtkFileChooserEntry *chooser_entry = user_data;
+ GFileInfo *info;
+
+ gtk_tree_model_get (GTK_TREE_MODEL (chooser_entry->completion_store),
+ iter,
+ FILE_INFO_COLUMN, &info,
+ -1);
+
+ g_assert (info != NULL);
+ g_object_unref (info);
+
+ if (g_file_info_get_attribute_boolean (info, "filechooser::filtered-out"))
+ return FALSE;
/* If we arrive here, the GtkFileSystemModel's GtkFileFilter already filtered out all
* files that don't start with the current prefix, so we manually apply the GtkFileChooser's
- * current file filter (e.g. just jpg files) here. */
+ * current file filter (e.g. just jpg files) here.
+ */
if (chooser_entry->current_filter != NULL)
{
- GFileInfo *info;
-
- gtk_tree_model_get (GTK_TREE_MODEL (chooser_entry->completion_store),
- iter,
- FILE_INFO_COLUMN, &info,
- -1);
-
- g_assert (info != NULL);
- g_object_unref (info);
-
/* We always allow navigating into subfolders, so don't ever filter directories */
if (g_file_info_get_file_type (info) != G_FILE_TYPE_REGULAR)
return TRUE;
g_assert (g_file_info_has_attribute (info, "standard::file"));
-
return gtk_filter_match (GTK_FILTER (chooser_entry->current_filter), info);
}
@@ -598,6 +600,9 @@ model_items_changed_cb (GListModel *model,
DISPLAY_NAME_COLUMN, display_name,
-1);
+ g_free (display_name);
+ g_free (full_path);
+
g_clear_object (&info);
position++;
diff --git a/gtk/gtkfiledialog.c b/gtk/gtkfiledialog.c
index 8b9fc21a6a..b267e2d239 100644
--- a/gtk/gtkfiledialog.c
+++ b/gtk/gtkfiledialog.c
@@ -976,6 +976,9 @@ gtk_file_dialog_open_finish (GtkFileDialog *self,
g_return_val_if_fail (g_task_is_valid (result, self), NULL);
g_return_val_if_fail (g_task_get_source_tag (G_TASK (result)) == gtk_file_dialog_open, NULL);
+ /* Destroy the dialog window not to be bound to GTask lifecycle */
+ g_task_set_task_data (G_TASK (result), NULL, NULL);
+
return finish_file_op (self, G_TASK (result), error);
}
@@ -1050,6 +1053,9 @@ gtk_file_dialog_select_folder_finish (GtkFileDialog *self,
g_return_val_if_fail (g_task_is_valid (result, self), NULL);
g_return_val_if_fail (g_task_get_source_tag (G_TASK (result)) == gtk_file_dialog_select_folder, NULL);
+ /* Destroy the dialog window not to be bound to GTask lifecycle */
+ g_task_set_task_data (G_TASK (result), NULL, NULL);
+
return finish_file_op (self, G_TASK (result), error);
}
@@ -1120,6 +1126,9 @@ gtk_file_dialog_save_finish (GtkFileDialog *self,
g_return_val_if_fail (g_task_is_valid (result, self), NULL);
g_return_val_if_fail (g_task_get_source_tag (G_TASK (result)) == gtk_file_dialog_save, NULL);
+ /* Destroy the dialog window not to be bound to GTask lifecycle */
+ g_task_set_task_data (G_TASK (result), NULL, NULL);
+
return finish_file_op (self, G_TASK (result), error);
}
@@ -1194,6 +1203,9 @@ gtk_file_dialog_open_multiple_finish (GtkFileDialog *self,
g_return_val_if_fail (g_task_is_valid (result, self), NULL);
g_return_val_if_fail (g_task_get_source_tag (G_TASK (result)) == gtk_file_dialog_open_multiple, NULL);
+ /* Destroy the dialog window not to be bound to GTask lifecycle */
+ g_task_set_task_data (G_TASK (result), NULL, NULL);
+
return finish_multiple_files_op (self, G_TASK (result), error);
}
@@ -1268,6 +1280,9 @@ gtk_file_dialog_select_multiple_folders_finish (GtkFileDialog *self,
g_return_val_if_fail (g_task_is_valid (result, self), NULL);
g_return_val_if_fail (g_task_get_source_tag (G_TASK (result)) == gtk_file_dialog_select_multiple_folders, NULL);
+ /* Destroy the dialog window not to be bound to GTask lifecycle */
+ g_task_set_task_data (G_TASK (result), NULL, NULL);
+
return finish_multiple_files_op (self, G_TASK (result), error);
}
diff --git a/gtk/gtkflowbox.c b/gtk/gtkflowbox.c
index 5b6c8088a1..123559ea24 100644
--- a/gtk/gtkflowbox.c
+++ b/gtk/gtkflowbox.c
@@ -538,7 +538,7 @@ gtk_flow_box_child_class_init (GtkFlowBoxChildClass *class)
*
* Emitted when the user activates a child widget in a `GtkFlowBox`.
*
- * This can be happen either by clicking or double-clicking,
+ * This can happen either by clicking or double-clicking,
* or via a keybinding.
*
* This is a [keybinding signal](class.SignalAction.html),
diff --git a/gtk/gtkfontdialog.c b/gtk/gtkfontdialog.c
index 878456d94d..c533dac2cc 100644
--- a/gtk/gtkfontdialog.c
+++ b/gtk/gtkfontdialog.c
@@ -697,6 +697,9 @@ gtk_font_dialog_choose_family_finish (GtkFontDialog *self,
g_return_val_if_fail (g_task_is_valid (result, self), NULL);
g_return_val_if_fail (g_task_get_source_tag (G_TASK (result)) == gtk_font_dialog_choose_family, NULL);
+ /* Destroy the dialog window not to be bound to GTask lifecycle */
+ g_task_set_task_data (G_TASK (result), NULL, NULL);
+
return g_task_propagate_pointer (G_TASK (result), error);
}
@@ -777,6 +780,9 @@ gtk_font_dialog_choose_face_finish (GtkFontDialog *self,
g_return_val_if_fail (g_task_is_valid (result, self), NULL);
g_return_val_if_fail (g_task_get_source_tag (G_TASK (result)) == gtk_font_dialog_choose_face, NULL);
+ /* Destroy the dialog window not to be bound to GTask lifecycle */
+ g_task_set_task_data (G_TASK (result), NULL, NULL);
+
return g_task_propagate_pointer (G_TASK (result), error);
}
@@ -855,6 +861,9 @@ gtk_font_dialog_choose_font_finish (GtkFontDialog *self,
g_return_val_if_fail (g_task_is_valid (result, self), NULL);
g_return_val_if_fail (g_task_get_source_tag (G_TASK (result)) == gtk_font_dialog_choose_font, NULL);
+ /* Destroy the dialog window not to be bound to GTask lifecycle */
+ g_task_set_task_data (G_TASK (result), NULL, NULL);
+
return g_task_propagate_pointer (G_TASK (result), error);
}
@@ -944,6 +953,8 @@ gtk_font_dialog_choose_font_and_features_finish (GtkFontDialog *self,
g_return_val_if_fail (g_task_is_valid (result, self), FALSE);
g_return_val_if_fail (g_task_get_source_tag (G_TASK (result)) == gtk_font_dialog_choose_font_and_features, FALSE);
+ /* Destroy the dialog window not to be bound to GTask lifecycle */
+ g_task_set_task_data (G_TASK (result), NULL, NULL);
font_result = g_task_propagate_pointer (G_TASK (result), error);
if (font_result)
diff --git a/gtk/gtkgestureclick.c b/gtk/gtkgestureclick.c
index cc5fec25af..795e8ec02c 100644
--- a/gtk/gtkgestureclick.c
+++ b/gtk/gtkgestureclick.c
@@ -150,6 +150,7 @@ _gtk_gesture_click_update_timeout (GtkGestureClick *gesture)
static gboolean
_gtk_gesture_click_check_within_threshold (GtkGestureClick *gesture,
+ const char *setting,
double x,
double y)
{
@@ -165,9 +166,7 @@ _gtk_gesture_click_check_within_threshold (GtkGestureClick *gesture,
widget = gtk_event_controller_get_widget (GTK_EVENT_CONTROLLER (gesture));
settings = gtk_widget_get_settings (widget);
- g_object_get (settings,
- "gtk-double-click-distance", &double_click_distance,
- NULL);
+ g_object_get (settings, setting, &double_click_distance, NULL);
if (ABS (priv->initial_press_x - x) < double_click_distance &&
ABS (priv->initial_press_y - y) < double_click_distance)
@@ -220,7 +219,8 @@ gtk_gesture_click_begin (GtkGesture *gesture,
_gtk_gesture_click_update_timeout (click);
gtk_gesture_get_point (gesture, current, &x, &y);
- if (!_gtk_gesture_click_check_within_threshold (click, x, y))
+ if (gdk_device_get_source (priv->current_device) == GDK_SOURCE_MOUSE &&
+ !_gtk_gesture_click_check_within_threshold (click, "gtk-double-click-distance", x, y))
_gtk_gesture_click_stop (click);
/* Increment later the real counter, just if the gesture is
@@ -250,7 +250,7 @@ gtk_gesture_click_update (GtkGesture *gesture,
current = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (gesture));
gtk_gesture_get_point (gesture, current, &x, &y);
- if (!_gtk_gesture_click_check_within_threshold (click, x, y))
+ if (!_gtk_gesture_click_check_within_threshold (click, "gtk-dnd-drag-threshold", x, y))
_gtk_gesture_click_stop (click);
}
diff --git a/gtk/gtkgesturestylus.c b/gtk/gtkgesturestylus.c
index bc3da9351d..d2e2248e99 100644
--- a/gtk/gtkgesturestylus.c
+++ b/gtk/gtkgesturestylus.c
@@ -103,7 +103,7 @@ gtk_gesture_stylus_handle_event (GtkEventController *controller,
priv = gtk_gesture_stylus_get_instance_private (GTK_GESTURE_STYLUS (controller));
GTK_EVENT_CONTROLLER_CLASS (gtk_gesture_stylus_parent_class)->handle_event (controller, event, x, y);
- if (!(priv->stylus_only || gdk_event_get_device_tool (event)))
+ if (priv->stylus_only && !gdk_event_get_device_tool (event))
return FALSE;
switch ((guint) gdk_event_get_event_type (event))
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index 19a8b8f027..3e646ababa 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -29,10 +29,10 @@
#include "gtkbuildable.h"
#include "gtkeventcontrollermotion.h"
#include "gtkeventcontrollerfocus.h"
+#include "gtkfilelauncher.h"
#include "gtkgesturedrag.h"
#include "gtkgestureclick.h"
#include "gtkgesturesingle.h"
-#include <glib/gi18n-lib.h>
#include "gtkmarshalers.h"
#include "gtknotebook.h"
#include "gtkpangoprivate.h"
@@ -59,6 +59,7 @@
#include <math.h>
#include <stdlib.h>
#include <string.h>
+#include <glib/gi18n-lib.h>
/**
* GtkLabel:
@@ -174,11 +175,11 @@
* (See the Pango manual for complete documentation] of available
* tags, [func@Pango.parse_markup])
*
- * The markup passed to gtk_label_set_markup() must be valid; for example,
- * literal <, > and & characters must be escaped as &lt;, &gt;, and &amp;.
+ * The markup passed to [method@Gtk.Label.set_markup] must be valid; for example,
+ * literal `<`, `>` and `&` characters must be escaped as `&lt;`, `&gt;`, and `&amp;`.
* If you pass text obtained from the user, file, or a network to
* [method@Gtk.Label.set_markup], you’ll want to escape it with
- * g_markup_escape_text() or g_markup_printf_escaped().
+ * [func@GLib.markup_escape_text] or [func@GLib.markup_printf_escaped].
*
* Markup strings are just a convenient way to set the [struct@Pango.AttrList]
* on a label; [method@Gtk.Label.set_attributes] may be a simpler way to set
@@ -2102,14 +2103,31 @@ gtk_label_activate_link (GtkLabel *self,
{
GtkWidget *widget = GTK_WIDGET (self);
GtkWidget *toplevel = GTK_WIDGET (gtk_widget_get_root (widget));
- GtkUriLauncher *launcher;
+ const char *uri_scheme;
if (!GTK_IS_WINDOW (toplevel))
return FALSE;
- launcher = gtk_uri_launcher_new (uri);
- gtk_uri_launcher_launch (launcher, GTK_WINDOW (toplevel), NULL, NULL, NULL);
- g_object_unref (launcher);
+ uri_scheme = g_uri_peek_scheme (uri);
+ if (g_strcmp0 (uri_scheme, "file") == 0)
+ {
+ GFile *file;
+ GtkFileLauncher *launcher;
+
+ file = g_file_new_for_uri (uri);
+ launcher = gtk_file_launcher_new (file);
+ gtk_file_launcher_launch (launcher, GTK_WINDOW (toplevel), NULL, NULL, NULL);
+ g_object_unref (launcher);
+ g_object_unref (file);
+ }
+ else
+ {
+ GtkUriLauncher *launcher;
+
+ launcher = gtk_uri_launcher_new (uri);
+ gtk_uri_launcher_launch (launcher, GTK_WINDOW (toplevel), NULL, NULL, NULL);
+ g_object_unref (launcher);
+ }
return TRUE;
}
@@ -2219,9 +2237,11 @@ gtk_label_class_init (GtkLabelClass *class)
* the variant with the Shift modifier extends the selection,
* the variant without the Shift modifier does not.
* There are too many key combinations to list them all here.
- * - Arrow keys move by individual characters/lines
- * - Ctrl-arrow key combinations move by words/paragraphs
- * - Home/End keys move to the ends of the buffer
+ *
+ * - <kbd>←</kbd>, <kbd>→</kbd>, <kbd>↑</kbd>, <kbd>↓</kbd>
+ * move by individual characters/lines
+ * - <kbd>Ctrl</kbd>+<kbd>←</kbd>, etc. move by words/paragraphs
+ * - <kbd>Home</kbd> and <kbd>End</kbd> move to the ends of the buffer
*/
signals[MOVE_CURSOR] =
g_signal_new (I_("move-cursor"),
@@ -2243,7 +2263,7 @@ gtk_label_class_init (GtkLabelClass *class)
*
* The ::copy-clipboard signal is a [keybinding signal](class.SignalAction.html).
*
- * The default binding for this signal is Ctrl-c.
+ * The default binding for this signal is <kbd>Ctrl</kbd>+<kbd>c</kbd>.
*/
signals[COPY_CLIPBOARD] =
g_signal_new (I_("copy-clipboard"),
@@ -2265,7 +2285,7 @@ gtk_label_class_init (GtkLabelClass *class)
* Applications may also emit the signal with g_signal_emit_by_name()
* if they need to control activation of URIs programmatically.
*
- * The default bindings for this signal are all forms of the Enter key.
+ * The default bindings for this signal are all forms of the <kbd>Enter</kbd> key.
*/
signals[ACTIVATE_CURRENT_LINK] =
g_signal_new_class_handler (I_("activate-current-link"),
@@ -2343,7 +2363,8 @@ gtk_label_class_init (GtkLabelClass *class)
/**
* GtkLabel:use-underline: (attributes org.gtk.Property.get=gtk_label_get_use_underline org.gtk.Property.set=gtk_label_set_use_underline)
*
- * %TRUE if the text of the label indicates a mnemonic with _.
+ * %TRUE if the text of the label indicates a mnemonic with an _
+ * before the mnemonic character.
*/
label_props[PROP_USE_UNDERLINE] =
g_param_spec_boolean ("use-underline", NULL, NULL,
@@ -3214,10 +3235,10 @@ gtk_label_set_attributes (GtkLabel *self,
*
* This is the [struct@Pango.AttrList] that was set on the label using
* [method@Gtk.Label.set_attributes], if any. This function does not
- * reflect attributes that come from the labels markup (see
+ * reflect attributes that come from the label's markup (see
* [method@Gtk.Label.set_markup]). If you want to get the effective
* attributes for the label, use
- * `pango_layout_get_attribute (gtk_label_get_layout (self))`.
+ * `pango_layout_get_attributes (gtk_label_get_layout (self))`.
*
* Returns: (nullable) (transfer none): the attribute list
*/
@@ -3867,7 +3888,7 @@ gtk_label_get_justify (GtkLabel *self)
* @self: a `GtkLabel`
* @mode: a `PangoEllipsizeMode`
*
- * Sets the mode used to ellipsizei the text.
+ * Sets the mode used to ellipsize the text.
*
* The text will be ellipsized if there is not enough space
* to render the entire string.
@@ -5872,7 +5893,7 @@ gtk_label_get_xalign (GtkLabel *self)
}
/**
- * gtk_label_set_yalign: (attributes org.gtk.Method.get_property=yalign)
+ * gtk_label_set_yalign: (attributes org.gtk.Method.set_property=yalign)
* @self: a `GtkLabel`
* @yalign: the new yalign value, between 0 and 1
*
@@ -5898,7 +5919,7 @@ gtk_label_set_yalign (GtkLabel *self,
}
/**
- * gtk_label_get_yalign: (attributes org.gtk.Method.set_property=yalign)
+ * gtk_label_get_yalign: (attributes org.gtk.Method.get_property=yalign)
* @self: a `GtkLabel`
*
* Gets the `yalign` of the label.
diff --git a/gtk/gtklinkbutton.c b/gtk/gtklinkbutton.c
index 25ed3d2333..d92991b799 100644
--- a/gtk/gtklinkbutton.c
+++ b/gtk/gtklinkbutton.c
@@ -57,9 +57,9 @@
#include "gtklinkbutton.h"
#include "gtkdragsource.h"
+#include "gtkfilelauncher.h"
#include "gtkgestureclick.h"
#include "gtkgesturesingle.h"
-#include <glib/gi18n-lib.h>
#include "gtklabel.h"
#include "gtkmain.h"
#include "gtkmarshalers.h"
@@ -71,6 +71,7 @@
#include "gtkwidgetprivate.h"
#include <string.h>
+#include <glib/gi18n-lib.h>
typedef struct _GtkLinkButtonClass GtkLinkButtonClass;
@@ -230,7 +231,7 @@ gtk_link_button_class_init (GtkLinkButtonClass *klass)
/**
* GtkLinkButton|menu.popup:
*
- * Opens the context menu.
+ * Opens the context menu.
*/
gtk_widget_class_install_action (widget_class, "menu.popup", NULL, gtk_link_button_popup_menu);
@@ -303,7 +304,7 @@ gtk_link_content_get_value (GdkContentProvider *provider,
content->link != NULL)
{
char *uri;
-
+
uri = g_strdup_printf ("%s\r\n", content->link->uri);
g_value_set_string (value, uri);
g_free (uri);
@@ -381,7 +382,7 @@ gtk_link_button_get_property (GObject *object,
GParamSpec *pspec)
{
GtkLinkButton *link_button = GTK_LINK_BUTTON (object);
-
+
switch (prop_id)
{
case PROP_URI:
@@ -403,7 +404,7 @@ gtk_link_button_set_property (GObject *object,
GParamSpec *pspec)
{
GtkLinkButton *link_button = GTK_LINK_BUTTON (object);
-
+
switch (prop_id)
{
case PROP_URI:
@@ -479,13 +480,31 @@ static gboolean
gtk_link_button_activate_link (GtkLinkButton *link_button)
{
GtkWidget *toplevel;
- GtkUriLauncher *launcher;
+ const char *uri_scheme;
toplevel = GTK_WIDGET (gtk_widget_get_root (GTK_WIDGET (link_button)));
- launcher = gtk_uri_launcher_new (link_button->uri);
- gtk_uri_launcher_launch (launcher, GTK_WINDOW (toplevel), NULL, NULL, NULL);
- g_object_unref (launcher);
+ uri_scheme = g_uri_peek_scheme (link_button->uri);
+ if (g_strcmp0 (uri_scheme, "file") == 0)
+ {
+ GFile *file = g_file_new_for_uri (link_button->uri);
+ GtkFileLauncher *launcher;
+
+ launcher = gtk_file_launcher_new (file);
+
+ gtk_file_launcher_launch (launcher, GTK_WINDOW (toplevel), NULL, NULL, NULL);
+
+ g_object_unref (launcher);
+ g_object_unref (file);
+ }
+ else
+ {
+ GtkUriLauncher *launcher = gtk_uri_launcher_new (link_button->uri);
+
+ gtk_uri_launcher_launch (launcher, GTK_WINDOW (toplevel), NULL, NULL, NULL);
+
+ g_object_unref (launcher);
+ }
gtk_link_button_set_visited (link_button, TRUE);
@@ -521,9 +540,9 @@ gtk_link_button_new (const char *uri)
{
char *utf8_uri = NULL;
GtkWidget *retval;
-
+
g_return_val_if_fail (uri != NULL, NULL);
-
+
if (g_utf8_validate (uri, -1, NULL))
{
utf8_uri = g_strdup (uri);
@@ -531,7 +550,7 @@ gtk_link_button_new (const char *uri)
else
{
GError *conv_err = NULL;
-
+
utf8_uri = g_locale_to_utf8 (uri, -1, NULL, NULL, &conv_err);
if (conv_err)
{
@@ -540,18 +559,18 @@ gtk_link_button_new (const char *uri)
uri,
conv_err->message);
g_error_free (conv_err);
-
+
utf8_uri = g_strdup (_("Invalid URI"));
}
}
-
+
retval = g_object_new (GTK_TYPE_LINK_BUTTON,
"label", utf8_uri,
"uri", uri,
NULL);
-
+
g_free (utf8_uri);
-
+
return retval;
}
@@ -569,9 +588,9 @@ gtk_link_button_new_with_label (const char *uri,
const char *label)
{
GtkWidget *retval;
-
+
g_return_val_if_fail (uri != NULL, NULL);
-
+
if (!label)
return gtk_link_button_new (uri);
@@ -583,7 +602,7 @@ gtk_link_button_new_with_label (const char *uri,
return retval;
}
-static gboolean
+static gboolean
gtk_link_button_query_tooltip_cb (GtkWidget *widget,
int x,
int y,
diff --git a/gtk/gtklistbox.c b/gtk/gtklistbox.c
index 7a2888df01..b449051f1b 100644
--- a/gtk/gtklistbox.c
+++ b/gtk/gtklistbox.c
@@ -72,7 +72,7 @@
* # CSS nodes
*
* |[<!-- language="plain" -->
- * list[.separators][.rich-list][.navigation-sidebar]
+ * list[.separators][.rich-list][.navigation-sidebar][.boxed-list]
* ╰── row[.activatable]
* ]|
*
@@ -81,6 +81,9 @@
* Each `GtkListBoxRow` uses a single CSS node named row. The row nodes get the
* .activatable style class added when appropriate.
*
+ * It may also carry the .boxed-list style class. In this case, the list will be
+ * automatically surrounded by a frame and have separators.
+ *
* The main list node may also carry style classes to select
* the style of [list presentation](section-list-widget.html#list-styles):
* .rich-list, .navigation-sidebar or .data-table.
diff --git a/gtk/gtklistitem.c b/gtk/gtklistitem.c
index 28614b62f8..f8a9e36036 100644
--- a/gtk/gtklistitem.c
+++ b/gtk/gtklistitem.c
@@ -323,7 +323,7 @@ gtk_list_item_set_child (GtkListItem *self,
gtk_list_item_widget_add_child (self->owner, child);
}
- g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_ITEM]);
+ g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_CHILD]);
}
/**
diff --git a/gtk/gtkmagnifier.c b/gtk/gtkmagnifier.c
index 04db746c44..e606ae23e8 100644
--- a/gtk/gtkmagnifier.c
+++ b/gtk/gtkmagnifier.c
@@ -20,6 +20,7 @@
#include "gtkmagnifierprivate.h"
#include "gtkwidgetprivate.h"
#include "gtksnapshot.h"
+#include "gtkcssboxesprivate.h"
enum {
PROP_INSPECTED = 1,
@@ -105,10 +106,23 @@ gtk_magnifier_snapshot (GtkWidget *widget,
{
GtkMagnifier *magnifier = GTK_MAGNIFIER (widget);
double width, height, paintable_width, paintable_height;
-
- if (gtk_widget_paintable_get_widget (GTK_WIDGET_PAINTABLE (magnifier->paintable)) == NULL)
+ GtkWidget *inspected;
+ GtkCssBoxes boxes;
+ const graphene_rect_t *content_rect;
+ const graphene_rect_t *border_rect;
+ graphene_point_t offset;
+
+ inspected = gtk_widget_paintable_get_widget (GTK_WIDGET_PAINTABLE (magnifier->paintable));
+ if (inspected == NULL)
return;
+ gtk_css_boxes_init (&boxes, inspected);
+ content_rect = gtk_css_boxes_get_content_rect (&boxes);
+ border_rect = gtk_css_boxes_get_border_rect (&boxes);
+
+ offset.x = content_rect->origin.x - border_rect->origin.x;
+ offset.y = content_rect->origin.y - border_rect->origin.y;
+
width = gtk_widget_get_width (widget);
height = gtk_widget_get_height (widget);
paintable_width = gdk_paintable_get_intrinsic_width (magnifier->paintable);
@@ -121,8 +135,8 @@ gtk_magnifier_snapshot (GtkWidget *widget,
gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT (width / 2, height / 2));
gtk_snapshot_scale (snapshot, magnifier->magnification, magnifier->magnification);
gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT (
- - CLAMP (magnifier->x, 0, paintable_width),
- - CLAMP (magnifier->y, 0, paintable_height)));
+ - CLAMP (magnifier->x + offset.x, 0, paintable_width),
+ - CLAMP (magnifier->y + offset.y, 0, paintable_height)));
gdk_paintable_snapshot (magnifier->paintable, snapshot, paintable_width, paintable_height);
gtk_snapshot_restore (snapshot);
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index 33109a0bc8..ad41fa5749 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -510,10 +510,8 @@ gettext_initialization (void)
setlocale_initialization ();
bindtextdomain (GETTEXT_PACKAGE, _gtk_get_localedir ());
- bindtextdomain (GETTEXT_PACKAGE "-properties", _gtk_get_localedir ());
#ifdef HAVE_BIND_TEXTDOMAIN_CODESET
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- bind_textdomain_codeset (GETTEXT_PACKAGE "-properties", "UTF-8");
#endif
}
diff --git a/gtk/gtkmediacontrols.c b/gtk/gtkmediacontrols.c
index 20935aa69d..e55577ffa0 100644
--- a/gtk/gtkmediacontrols.c
+++ b/gtk/gtkmediacontrols.c
@@ -399,6 +399,7 @@ update_playing (GtkMediaControls *controls)
{
gboolean playing;
const char *icon_name;
+ const char *tooltip_text;
if (controls->stream)
playing = gtk_media_stream_get_playing (controls->stream);
@@ -406,11 +407,18 @@ update_playing (GtkMediaControls *controls)
playing = FALSE;
if (playing)
- icon_name = "media-playback-pause-symbolic";
+ {
+ icon_name = "media-playback-pause-symbolic";
+ tooltip_text = C_("media controls tooltip", "Stop");
+ }
else
- icon_name = "media-playback-start-symbolic";
+ {
+ icon_name = "media-playback-start-symbolic";
+ tooltip_text = C_("media controls tooltip", "Play");
+ }
gtk_button_set_icon_name (GTK_BUTTON (controls->play_button), icon_name);
+ gtk_widget_set_tooltip_text (controls->play_button, tooltip_text);
}
static void
diff --git a/gtk/gtkopenuriportal.c b/gtk/gtkopenuriportal.c
index 10001cacf4..1bec7a1cb0 100644
--- a/gtk/gtkopenuriportal.c
+++ b/gtk/gtkopenuriportal.c
@@ -67,6 +67,12 @@ init_openuri_portal (void)
g_error_free (error);
}
+ if (gtk_xdp_open_uri_get_version (openuri) < 3)
+ {
+ g_warning ("Not a supported version of the OpenURI portal: %u", gtk_xdp_open_uri_get_version (openuri));
+ g_clear_object (&openuri);
+ }
+
g_object_unref (connection);
}
else
diff --git a/gtk/gtkpopover.c b/gtk/gtkpopover.c
index 78dc4034c2..f7fe4e4d82 100644
--- a/gtk/gtkpopover.c
+++ b/gtk/gtkpopover.c
@@ -443,17 +443,39 @@ create_popup_layout (GtkPopover *popover)
GtkWidget *parent;
GtkCssStyle *style;
GtkBorder shadow_width;
+ GtkNative *native;
+ double nx, ny;
+ graphene_rect_t bounds;
parent = gtk_widget_get_parent (GTK_WIDGET (popover));
- gtk_widget_get_surface_allocation (parent, &rect);
+ native = gtk_widget_get_native (parent);
+
if (priv->has_pointing_to)
{
- rect.x += priv->pointing_to.x;
- rect.y += priv->pointing_to.y;
- rect.width = priv->pointing_to.width;
- rect.height = priv->pointing_to.height;
+ graphene_matrix_t transform;
+ graphene_rect_t pointing_to = GRAPHENE_RECT_INIT (priv->pointing_to.x,
+ priv->pointing_to.y,
+ priv->pointing_to.width,
+ priv->pointing_to.height);
+
+ if (!gtk_widget_compute_transform (parent, GTK_WIDGET (native), &transform))
+ graphene_matrix_init_identity (&transform);
+
+ graphene_matrix_transform_bounds (&transform, &pointing_to, &bounds);
+ }
+ else
+ {
+ if (!gtk_widget_compute_bounds (parent, GTK_WIDGET (native), &bounds))
+ g_warning ("Failed to compute bounds");
}
+ gtk_native_get_surface_transform (native, &nx, &ny);
+
+ rect.x = (int) floor (bounds.origin.x + nx);
+ rect.y = (int) floor (bounds.origin.y + ny);
+ rect.width = (int) ceilf (bounds.size.width);
+ rect.width = (int) ceilf (bounds.size.height);
+
style = gtk_css_node_get_style (gtk_widget_get_css_node (GTK_WIDGET (priv->contents_widget)));
gtk_css_shadow_value_get_extents (style->background->box_shadow, &shadow_width);
@@ -1056,20 +1078,12 @@ gtk_popover_show (GtkWidget *widget)
{
if (!gtk_widget_get_focus_child (widget))
gtk_widget_child_focus (widget, GTK_DIR_TAB_FORWARD);
-
- gtk_grab_add (widget);
}
}
static void
gtk_popover_hide (GtkWidget *widget)
{
- GtkPopover *popover = GTK_POPOVER (widget);
- GtkPopoverPrivate *priv = gtk_popover_get_instance_private (popover);
-
- if (priv->autohide)
- gtk_grab_remove (widget);
-
gtk_popover_set_mnemonics_visible (GTK_POPOVER (widget), FALSE);
_gtk_widget_set_visible_flag (widget, FALSE);
gtk_widget_unmap (widget);
@@ -1116,6 +1130,9 @@ gtk_popover_map (GtkWidget *widget)
unset_surface_transform_changed_cb);
GTK_WIDGET_CLASS (gtk_popover_parent_class)->map (widget);
+
+ if (priv->autohide)
+ gtk_grab_add (widget);
}
static void
@@ -1125,6 +1142,9 @@ gtk_popover_unmap (GtkWidget *widget)
GtkPopoverPrivate *priv = gtk_popover_get_instance_private (popover);
GtkWidget *parent;
+ if (priv->autohide)
+ gtk_grab_remove (widget);
+
parent = gtk_widget_get_parent (widget);
gtk_widget_remove_surface_transform_changed_callback (parent,
priv->surface_transform_changed_cb);
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index ebe4cb706b..87a78508a7 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -1010,7 +1010,7 @@ gtk_range_get_slider_range (GtkRange *range,
else
{
if (slider_start)
- *slider_start = slider_bounds.origin.y;
+ *slider_start = slider_bounds.origin.x;
if (slider_end)
*slider_end = slider_bounds.origin.x + slider_bounds.size.width;
}
diff --git a/gtk/gtkrendernodepaintable.c b/gtk/gtkrendernodepaintable.c
index 87bb1ca19a..f7987bdd63 100644
--- a/gtk/gtkrendernodepaintable.c
+++ b/gtk/gtkrendernodepaintable.c
@@ -52,8 +52,8 @@ gtk_render_node_paintable_paintable_snapshot (GdkPaintable *paintable,
gtk_snapshot_save (snapshot);
gtk_snapshot_scale (snapshot,
- width / (self->bounds.size.width),
- height / (self->bounds.size.height));
+ width / ceilf (self->bounds.size.width),
+ height / ceilf (self->bounds.size.height));
gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT (-self->bounds.origin.x, -self->bounds.origin.y));
gtk_snapshot_push_clip (snapshot, &self->bounds);
diff --git a/gtk/gtkscalebutton.c b/gtk/gtkscalebutton.c
index 7b2c2a11a0..f64f122bed 100644
--- a/gtk/gtkscalebutton.c
+++ b/gtk/gtkscalebutton.c
@@ -71,8 +71,14 @@
*
* # CSS nodes
*
- * `GtkScaleButton` has a single CSS node with name button. To differentiate
- * it from a plain `GtkButton`, it gets the .scale style class.
+ * ```
+ * scalebutton.scale
+ * ╰── button.toggle
+ * ╰── <icon>
+ * ```
+ *
+ * `GtkScaleButton` has a single CSS node with name scalebutton and `.scale`
+ * style class, and contains a `button` node with a `.toggle` style class.
*/
@@ -811,6 +817,40 @@ gtk_scale_button_get_active (GtkScaleButton *button)
}
static void
+apply_orientation (GtkScaleButton *button,
+ GtkOrientation orientation)
+{
+ GtkScaleButtonPrivate *priv = gtk_scale_button_get_instance_private (button);
+
+ if (priv->applied_orientation != orientation)
+ {
+ priv->applied_orientation = orientation;
+
+ gtk_orientable_set_orientation (GTK_ORIENTABLE (priv->box), orientation);
+ gtk_orientable_set_orientation (GTK_ORIENTABLE (priv->scale), orientation);
+
+ if (orientation == GTK_ORIENTATION_VERTICAL)
+ {
+ gtk_box_reorder_child_after (GTK_BOX (priv->box), priv->scale,
+ priv->plus_button);
+ gtk_box_reorder_child_after (GTK_BOX (priv->box), priv->minus_button,
+ priv->scale);
+ gtk_widget_set_size_request (GTK_WIDGET (priv->scale), -1, SCALE_SIZE);
+ gtk_range_set_inverted (GTK_RANGE (priv->scale), TRUE);
+ }
+ else
+ {
+ gtk_box_reorder_child_after (GTK_BOX (priv->box), priv->scale,
+ priv->minus_button);
+ gtk_box_reorder_child_after (GTK_BOX (priv->box), priv->plus_button,
+ priv->scale);
+ gtk_widget_set_size_request (GTK_WIDGET (priv->scale), SCALE_SIZE, -1);
+ gtk_range_set_inverted (GTK_RANGE (priv->scale), FALSE);
+ }
+ }
+}
+
+static void
gtk_scale_button_set_orientation_private (GtkScaleButton *button,
GtkOrientation orientation)
{
@@ -819,6 +859,9 @@ gtk_scale_button_set_orientation_private (GtkScaleButton *button,
if (priv->orientation != orientation)
{
priv->orientation = orientation;
+
+ apply_orientation (button, priv->orientation);
+
g_object_notify (G_OBJECT (button), "orientation");
}
}
@@ -855,6 +898,8 @@ gtk_scale_popup (GtkWidget *widget)
GtkScaleButton *button = GTK_SCALE_BUTTON (widget);
GtkScaleButtonPrivate *priv = gtk_scale_button_get_instance_private (button);
+ apply_orientation (button, priv->orientation);
+
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->button), TRUE);
}
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index be3ab0d4fc..126cf7f30e 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -4194,9 +4194,7 @@ gtk_scrolled_window_set_child (GtkScrolledWindow *scrolled_window,
if (priv->child)
{
if (priv->auto_added_viewport)
- {
- gtk_viewport_set_child (GTK_VIEWPORT (priv->child), NULL);
- }
+ gtk_viewport_set_child (GTK_VIEWPORT (priv->child), NULL);
g_object_set (priv->child,
"hadjustment", NULL,
@@ -4204,6 +4202,7 @@ gtk_scrolled_window_set_child (GtkScrolledWindow *scrolled_window,
NULL);
g_clear_pointer (&priv->child, gtk_widget_unparent);
+ priv->auto_added_viewport = FALSE;
}
if (child)
diff --git a/gtk/gtksnapshot.c b/gtk/gtksnapshot.c
index 76005769d8..44123e9bae 100644
--- a/gtk/gtksnapshot.c
+++ b/gtk/gtksnapshot.c
@@ -300,6 +300,8 @@ gtk_snapshot_new (void)
* Returns the node that was constructed by @snapshot
* and frees @snapshot.
*
+ * See also [method@Gtk.Snapshot.to_node].
+ *
* Returns: (transfer full) (nullable): a newly-created [class@Gsk.RenderNode]
*/
GskRenderNode *
@@ -1569,11 +1571,16 @@ gtk_snapshot_pop_collect (GtkSnapshot *snapshot)
* Returns the render node that was constructed
* by @snapshot.
*
+ * Note that this function may return %NULL if nothing has been
+ * added to the snapshot or if its content does not produce pixels
+ * to be rendered.
+ *
* After calling this function, it is no longer possible to
* add more nodes to @snapshot. The only function that should
* be called after this is [method@GObject.Object.unref].
*
- * Returns: (transfer full) (nullable): the constructed `GskRenderNode`
+ * Returns: (transfer full) (nullable): the constructed `GskRenderNode` or
+ * %NULL if there are no nodes to render.
*/
GskRenderNode *
gtk_snapshot_to_node (GtkSnapshot *snapshot)
diff --git a/gtk/gtktext.c b/gtk/gtktext.c
index 53335ced05..c7316478e7 100644
--- a/gtk/gtktext.c
+++ b/gtk/gtktext.c
@@ -320,6 +320,8 @@ static void gtk_text_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec);
+static void gtk_text_notify (GObject *object,
+ GParamSpec *pspec);
static void gtk_text_finalize (GObject *object);
static void gtk_text_dispose (GObject *object);
@@ -738,6 +740,7 @@ gtk_text_class_init (GtkTextClass *class)
gobject_class->finalize = gtk_text_finalize;
gobject_class->set_property = gtk_text_set_property;
gobject_class->get_property = gtk_text_get_property;
+ gobject_class->notify = gtk_text_notify;
widget_class->map = gtk_text_map;
widget_class->unmap = gtk_text_unmap;
@@ -982,7 +985,7 @@ gtk_text_class_init (GtkTextClass *class)
* GtkText::activate:
* @self: The widget on which the signal is emitted
*
- * Emitted when the user hits the Enter key.
+ * Emitted when the user hits the <kbd>Enter</kbd> key.
*
* The default bindings for this signal are all forms
* of the <kbd>Enter</kbd> key.
@@ -1021,8 +1024,8 @@ gtk_text_class_init (GtkTextClass *class)
*
* - <kbd>←</kbd>, <kbd>→</kbd>, <kbd>↑</kbd>, <kbd>↓</kbd>
* move by individual characters/lines
- * - <kbd>Ctrl</kbd>-<kbd>→</kbd>, etc. move by words/paragraphs
- * - <kbd>Home</kbd>, <kbd>End</kbd> move to the ends of the buffer
+ * - <kbd>Ctrl</kbd>+<kbd>←</kbd>, etc. move by words/paragraphs
+ * - <kbd>Home</kbd> and <kbd>End</kbd> move to the ends of the buffer
*/
signals[MOVE_CURSOR] =
g_signal_new (I_("move-cursor"),
@@ -1073,7 +1076,7 @@ gtk_text_class_init (GtkTextClass *class)
* of characters.
*
* The default bindings for this signal are <kbd>Delete</kbd>
- * for deleting a character and <kbd>Ctrl</kbd>-<kbd>Delete</kbd>
+ * for deleting a character and <kbd>Ctrl</kbd>+<kbd>Delete</kbd>
* for deleting a word.
*/
signals[DELETE_FROM_CURSOR] =
@@ -1096,7 +1099,7 @@ gtk_text_class_init (GtkTextClass *class)
* This is a [keybinding signal](class.SignalAction.html).
*
* The default bindings for this signal are
- * <kbd>Backspace</kbd> and <kbd>Shift</kbd>-<kbd>Backspace</kbd>.
+ * <kbd>Backspace</kbd> and <kbd>Shift</kbd>+<kbd>Backspace</kbd>.
*/
signals[BACKSPACE] =
g_signal_new (I_("backspace"),
@@ -1116,8 +1119,8 @@ gtk_text_class_init (GtkTextClass *class)
* This is a [keybinding signal](class.SignalAction.html).
*
* The default bindings for this signal are
- * <kbd>Ctrl</kbd>-<kbd>x</kbd> and
- * <kbd>Shift</kbd>-<kbd>Delete</kbd>.
+ * <kbd>Ctrl</kbd>+<kbd>x</kbd> and
+ * <kbd>Shift</kbd>+<kbd>Delete</kbd>.
*/
signals[CUT_CLIPBOARD] =
g_signal_new (I_("cut-clipboard"),
@@ -1137,8 +1140,8 @@ gtk_text_class_init (GtkTextClass *class)
* This is a [keybinding signal](class.SignalAction.html).
*
* The default bindings for this signal are
- * <kbd>Ctrl</kbd>-<kbd>c</kbd> and
- * <kbd>Ctrl</kbd>-<kbd>Insert</kbd>.
+ * <kbd>Ctrl</kbd>+<kbd>c</kbd> and
+ * <kbd>Ctrl</kbd>+<kbd>Insert</kbd>.
*/
signals[COPY_CLIPBOARD] =
g_signal_new (I_("copy-clipboard"),
@@ -1158,7 +1161,7 @@ gtk_text_class_init (GtkTextClass *class)
* This is a [keybinding signal](class.SignalAction.html).
*
* The default bindings for this signal are
- * <kbd>Ctrl</kbd>-<kbd>v</kbd> and <kbd>Shift</kbd>-<kbd>Insert</kbd>.
+ * <kbd>Ctrl</kbd>+<kbd>v</kbd> and <kbd>Shift</kbd>+<kbd>Insert</kbd>.
*/
signals[PASTE_CLIPBOARD] =
g_signal_new (I_("paste-clipboard"),
@@ -1218,8 +1221,8 @@ gtk_text_class_init (GtkTextClass *class)
* This is a [keybinding signal](class.SignalAction.html).
*
* The default bindings for this signal are
- * <kbd>Ctrl</kbd>-<kbd>.</kbd> and
- * <kbd>Ctrl</kbd>-<kbd>;</kbd>
+ * <kbd>Ctrl</kbd>+<kbd>.</kbd> and
+ * <kbd>Ctrl</kbd>+<kbd>;</kbd>
*/
signals[INSERT_EMOJI] =
g_signal_new (I_("insert-emoji"),
@@ -1816,6 +1819,17 @@ gtk_text_get_property (GObject *object,
}
static void
+gtk_text_notify (GObject *object,
+ GParamSpec *pspec)
+{
+ if (pspec->name == I_("has-focus"))
+ gtk_text_check_cursor_blink (GTK_TEXT (object));
+
+ if (G_OBJECT_CLASS (gtk_text_parent_class)->notify)
+ G_OBJECT_CLASS (gtk_text_parent_class)->notify (object, pspec);
+}
+
+static void
gtk_text_ensure_text_handles (GtkText *self)
{
GtkTextPrivate *priv = gtk_text_get_instance_private (self);
@@ -3260,6 +3274,7 @@ gtk_text_focus_changed (GtkEventControllerFocus *controller,
gtk_text_im_set_focus_in (self);
gtk_text_reset_blink_time (self);
gtk_text_check_cursor_blink (self);
+ gtk_text_update_primary_selection (self);
}
else /* Focus out */
{
@@ -5364,6 +5379,9 @@ gtk_text_update_primary_selection (GtkText *self)
if (!gtk_widget_get_realized (GTK_WIDGET (self)))
return;
+ if (!gtk_widget_has_focus (GTK_WIDGET (self)))
+ return;
+
clipboard = gtk_widget_get_primary_clipboard (GTK_WIDGET (self));
if (priv->selection_bound != priv->current_pos)
@@ -6451,8 +6469,11 @@ static gboolean
cursor_blinks (GtkText *self)
{
GtkTextPrivate *priv = gtk_text_get_instance_private (self);
+ GtkRoot *root = gtk_widget_get_root (GTK_WIDGET (self));
- if (gtk_event_controller_focus_is_focus (GTK_EVENT_CONTROLLER_FOCUS (priv->focus_controller)) &&
+ if (gtk_widget_get_mapped (GTK_WIDGET (self)) &&
+ gtk_window_is_active (GTK_WINDOW (root)) &&
+ gtk_event_controller_focus_is_focus (GTK_EVENT_CONTROLLER_FOCUS (priv->focus_controller)) &&
priv->editable &&
priv->selection_bound == priv->current_pos)
{
diff --git a/gtk/gtktexthandle.c b/gtk/gtktexthandle.c
index a373c6527c..40e6c9c191 100644
--- a/gtk/gtktexthandle.c
+++ b/gtk/gtktexthandle.c
@@ -131,15 +131,26 @@ gtk_text_handle_present_surface (GtkTextHandle *handle)
GdkRectangle rect;
GtkRequisition req;
GtkWidget *parent;
+ GtkNative *native;
+ graphene_point_t point = GRAPHENE_POINT_INIT (handle->pointing_to.x, handle->pointing_to.y);
+ graphene_point_t transformed;
+ double nx, ny;
gtk_widget_get_preferred_size (widget, NULL, &req);
gtk_text_handle_get_padding (handle, &handle->border);
parent = gtk_widget_get_parent (widget);
- gtk_widget_get_surface_allocation (parent, &rect);
- rect.x += handle->pointing_to.x;
- rect.y += handle->pointing_to.y + handle->pointing_to.height - handle->border.top;
+ native = gtk_widget_get_native (parent);
+ gtk_native_get_surface_transform (native, &nx, &ny);
+
+ if (!gtk_widget_compute_point (parent, GTK_WIDGET (native),
+ &point, &transformed))
+ transformed = point;
+
+ rect.x = (int)(transformed.x + nx);
+ rect.y = (int)(transformed.y + ny) + handle->pointing_to.height - handle->border.top;
+
rect.width = req.width - handle->border.left - handle->border.right;
rect.height = 1;
diff --git a/gtk/gtktextiter.c b/gtk/gtktextiter.c
index 9ffbf581a3..faadaacb58 100644
--- a/gtk/gtktextiter.c
+++ b/gtk/gtktextiter.c
@@ -592,7 +592,7 @@ _gtk_text_iter_get_btree (const GtkTextIter *iter)
*
* Each character in a `GtkTextBuffer` has an offset,
* starting with 0 for the first character in the buffer.
- * Use [method@Gtk,TextBuffer.get_iter_at_offset] to convert
+ * Use [method@Gtk.TextBuffer.get_iter_at_offset] to convert
* an offset back into an iterator.
*
* Returns: a character offset
@@ -1198,7 +1198,7 @@ gtk_text_iter_get_toggled_tags (const GtkTextIter *iter,
* @iter is at the beginning of the tagged range, and that the
* character at @iter is inside the tagged range. In other
* words, unlike [method@Gtk.TextIter.ends_tag], if
- * this function returns %TRUE, [method@Gtk.TextIter.has_tag
+ * this function returns %TRUE, [method@Gtk.TextIter.has_tag]
* will also return %TRUE for the same parameters.
*
* Returns: whether @iter is the start of a range tagged with @tag
@@ -1661,7 +1661,7 @@ gtk_text_iter_ends_line (const GtkTextIter *iter)
* Returns %TRUE if @iter is the end iterator.
*
* This means it is one past the last dereferenceable iterator
- * in the buffer. gtk_text_iter_is_end() is the most efficient
+ * in the buffer. [method@Gtk.TextIter.is_end] is the most efficient
* way to check whether an iterator is the end iterator.
*
* Returns: whether @iter is the end iterator
@@ -3324,7 +3324,7 @@ gtk_text_iter_backward_word_start (GtkTextIter *iter)
* @iter: a `GtkTextIter`
* @count: number of times to move
*
- * Calls gtk_text_iter_forward_word_end() up to @count times.
+ * Calls [method@Gtk.TextIter.forward_word_end] up to @count times.
*
* Returns: %TRUE if @iter moved and is not the end iterator
*/
@@ -3342,7 +3342,7 @@ gtk_text_iter_forward_word_ends (GtkTextIter *iter,
* @iter: a `GtkTextIter`
* @count: number of times to move
*
- * Calls gtk_text_iter_backward_word_start() up to @count times.
+ * Calls [method@Gtk.TextIter.backward_word_start] up to @count times.
*
* Returns: %TRUE if @iter moved and is not the end iterator
*/
@@ -3400,7 +3400,7 @@ gtk_text_iter_backward_visible_word_start (GtkTextIter *iter)
* @iter: a `GtkTextIter`
* @count: number of times to move
*
- * Calls gtk_text_iter_forward_visible_word_end() up to @count times.
+ * Calls [method@Gtk.TextIter.forward_visible_word_end] up to @count times.
*
* Returns: %TRUE if @iter moved and is not the end iterator
*/
@@ -3418,7 +3418,7 @@ gtk_text_iter_forward_visible_word_ends (GtkTextIter *iter,
* @iter: a `GtkTextIter`
* @count: number of times to move
*
- * Calls gtk_text_iter_backward_visible_word_start() up to @count times.
+ * Calls [method@Gtk.TextIter.backward_visible_word_start] up to @count times.
*
* Returns: %TRUE if @iter moved and is not the end iterator
*/
@@ -3588,7 +3588,7 @@ gtk_text_iter_backward_sentence_start (GtkTextIter *iter)
* @iter: a `GtkTextIter`
* @count: number of sentences to move
*
- * Calls gtk_text_iter_forward_sentence_end() @count times.
+ * Calls [method@Gtk.TextIter.forward_sentence_end] @count times.
*
* If @count is negative, moves backward instead of forward.
*
@@ -3608,7 +3608,7 @@ gtk_text_iter_forward_sentence_ends (GtkTextIter *iter,
* @iter: a `GtkTextIter`
* @count: number of sentences to move
*
- * Calls gtk_text_iter_backward_sentence_start() up to @count times.
+ * Calls [method@Gtk.TextIter.backward_sentence_start] up to @count times.
*
* If @count is negative, moves forward instead of backward.
*
@@ -3712,7 +3712,7 @@ gtk_text_iter_forward_cursor_position (GtkTextIter *iter)
* gtk_text_iter_backward_cursor_position:
* @iter: a `GtkTextIter`
*
- * Like gtk_text_iter_forward_cursor_position(), but moves backward.
+ * Like [method@Gtk.TextIter.forward_cursor_position], but moves backward.
*
* Returns: %TRUE if we moved
*/
@@ -3782,7 +3782,7 @@ gtk_text_iter_forward_visible_cursor_position (GtkTextIter *iter)
* gtk_text_iter_backward_visible_cursor_position:
* @iter: a `GtkTextIter`
*
- * Moves @iter forward to the previous visible cursor position.
+ * Moves @iter backward to the previous visible cursor position.
*
* See [method@Gtk.TextIter.backward_cursor_position] for details.
*
@@ -3897,7 +3897,7 @@ gtk_text_iter_set_line_offset (GtkTextIter *iter,
* @iter: a `GtkTextIter`
* @byte_on_line: a byte index relative to the start of @iter’s current line
*
- * Same as gtk_text_iter_set_line_offset(), but works with a
+ * Same as [method@Gtk.TextIter.set_line_offset], but works with a
* byte index. The given byte index must be at
* the start of a character, it can’t be in the middle of a UTF-8
* encoded character.
@@ -3943,7 +3943,7 @@ gtk_text_iter_set_line_index (GtkTextIter *iter,
* @iter: a `GtkTextIter`
* @char_on_line: a character offset
*
- * Like gtk_text_iter_set_line_offset(), but the offset is in visible
+ * Like [method@Gtk.TextIter.set_line_offset], but the offset is in visible
* characters, i.e. text with a tag making it invisible is not
* counted in the offset.
*/
@@ -3984,7 +3984,7 @@ gtk_text_iter_set_visible_line_offset (GtkTextIter *iter,
* @iter: a `GtkTextIter`
* @byte_on_line: a byte index
*
- * Like gtk_text_iter_set_line_index(), but the index is in visible
+ * Like [method@Gtk.TextIter.set_line_index], but the index is in visible
* bytes, i.e. text with a tag making it invisible is not counted
* in the index.
*/
@@ -4128,7 +4128,7 @@ gtk_text_iter_set_offset (GtkTextIter *iter,
* Moves @iter forward to the “end iterator”, which points
* one past the last valid character in the buffer.
*
- * gtk_text_iter_get_char() called on the end iterator
+ * [method@Gtk.TextIter.get_char] called on the end iterator
* returns 0, which is convenient for writing loops.
*/
void
@@ -4480,7 +4480,7 @@ gtk_text_iter_forward_find_char (GtkTextIter *iter,
* @user_data: (closure): user data for @pred
* @limit: (nullable): search limit
*
- * Same as gtk_text_iter_forward_find_char(),
+ * Same as [method@Gtk.TextIter.forward_find_char],
* but goes backward from @iter.
*
* Returns: whether a match was found
@@ -5292,7 +5292,7 @@ lines_window_free (LinesWindow *win)
* @match_end: (out caller-allocates) (optional): return location for end of match
* @limit: (nullable): location of last possible @match_start, or %NULL for start of buffer
*
- * Same as gtk_text_iter_forward_search(), but moves backward.
+ * Same as [method@Gtk.TextIter.forward_search], but moves backward.
*
* @match_end will never be set to a `GtkTextIter` located after @iter,
* even if there is a possible @match_start before or at @iter.
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index 65b4816bff..04924ca829 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -1171,10 +1171,10 @@ gtk_text_view_class_init (GtkTextViewClass *klass)
*
* - <kbd>←</kbd>, <kbd>→</kbd>, <kbd>↑</kbd>, <kbd>↓</kbd>
* move by individual characters/lines
- * - <kbd>Ctrl</kbd>-<kbd>→</kbd>, etc. move by words/paragraphs
- * - <kbd>Home</kbd>, <kbd>End</kbd> move to the ends of the buffer
- * - <kbd>PgUp</kbd>, <kbd>PgDn</kbd> move vertically by pages
- * - <kbd>Ctrl</kbd>-<kbd>PgUp</kbd>, <kbd>Ctrl</kbd>-<kbd>PgDn</kbd>
+ * - <kbd>Ctrl</kbd>+<kbd>←</kbd>, etc. move by words/paragraphs
+ * - <kbd>Home</kbd> and <kbd>End</kbd> move to the ends of the buffer
+ * - <kbd>PgUp</kbd> and <kbd>PgDn</kbd> move vertically by pages
+ * - <kbd>Ctrl</kbd>+<kbd>PgUp</kbd> and <kbd>Ctrl</kbd>+<kbd>PgDn</kbd>
* move horizontally by pages
*/
signals[MOVE_CURSOR] =
@@ -1280,8 +1280,8 @@ gtk_text_view_class_init (GtkTextViewClass *klass)
* of characters.
*
* The default bindings for this signal are <kbd>Delete</kbd> for
- * deleting a character, <kbd>Ctrl</kbd>-<kbd>Delete</kbd> for
- * deleting a word and <kbd>Ctrl</kbd>-<kbd>Backspace</kbd> for
+ * deleting a character, <kbd>Ctrl</kbd>+<kbd>Delete</kbd> for
+ * deleting a word and <kbd>Ctrl</kbd>+<kbd>Backspace</kbd> for
* deleting a word backwards.
*/
signals[DELETE_FROM_CURSOR] =
@@ -1307,7 +1307,7 @@ gtk_text_view_class_init (GtkTextViewClass *klass)
* The ::backspace signal is a [keybinding signal](class.SignalAction.html).
*
* The default bindings for this signal are
- * <kbd>Backspace</kbd> and <kbd>Shift</kbd>-<kbd>Backspace</kbd>.
+ * <kbd>Backspace</kbd> and <kbd>Shift</kbd>+<kbd>Backspace</kbd>.
*/
signals[BACKSPACE] =
g_signal_new (I_("backspace"),
@@ -1327,8 +1327,8 @@ gtk_text_view_class_init (GtkTextViewClass *klass)
* The ::cut-clipboard signal is a [keybinding signal](class.SignalAction.html).
*
* The default bindings for this signal are
- * <kbd>Ctrl</kbd>-<kbd>x</kbd> and
- * <kbd>Shift</kbd>-<kbd>Delete</kbd>.
+ * <kbd>Ctrl</kbd>+<kbd>x</kbd> and
+ * <kbd>Shift</kbd>+<kbd>Delete</kbd>.
*/
signals[CUT_CLIPBOARD] =
g_signal_new (I_("cut-clipboard"),
@@ -1348,8 +1348,8 @@ gtk_text_view_class_init (GtkTextViewClass *klass)
* The ::copy-clipboard signal is a [keybinding signal](class.SignalAction.html).
*
* The default bindings for this signal are
- * <kbd>Ctrl</kbd>-<kbd>c</kbd> and
- * <kbd>Ctrl</kbd>-<kbd>Insert</kbd>.
+ * <kbd>Ctrl</kbd>+<kbd>c</kbd> and
+ * <kbd>Ctrl</kbd>+<kbd>Insert</kbd>.
*/
signals[COPY_CLIPBOARD] =
g_signal_new (I_("copy-clipboard"),
@@ -1370,8 +1370,8 @@ gtk_text_view_class_init (GtkTextViewClass *klass)
* The ::paste-clipboard signal is a [keybinding signal](class.SignalAction.html).
*
* The default bindings for this signal are
- * <kbd>Ctrl</kbd>-<kbd>v</kbd> and
- * <kbd>Shift</kbd>-<kbd>Insert</kbd>.
+ * <kbd>Ctrl</kbd>+<kbd>v</kbd> and
+ * <kbd>Shift</kbd>+<kbd>Insert</kbd>.
*/
signals[PASTE_CLIPBOARD] =
g_signal_new (I_("paste-clipboard"),
@@ -1411,10 +1411,10 @@ gtk_text_view_class_init (GtkTextViewClass *klass)
* The ::select-all signal is a [keybinding signal](class.SignalAction.html).
*
* The default bindings for this signal are
- * <kbd>Ctrl</kbd>-<kbd>a</kbd> and
- * <kbd>Ctrl</kbd>-<kbd>/</kbd> for selecting and
- * <kbd>Shift</kbd>-<kbd>Ctrl</kbd>-<kbd>a</kbd> and
- * <kbd>Ctrl</kbd>-<kbd>\</kbd> for unselecting.
+ * <kbd>Ctrl</kbd>+<kbd>a</kbd> and
+ * <kbd>Ctrl</kbd>+<kbd>/</kbd> for selecting and
+ * <kbd>Shift</kbd>+<kbd>Ctrl</kbd>+<kbd>a</kbd> and
+ * <kbd>Ctrl</kbd>+<kbd>\</kbd> for unselecting.
*/
signals[SELECT_ALL] =
g_signal_new_class_handler (I_("select-all"),
@@ -1507,8 +1507,8 @@ gtk_text_view_class_init (GtkTextViewClass *klass)
* The ::insert-emoji signal is a [keybinding signal](class.SignalAction.html).
*
* The default bindings for this signal are
- * <kbd>Ctrl</kbd>-<kbd>.</kbd> and
- * <kbd>Ctrl</kbd>-<kbd>;</kbd>
+ * <kbd>Ctrl</kbd>+<kbd>.</kbd> and
+ * <kbd>Ctrl</kbd>+<kbd>;</kbd>
*/
signals[INSERT_EMOJI] =
g_signal_new (I_("insert-emoji"),
@@ -5640,6 +5640,26 @@ gtk_text_view_click_gesture_pressed (GtkGestureClick *gesture,
if (state & GDK_SHIFT_MASK)
extends = TRUE;
+ if (n_press > 1)
+ {
+ GtkTextBuffer *buffer;
+ GtkTextIter cur, ins;
+
+ buffer = get_buffer (text_view);
+ get_iter_from_gesture (text_view, GTK_GESTURE (gesture),
+ &cur, NULL, NULL);
+ gtk_text_buffer_get_iter_at_mark (buffer, &ins,
+ gtk_text_buffer_get_insert (buffer));
+
+ /* Reset count if double/triple clicking on a different line */
+ if (gtk_text_iter_get_line (&cur) !=
+ gtk_text_iter_get_line (&ins))
+ {
+ gtk_event_controller_reset (GTK_EVENT_CONTROLLER (gesture));
+ n_press = 1;
+ }
+ }
+
switch (n_press)
{
case 1:
@@ -7173,6 +7193,8 @@ gtk_text_view_set_overwrite (GtkTextView *text_view,
* If @accepts_tab is %TRUE, a tab character is inserted. If @accepts_tab
* is %FALSE the keyboard focus is moved to the next widget in the focus
* chain.
+ *
+ * Focus can always be moved using <kbd>Ctrl</kbd>+<kbd>Tab</kbd>.
*/
void
gtk_text_view_set_accepts_tab (GtkTextView *text_view,
@@ -9229,7 +9251,8 @@ append_bubble_item (GtkTextView *text_view,
muxer = _gtk_widget_get_action_muxer (GTK_WIDGET (text_view), FALSE);
if (muxer)
{
- gtk_action_muxer_query_action (muxer, action_name, &enabled, &param_type, &state_type, NULL, NULL);
+ if (!gtk_action_muxer_query_action (muxer, action_name, &enabled, &param_type, &state_type, NULL, NULL))
+ return;
if (!enabled)
return;
diff --git a/gtk/gtktooltipwindow.c b/gtk/gtktooltipwindow.c
index a24bcb4157..341a606cf6 100644
--- a/gtk/gtktooltipwindow.c
+++ b/gtk/gtktooltipwindow.c
@@ -258,7 +258,7 @@ surface_transform_changed_cb (GtkWidget *widget,
const graphene_matrix_t *transform,
gpointer user_data)
{
- GtkTooltipWindow *window = GTK_TOOLTIP_WINDOW (widget);
+ GtkTooltipWindow *window = GTK_TOOLTIP_WINDOW (user_data);
gtk_tooltip_window_relayout (window);
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 123bf17745..162beee68c 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -1837,6 +1837,11 @@ gtk_widget_class_init (GtkWidgetClass *klass)
* @direction: the direction of the focus move
*
* Emitted when the focus is moved.
+ *
+ * The ::move-focus signal is a [keybinding signal](class.SignalAction.html).
+ *
+ * The default bindings for this signal are <kbd>Tab</kbd> to move forward,
+ * and <kbd>Shift</kbd>+<kbd>Tab</kbd> to move backward.
*/
widget_signals[MOVE_FOCUS] =
g_signal_new (I_("move-focus"),
@@ -10635,7 +10640,11 @@ gtk_widget_set_has_focus (GtkWidget *widget,
gboolean
gtk_widget_in_destruction (GtkWidget *widget)
{
- GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget);
+ GtkWidgetPrivate *priv;
+
+ g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
+
+ priv = gtk_widget_get_instance_private (widget);
return priv->in_destruction;
}
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index dced97168b..cf0fd50e3c 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -2023,7 +2023,7 @@ gtk_window_root_set_focus (GtkRoot *root,
synthesize_focus_change_events (self, old_focus, focus, GTK_CROSSING_FOCUS);
if (focus)
- gtk_widget_set_has_focus (focus, TRUE);
+ gtk_widget_set_has_focus (focus, priv->is_active);
g_set_object (&priv->focus_widget, focus);
diff --git a/gtk/inspector/action-editor.c b/gtk/inspector/action-editor.c
index 616a592096..ba838fbaf7 100644
--- a/gtk/inspector/action-editor.c
+++ b/gtk/inspector/action-editor.c
@@ -53,8 +53,7 @@ enum
{
PROP_0,
PROP_OWNER,
- PROP_NAME,
- PROP_SIZEGROUP
+ PROP_NAME
};
G_DEFINE_TYPE (GtkInspectorActionEditor, gtk_inspector_action_editor, GTK_TYPE_WIDGET)
@@ -73,6 +72,7 @@ activate_action (GtkWidget *button,
g_action_group_activate_action (G_ACTION_GROUP (r->owner), r->name, parameter);
else if (GTK_IS_ACTION_MUXER (r->owner))
gtk_action_muxer_activate_action (GTK_ACTION_MUXER (r->owner), r->name, parameter);
+
update_widgets (r);
}
@@ -97,13 +97,17 @@ state_changed (GtkWidget *editor,
GVariant *value;
value = gtk_inspector_variant_editor_get_value (editor);
- if (value)
- {
- if (G_IS_ACTION_GROUP (r->owner))
- g_action_group_change_action_state (G_ACTION_GROUP (r->owner), r->name, value);
- else if (GTK_IS_ACTION_MUXER (r->owner))
- gtk_action_muxer_change_action_state (GTK_ACTION_MUXER (r->owner), r->name, value);
- }
+ if (!value)
+ return;
+
+ g_variant_ref_sink (value);
+
+ if (G_IS_ACTION_GROUP (r->owner))
+ g_action_group_change_action_state (G_ACTION_GROUP (r->owner), r->name, value);
+ else if (GTK_IS_ACTION_MUXER (r->owner))
+ gtk_action_muxer_change_action_state (GTK_ACTION_MUXER (r->owner), r->name, value);
+
+ g_variant_unref (value);
}
static void
@@ -141,62 +145,38 @@ gtk_inspector_action_editor_init (GtkInspectorActionEditor *r)
}
static void
-update_enabled (GtkInspectorActionEditor *r,
- gboolean enabled)
-{
- r->enabled = enabled;
- if (r->parameter_entry)
- {
- gtk_widget_set_sensitive (r->parameter_entry, enabled);
- parameter_changed (r->parameter_entry, r);
- }
- if (r->activate_button)
- gtk_widget_set_sensitive (r->activate_button, enabled);
-}
-
-static void
-action_enabled_changed_cb (GActionGroup *group,
- const char *action_name,
- gboolean enabled,
- GtkInspectorActionEditor *r)
-{
- if (g_str_equal (action_name, r->name))
- update_enabled (r, enabled);
-}
-
-static void
-update_state (GtkInspectorActionEditor *r,
- GVariant *state)
-{
- if (r->state_entry)
- gtk_inspector_variant_editor_set_value (r->state_entry, state);
-}
-
-static void
-action_state_changed_cb (GActionGroup *group,
- const char *action_name,
- GVariant *state,
- GtkInspectorActionEditor *r)
-{
- if (g_str_equal (action_name, r->name))
- update_state (r, state);
-}
-
-static void
update_widgets (GtkInspectorActionEditor *r)
{
- GVariant *state = NULL;
+ GVariant *state;
if (G_IS_ACTION_GROUP (r->owner))
- g_action_group_query_action (G_ACTION_GROUP (r->owner), r->name,
- &r->enabled, &r->parameter_type, NULL, NULL,
- &state);
+ {
+ if (!g_action_group_query_action (G_ACTION_GROUP (r->owner), r->name,
+ &r->enabled, &r->parameter_type, NULL, NULL,
+ &state))
+ {
+ r->enabled = FALSE;
+ r->parameter_type = NULL;
+ state = NULL;
+ }
+ }
else if (GTK_IS_ACTION_MUXER (r->owner))
- gtk_action_muxer_query_action (GTK_ACTION_MUXER (r->owner), r->name,
- &r->enabled, &r->parameter_type, NULL, NULL,
- &state);
+ {
+ if (!gtk_action_muxer_query_action (GTK_ACTION_MUXER (r->owner), r->name,
+ &r->enabled, &r->parameter_type, NULL, NULL,
+ &state))
+ {
+ r->enabled = FALSE;
+ r->parameter_type = NULL;
+ state = NULL;
+ }
+ }
else
- state = NULL;
+ {
+ r->enabled = FALSE;
+ r->parameter_type = NULL;
+ state = NULL;
+ }
gtk_widget_set_sensitive (r->activate_button, r->enabled);
gtk_widget_set_sensitive (r->parameter_entry, r->enabled);
@@ -211,14 +191,8 @@ update_widgets (GtkInspectorActionEditor *r)
g_variant_type_free (r->state_type);
r->state_type = g_variant_type_copy (g_variant_get_type (state));
gtk_inspector_variant_editor_set_value (r->state_entry, state);
- }
- if (G_IS_ACTION_GROUP (r->owner))
- {
- g_signal_connect (r->owner, "action-enabled-changed",
- G_CALLBACK (action_enabled_changed_cb), r);
- g_signal_connect (r->owner, "action-state-changed",
- G_CALLBACK (action_state_changed_cb), r);
+ g_variant_unref (state);
}
}
@@ -228,18 +202,12 @@ dispose (GObject *object)
GtkInspectorActionEditor *r = GTK_INSPECTOR_ACTION_EDITOR (object);
GtkWidget *child;
- g_free (r->name);
- if (r->state_type)
- g_variant_type_free (r->state_type);
- if (r->owner)
- {
- g_signal_handlers_disconnect_by_func (r->owner, action_enabled_changed_cb, r);
- g_signal_handlers_disconnect_by_func (r->owner, action_state_changed_cb, r);
- }
-
while ((child = gtk_widget_get_first_child (GTK_WIDGET (r))))
gtk_widget_unparent (child);
+ g_clear_pointer (&r->name, g_free);
+ g_clear_pointer (&r->state_type, g_variant_type_free);
+
G_OBJECT_CLASS (gtk_inspector_action_editor_parent_class)->dispose (object);
}
@@ -278,12 +246,10 @@ set_property (GObject *object,
switch (param_id)
{
case PROP_OWNER:
- if (r->owner)
- {
- g_signal_handlers_disconnect_by_func (r->owner, action_enabled_changed_cb, r);
- g_signal_handlers_disconnect_by_func (r->owner, action_state_changed_cb, r);
- }
r->owner = g_value_get_object (value);
+ g_assert (r->owner == NULL ||
+ G_IS_ACTION_GROUP (r->owner) ||
+ GTK_IS_ACTION_MUXER (r->owner));
break;
case PROP_NAME:
@@ -334,10 +300,7 @@ gtk_inspector_action_editor_set (GtkInspectorActionEditor *self,
}
void
-gtk_inspector_action_editor_update (GtkInspectorActionEditor *r,
- gboolean enabled,
- GVariant *state)
+gtk_inspector_action_editor_update (GtkInspectorActionEditor *self)
{
- update_enabled (r, enabled);
- update_state (r, state);
+ update_widgets (self);
}
diff --git a/gtk/inspector/action-editor.h b/gtk/inspector/action-editor.h
index c918a9a55c..14bf3ce9f8 100644
--- a/gtk/inspector/action-editor.h
+++ b/gtk/inspector/action-editor.h
@@ -37,9 +37,7 @@ GtkWidget *gtk_inspector_action_editor_new (void);
void gtk_inspector_action_editor_set (GtkInspectorActionEditor *self,
GObject *owner,
const char *name);
-void gtk_inspector_action_editor_update (GtkInspectorActionEditor *self,
- gboolean enabled,
- GVariant *state);
+void gtk_inspector_action_editor_update (GtkInspectorActionEditor *self);
G_END_DECLS
diff --git a/gtk/inspector/action-holder.c b/gtk/inspector/action-holder.c
index 199741e3d2..4c3c43b9e5 100644
--- a/gtk/inspector/action-holder.c
+++ b/gtk/inspector/action-holder.c
@@ -8,6 +8,8 @@ struct _ActionHolder {
char *name;
};
+static guint changed_signal;
+
G_DEFINE_TYPE (ActionHolder, action_holder, G_TYPE_OBJECT)
static void
@@ -32,6 +34,15 @@ action_holder_class_init (ActionHolderClass *class)
GObjectClass *object_class = G_OBJECT_CLASS (class);
object_class->finalize = action_holder_finalize;
+
+ changed_signal =
+ g_signal_new ("changed",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_FIRST,
+ 0,
+ NULL, NULL,
+ NULL,
+ G_TYPE_NONE, 0);
}
ActionHolder *
@@ -59,3 +70,9 @@ action_holder_get_name (ActionHolder *holder)
{
return holder->name;
}
+
+void
+action_holder_changed (ActionHolder *holder)
+{
+ g_signal_emit (holder, changed_signal, 0);
+}
diff --git a/gtk/inspector/action-holder.h b/gtk/inspector/action-holder.h
index a3294e835d..e4cfeb9176 100644
--- a/gtk/inspector/action-holder.h
+++ b/gtk/inspector/action-holder.h
@@ -13,5 +13,6 @@ ActionHolder * action_holder_new (GObject *owner,
GObject *action_holder_get_owner (ActionHolder *holder);
const char *action_holder_get_name (ActionHolder *holder);
+void action_holder_changed (ActionHolder *holder);
#endif /* __ACTION_HOLDER_H__ */
diff --git a/gtk/inspector/actions.c b/gtk/inspector/actions.c
index eeac0a188e..3f2a2183a2 100644
--- a/gtk/inspector/actions.c
+++ b/gtk/inspector/actions.c
@@ -26,6 +26,8 @@
#include "gtkapplicationwindow.h"
#include "gtkwidgetprivate.h"
#include "gtkactionmuxerprivate.h"
+#include "gtkactionobserverprivate.h"
+#include "gtkactionobservableprivate.h"
#include "gtkpopover.h"
#include "gtklabel.h"
#include "gtkstack.h"
@@ -59,7 +61,10 @@ enum {
PROP_BUTTON
};
-G_DEFINE_TYPE (GtkInspectorActions, gtk_inspector_actions, GTK_TYPE_WIDGET)
+static void gtk_inspector_actions_observer_iface_init (GtkActionObserverInterface *iface);
+
+G_DEFINE_TYPE_WITH_CODE (GtkInspectorActions, gtk_inspector_actions, GTK_TYPE_WIDGET,
+ G_IMPLEMENT_INTERFACE (GTK_TYPE_ACTION_OBSERVER, gtk_inspector_actions_observer_iface_init))
static void
gtk_inspector_actions_init (GtkInspectorActions *sl)
@@ -120,27 +125,43 @@ setup_enabled_cb (GtkSignalListItemFactory *factory,
}
static void
-bind_enabled_cb (GtkSignalListItemFactory *factory,
- GtkListItem *list_item)
+update_enabled (ActionHolder *holder,
+ GtkLabel *label)
{
- gpointer item;
- GtkWidget *label;
- GObject *owner;
- const char *name;
+ GObject *owner = action_holder_get_owner (holder);
+ const char *name = action_holder_get_name (holder);
gboolean enabled = FALSE;
- item = gtk_list_item_get_item (list_item);
- label = gtk_list_item_get_child (list_item);
-
- owner = action_holder_get_owner (ACTION_HOLDER (item));
- name = action_holder_get_name (ACTION_HOLDER (item));
if (G_IS_ACTION_GROUP (owner))
enabled = g_action_group_get_action_enabled (G_ACTION_GROUP (owner), name);
- else if (GTK_IS_ACTION_MUXER (owner))
- gtk_action_muxer_query_action (GTK_ACTION_MUXER (owner), name,
- &enabled, NULL, NULL, NULL, NULL);
+ else if (!GTK_IS_ACTION_MUXER (owner) ||
+ !gtk_action_muxer_query_action (GTK_ACTION_MUXER (owner), name,
+ &enabled, NULL, NULL, NULL, NULL))
+ enabled = FALSE;
- gtk_label_set_label (GTK_LABEL (label), enabled ? "+" : "-");
+ gtk_label_set_label (label, enabled ? "+" : "-");
+}
+
+static void
+bind_enabled_cb (GtkSignalListItemFactory *factory,
+ GtkListItem *list_item)
+{
+ gpointer item = gtk_list_item_get_item (list_item);
+ GtkWidget *label = gtk_list_item_get_child (list_item);
+
+ g_signal_connect (item, "changed", G_CALLBACK (update_enabled), label);
+
+ update_enabled (ACTION_HOLDER (item), GTK_LABEL (label));
+}
+
+static void
+unbind_enabled_cb (GtkSignalListItemFactory *factory,
+ GtkListItem *list_item)
+{
+ gpointer item = gtk_list_item_get_item (list_item);
+ GtkWidget *label = gtk_list_item_get_child (list_item);
+
+ g_signal_handlers_disconnect_by_func (item, update_enabled, label);
}
static void
@@ -172,10 +193,9 @@ bind_parameter_cb (GtkSignalListItemFactory *factory,
name = action_holder_get_name (ACTION_HOLDER (item));
if (G_IS_ACTION_GROUP (owner))
parameter = (const char *)g_action_group_get_action_parameter_type (G_ACTION_GROUP (owner), name);
- else if (GTK_IS_ACTION_MUXER (owner))
- gtk_action_muxer_query_action (GTK_ACTION_MUXER (owner), name,
- NULL, (const GVariantType **)&parameter, NULL, NULL, NULL);
- else
+ else if (!GTK_IS_ACTION_MUXER (owner) ||
+ !gtk_action_muxer_query_action (GTK_ACTION_MUXER (owner), name,
+ NULL, (const GVariantType **)&parameter, NULL, NULL, NULL))
parameter = "(Unknown)";
gtk_label_set_label (GTK_LABEL (label), parameter);
@@ -196,26 +216,18 @@ setup_state_cb (GtkSignalListItemFactory *factory,
}
static void
-bind_state_cb (GtkSignalListItemFactory *factory,
- GtkListItem *list_item)
+update_state (ActionHolder *h,
+ GtkLabel *label)
{
- gpointer item;
- GtkWidget *label;
- GObject *owner;
- const char *name;
+ GObject *owner = action_holder_get_owner (h);
+ const char *name = action_holder_get_name (h);
GVariant *state;
- item = gtk_list_item_get_item (list_item);
- label = gtk_list_item_get_child (list_item);
-
- owner = action_holder_get_owner (ACTION_HOLDER (item));
- name = action_holder_get_name (ACTION_HOLDER (item));
if (G_IS_ACTION_GROUP (owner))
state = g_action_group_get_action_state (G_ACTION_GROUP (owner), name);
- else if (GTK_IS_ACTION_MUXER (owner))
- gtk_action_muxer_query_action (GTK_ACTION_MUXER (owner), name,
- NULL, NULL, NULL, NULL, &state);
- else
+ else if (!GTK_IS_ACTION_MUXER (owner) ||
+ !gtk_action_muxer_query_action (GTK_ACTION_MUXER (owner), name,
+ NULL, NULL, NULL, NULL, &state))
state = NULL;
if (state)
@@ -223,12 +235,34 @@ bind_state_cb (GtkSignalListItemFactory *factory,
char *state_string;
state_string = g_variant_print (state, FALSE);
- gtk_label_set_label (GTK_LABEL (label), state_string);
+ gtk_label_set_label (label, state_string);
g_free (state_string);
g_variant_unref (state);
}
else
- gtk_label_set_label (GTK_LABEL (label), "");
+ gtk_label_set_label (label, "");
+}
+
+static void
+bind_state_cb (GtkSignalListItemFactory *factory,
+ GtkListItem *list_item)
+{
+ gpointer item = gtk_list_item_get_item (list_item);
+ GtkWidget *label = gtk_list_item_get_child (list_item);
+
+ g_signal_connect (item, "changed", G_CALLBACK (update_state), label);
+
+ update_state (ACTION_HOLDER (item), GTK_LABEL (label));
+}
+
+static void
+unbind_state_cb (GtkSignalListItemFactory *factory,
+ GtkListItem *list_item)
+{
+ gpointer item = gtk_list_item_get_item (list_item);
+ GtkWidget *label = gtk_list_item_get_child (list_item);
+
+ g_signal_handlers_disconnect_by_func (item, update_state, label);
}
static void
@@ -243,23 +277,34 @@ setup_changes_cb (GtkSignalListItemFactory *factory,
}
static void
+update_changes (ActionHolder *h,
+ GtkInspectorActionEditor *editor)
+{
+ gtk_inspector_action_editor_update (editor);
+}
+
+static void
bind_changes_cb (GtkSignalListItemFactory *factory,
GtkListItem *list_item)
{
- gpointer item;
- GObject *owner;
- const char *name;
- GtkWidget *editor;
+ gpointer item = gtk_list_item_get_item (list_item);
+ GtkWidget *editor = gtk_list_item_get_child (list_item);
+ GObject *owner = action_holder_get_owner (ACTION_HOLDER (item));
+ const char *name = action_holder_get_name (ACTION_HOLDER (item));
- item = gtk_list_item_get_item (list_item);
- editor = gtk_list_item_get_child (list_item);
+ gtk_inspector_action_editor_set (GTK_INSPECTOR_ACTION_EDITOR (editor), owner, name);
- owner = action_holder_get_owner (ACTION_HOLDER (item));
- name = action_holder_get_name (ACTION_HOLDER (item));
+ g_signal_connect (item, "changed", G_CALLBACK (update_changes), editor);
+}
- gtk_inspector_action_editor_set (GTK_INSPECTOR_ACTION_EDITOR (editor),
- owner,
- name);
+static void
+unbind_changes_cb (GtkSignalListItemFactory *factory,
+ GtkListItem *list_item)
+{
+ gpointer item = gtk_list_item_get_item (list_item);
+ GtkWidget *editor = gtk_list_item_get_child (list_item);
+
+ g_signal_handlers_disconnect_by_func (item, update_changes, editor);
}
static void
@@ -324,6 +369,157 @@ refresh_all (GtkInspectorActions *sl)
reload (sl);
}
+static void
+action_changed (GtkInspectorActions *sl,
+ const char *name)
+{
+ unsigned int n_actions;
+
+ n_actions = g_list_model_get_n_items (G_LIST_MODEL (sl->actions));
+ for (unsigned int i = 0; i < n_actions; i++)
+ {
+ ActionHolder *h = ACTION_HOLDER (g_list_model_get_item (G_LIST_MODEL (sl->actions), i));
+
+ if (g_str_equal (action_holder_get_name (h), name))
+ {
+ action_holder_changed (h);
+ g_object_unref (h);
+ break;
+ }
+
+ g_object_unref (h);
+ }
+}
+
+static void
+action_enabled_changed (GActionGroup *group,
+ const char *action_name,
+ gboolean enabled,
+ GtkInspectorActions *sl)
+{
+ action_changed (sl, action_name);
+}
+
+static void
+action_state_changed (GActionGroup *group,
+ const char *action_name,
+ GVariant *state,
+ GtkInspectorActions *sl)
+{
+ action_changed (sl, action_name);
+}
+
+static void
+observer_action_added (GtkActionObserver *observer,
+ GtkActionObservable *observable,
+ const char *action_name,
+ const GVariantType *parameter_type,
+ gboolean enabled,
+ GVariant *state)
+{
+}
+
+static void
+observer_action_removed (GtkActionObserver *observer,
+ GtkActionObservable *observable,
+ const char *action_name)
+{
+}
+
+static void
+observer_action_enabled_changed (GtkActionObserver *observer,
+ GtkActionObservable *observable,
+ const char *action_name,
+ gboolean enabled)
+{
+ action_changed (GTK_INSPECTOR_ACTIONS (observer), action_name);
+}
+
+static void
+observer_action_state_changed (GtkActionObserver *observer,
+ GtkActionObservable *observable,
+ const char *action_name,
+ GVariant *state)
+{
+ action_changed (GTK_INSPECTOR_ACTIONS (observer), action_name);
+}
+
+static void
+observer_primary_accel_changed (GtkActionObserver *observer,
+ GtkActionObservable *observable,
+ const char *action_name,
+ const char *action_and_target)
+{
+}
+
+static void
+gtk_inspector_actions_observer_iface_init (GtkActionObserverInterface *iface)
+{
+ iface->action_added = observer_action_added;
+ iface->action_removed = observer_action_removed;
+ iface->action_enabled_changed = observer_action_enabled_changed;
+ iface->action_state_changed = observer_action_state_changed;
+ iface->primary_accel_changed = observer_primary_accel_changed;
+}
+
+static void
+connect (GtkInspectorActions *sl)
+{
+ if (G_IS_ACTION_GROUP (sl->object))
+ {
+ g_signal_connect (sl->object, "action-enabled-changed",
+ G_CALLBACK (action_enabled_changed), sl);
+ g_signal_connect (sl->object, "action-state-changed",
+ G_CALLBACK (action_state_changed), sl);
+ }
+ else if (GTK_IS_WIDGET (sl->object))
+ {
+ GtkActionMuxer *muxer;
+
+ muxer = _gtk_widget_get_action_muxer (GTK_WIDGET (sl->object), FALSE);
+
+ if (muxer)
+ {
+ int i;
+ char **names;
+
+ names = gtk_action_muxer_list_actions (muxer, FALSE);
+ for (i = 0; names[i]; i++)
+ {
+ gtk_action_observable_register_observer (GTK_ACTION_OBSERVABLE (muxer), names[i], GTK_ACTION_OBSERVER (sl));
+ }
+ g_strfreev (names);
+ }
+ }
+}
+
+static void
+disconnect (GtkInspectorActions *sl)
+{
+ if (G_IS_ACTION_GROUP (sl->object))
+ {
+ g_signal_handlers_disconnect_by_func (sl->object, action_enabled_changed, sl);
+ g_signal_handlers_disconnect_by_func (sl->object, action_state_changed, sl);
+ }
+ else if (GTK_IS_WIDGET (sl->object))
+ {
+ GtkActionMuxer *muxer;
+
+ muxer = _gtk_widget_get_action_muxer (GTK_WIDGET (sl->object), FALSE);
+
+ if (muxer)
+ {
+ int i;
+ char **names;
+
+ names = gtk_action_muxer_list_actions (muxer, FALSE);
+ for (i = 0; names[i]; i++)
+ gtk_action_observable_unregister_observer (GTK_ACTION_OBSERVABLE (muxer), names[i], GTK_ACTION_OBSERVER (sl));
+ g_strfreev (names);
+ }
+ }
+}
+
void
gtk_inspector_actions_set_object (GtkInspectorActions *sl,
GObject *object)
@@ -336,11 +532,17 @@ gtk_inspector_actions_set_object (GtkInspectorActions *sl,
page = gtk_stack_get_page (GTK_STACK (stack), GTK_WIDGET (sl));
gtk_stack_page_set_visible (page, FALSE);
+ if (sl->object)
+ disconnect (sl);
+
g_set_object (&sl->object, object);
gtk_column_view_sort_by_column (GTK_COLUMN_VIEW (sl->list), sl->name, GTK_SORT_ASCENDING);
loaded = reload (sl);
gtk_stack_page_set_visible (page, loaded);
+
+ if (sl->object)
+ connect (sl);
}
static void
@@ -420,6 +622,9 @@ dispose (GObject *object)
{
GtkInspectorActions *sl = GTK_INSPECTOR_ACTIONS (object);
+ if (sl->object)
+ disconnect (sl);
+
g_clear_object (&sl->sorted);
g_clear_object (&sl->actions);
g_clear_object (&sl->object);
@@ -452,12 +657,15 @@ gtk_inspector_actions_class_init (GtkInspectorActionsClass *klass)
gtk_widget_class_bind_template_callback (widget_class, bind_name_cb);
gtk_widget_class_bind_template_callback (widget_class, setup_enabled_cb);
gtk_widget_class_bind_template_callback (widget_class, bind_enabled_cb);
+ gtk_widget_class_bind_template_callback (widget_class, unbind_enabled_cb);
gtk_widget_class_bind_template_callback (widget_class, setup_parameter_cb);
gtk_widget_class_bind_template_callback (widget_class, bind_parameter_cb);
gtk_widget_class_bind_template_callback (widget_class, setup_state_cb);
gtk_widget_class_bind_template_callback (widget_class, bind_state_cb);
+ gtk_widget_class_bind_template_callback (widget_class, unbind_state_cb);
gtk_widget_class_bind_template_callback (widget_class, setup_changes_cb);
gtk_widget_class_bind_template_callback (widget_class, bind_changes_cb);
+ gtk_widget_class_bind_template_callback (widget_class, unbind_changes_cb);
gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BOX_LAYOUT);
}
diff --git a/gtk/inspector/actions.ui b/gtk/inspector/actions.ui
index a48b0ba638..55c3007f36 100644
--- a/gtk/inspector/actions.ui
+++ b/gtk/inspector/actions.ui
@@ -32,6 +32,7 @@
<object class="GtkSignalListItemFactory">
<signal name="setup" handler="setup_enabled_cb"/>
<signal name="bind" handler="bind_enabled_cb"/>
+ <signal name="unbind" handler="unbind_enabled_cb"/>
</object>
</property>
</object>
@@ -54,6 +55,7 @@
<object class="GtkSignalListItemFactory">
<signal name="setup" handler="setup_state_cb"/>
<signal name="bind" handler="bind_state_cb"/>
+ <signal name="unbind" handler="unbind_state_cb"/>
</object>
</property>
</object>
@@ -66,6 +68,7 @@
<object class="GtkSignalListItemFactory">
<signal name="setup" handler="setup_changes_cb"/>
<signal name="bind" handler="bind_changes_cb"/>
+ <signal name="unbind" handler="unbind_changes_cb"/>
</object>
</property>
</object>
diff --git a/gtk/inspector/clipboard.ui b/gtk/inspector/clipboard.ui
index bc9647f0bf..d5a1f53b62 100644
--- a/gtk/inspector/clipboard.ui
+++ b/gtk/inspector/clipboard.ui
@@ -13,80 +13,74 @@
<property name="margin-bottom">60</property>
<property name="spacing">10</property>
<child>
- <object class="GtkFrame">
+ <object class="GtkListBox" id="dnd_formats">
+ <property name="selection-mode">none</property>
+ <style>
+ <class name="rich-list"/>
+ <class name="boxed-list"/>
+ </style>
<child>
- <object class="GtkListBox" id="dnd_formats">
- <property name="selection-mode">none</property>
- <style>
- <class name="rich-list"/>
- </style>
+ <object class="GtkListBoxRow">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow">
- <property name="activatable">0</property>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
<child>
- <object class="GtkBox">
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel">
- <property name="label" translatable="yes">Drag and hold here</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="dnd_info">
- <property name="selectable">1</property>
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="ellipsize">end</property>
- <property name="hexpand">1</property>
- </object>
- </child>
+ <object class="GtkLabel">
+ <property name="label" translatable="yes">Drag and hold here</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
</object>
</child>
<child>
- <object class="GtkDropControllerMotion">
- <signal name="enter" handler="on_drop_enter" swapped="no"/>
+ <object class="GtkLabel" id="dnd_info">
+ <property name="selectable">1</property>
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="ellipsize">end</property>
+ <property name="hexpand">1</property>
</object>
</child>
</object>
</child>
+ <child>
+ <object class="GtkDropControllerMotion">
+ <signal name="enter" handler="on_drop_enter" swapped="no"/>
+ </object>
+ </child>
</object>
</child>
</object>
</child>
<child>
- <object class="GtkFrame">
+ <object class="GtkListBox" id="clipboard_formats">
+ <property name="selection-mode">none</property>
+ <style>
+ <class name="rich-list"/>
+ <class name="boxed-list"/>
+ </style>
<child>
- <object class="GtkListBox" id="clipboard_formats">
- <property name="selection-mode">none</property>
- <style>
- <class name="rich-list"/>
- </style>
+ <object class="GtkListBoxRow">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow">
- <property name="activatable">0</property>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
<child>
- <object class="GtkBox">
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel">
- <property name="label" translatable="yes">Clipboard</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="clipboard_info">
- <property name="selectable">1</property>
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="ellipsize">end</property>
- <property name="hexpand">1</property>
- </object>
- </child>
+ <object class="GtkLabel">
+ <property name="label" translatable="yes">Clipboard</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="clipboard_info">
+ <property name="selectable">1</property>
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="ellipsize">end</property>
+ <property name="hexpand">1</property>
</object>
</child>
</object>
@@ -96,36 +90,33 @@
</object>
</child>
<child>
- <object class="GtkFrame">
+ <object class="GtkListBox" id="primary_formats">
+ <property name="selection-mode">none</property>
+ <style>
+ <class name="rich-list"/>
+ <class name="boxed-list"/>
+ </style>
<child>
- <object class="GtkListBox" id="primary_formats">
- <property name="selection-mode">none</property>
- <style>
- <class name="rich-list"/>
- </style>
+ <object class="GtkListBoxRow">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow">
- <property name="activatable">0</property>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="label" translatable="yes">Primary</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ </object>
+ </child>
<child>
- <object class="GtkBox">
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel">
- <property name="label" translatable="yes">Primary</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="primary_info">
- <property name="selectable">1</property>
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="ellipsize">end</property>
- <property name="hexpand">1</property>
- </object>
- </child>
+ <object class="GtkLabel" id="primary_info">
+ <property name="selectable">1</property>
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="ellipsize">end</property>
+ <property name="hexpand">1</property>
</object>
</child>
</object>
diff --git a/gtk/inspector/general.c b/gtk/inspector/general.c
index 569622108a..7593e278e6 100644
--- a/gtk/inspector/general.c
+++ b/gtk/inspector/general.c
@@ -97,7 +97,7 @@ struct _GtkInspectorGeneral
GtkWidget *vk_device;
GtkWidget *vk_api_version;
GtkWidget *vk_driver_version;
- GtkWidget *app_id_frame;
+ GtkWidget *app_id_box;
GtkWidget *app_id;
GtkWidget *resource_path;
GtkWidget *prefix;
@@ -185,7 +185,7 @@ init_app_id (GtkInspectorGeneral *gen)
app = g_application_get_default ();
if (!app)
{
- gtk_widget_set_visible (gen->app_id_frame, FALSE);
+ gtk_widget_set_visible (gen->app_id_box, FALSE);
return;
}
@@ -1137,7 +1137,7 @@ gtk_inspector_general_class_init (GtkInspectorGeneralClass *klass)
gtk_widget_class_bind_template_child (widget_class, GtkInspectorGeneral, vk_device);
gtk_widget_class_bind_template_child (widget_class, GtkInspectorGeneral, vk_api_version);
gtk_widget_class_bind_template_child (widget_class, GtkInspectorGeneral, vk_driver_version);
- gtk_widget_class_bind_template_child (widget_class, GtkInspectorGeneral, app_id_frame);
+ gtk_widget_class_bind_template_child (widget_class, GtkInspectorGeneral, app_id_box);
gtk_widget_class_bind_template_child (widget_class, GtkInspectorGeneral, app_id);
gtk_widget_class_bind_template_child (widget_class, GtkInspectorGeneral, resource_path);
gtk_widget_class_bind_template_child (widget_class, GtkInspectorGeneral, prefix);
diff --git a/gtk/inspector/general.ui b/gtk/inspector/general.ui
index a75e532c3d..2fc389c635 100644
--- a/gtk/inspector/general.ui
+++ b/gtk/inspector/general.ui
@@ -13,166 +13,163 @@
<property name="margin-bottom">60</property>
<property name="spacing">10</property>
<child>
- <object class="GtkFrame" id="version_frame">
+ <object class="GtkListBox" id="version_box">
+ <property name="selection-mode">none</property>
<property name="halign">center</property>
+ <style>
+ <class name="rich-list"/>
+ <class name="boxed-list"/>
+ </style>
<child>
- <object class="GtkListBox" id="version_box">
- <property name="selection-mode">none</property>
- <style>
- <class name="rich-list"/>
- </style>
+ <object class="GtkListBoxRow">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="gtk_version_label">
- <property name="label" translatable="yes">GTK Version</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="gtk_version">
- <property name="selectable">1</property>
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="hexpand">1</property>
- </object>
- </child>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel" id="gtk_version_label">
+ <property name="label" translatable="yes">GTK Version</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="gtk_version">
+ <property name="selectable">1</property>
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="hexpand">1</property>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="gdk_backend_label">
- <property name="label" translatable="yes">GDK Backend</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="gdk_backend">
- <property name="selectable">1</property>
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="hexpand">1</property>
- </object>
- </child>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel" id="gdk_backend_label">
+ <property name="label" translatable="yes">GDK Backend</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="gdk_backend">
+ <property name="selectable">1</property>
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="hexpand">1</property>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="gsk_renderer_label">
- <property name="label" translatable="yes">GSK Renderer</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="gsk_renderer">
- <property name="selectable">1</property>
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="hexpand">1</property>
- </object>
- </child>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel" id="gsk_renderer_label">
+ <property name="label" translatable="yes">GSK Renderer</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="gsk_renderer">
+ <property name="selectable">1</property>
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="hexpand">1</property>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="pango_fontmap_label">
- <property name="label" translatable="yes">Pango Fontmap</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="pango_fontmap">
- <property name="selectable">1</property>
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="hexpand">1</property>
- </object>
- </child>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel" id="pango_fontmap_label">
+ <property name="label" translatable="yes">Pango Fontmap</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="pango_fontmap">
+ <property name="selectable">1</property>
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="hexpand">1</property>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="media_backend_label">
- <property name="label" translatable="yes">Media Backend</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="media_backend">
- <property name="selectable">1</property>
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="hexpand">1</property>
- </object>
- </child>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel" id="media_backend_label">
+ <property name="label" translatable="yes">Media Backend</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="media_backend">
+ <property name="selectable">1</property>
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="hexpand">1</property>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="input_method_label">
- <property name="label" translatable="yes">Input Method</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="im_module">
- <property name="selectable">1</property>
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="hexpand">1</property>
- </object>
- </child>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel" id="input_method_label">
+ <property name="label" translatable="yes">Input Method</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="im_module">
+ <property name="selectable">1</property>
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="hexpand">1</property>
</object>
</child>
</object>
@@ -183,62 +180,59 @@
</child>
<child>
- <object class="GtkFrame" id="app_id_frame">
+ <object class="GtkListBox" id="app_id_box">
+ <property name="selection-mode">none</property>
<property name="halign">center</property>
+ <style>
+ <class name="rich-list"/>
+ <class name="boxed-list"/>
+ </style>
<child>
- <object class="GtkListBox" id="app_id_box">
- <property name="selection-mode">none</property>
- <style>
- <class name="rich-list"/>
- </style>
+ <object class="GtkListBoxRow">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="app_id_label">
- <property name="label" translatable="yes">Application ID</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="app_id">
- <property name="selectable">1</property>
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="hexpand">1</property>
- </object>
- </child>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel" id="app_id_label">
+ <property name="label" translatable="yes">Application ID</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="app_id">
+ <property name="selectable">1</property>
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="hexpand">1</property>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="resource_path_label">
- <property name="label" translatable="yes">Resource Path</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="resource_path">
- <property name="selectable">1</property>
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="hexpand">1</property>
- </object>
- </child>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel" id="resource_path_label">
+ <property name="label" translatable="yes">Resource Path</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="resource_path">
+ <property name="selectable">1</property>
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="hexpand">1</property>
</object>
</child>
</object>
@@ -249,199 +243,196 @@
</child>
<child>
- <object class="GtkFrame" id="env_frame">
+ <object class="GtkListBox" id="env_box">
+ <property name="selection-mode">none</property>
<property name="halign">center</property>
+ <style>
+ <class name="rich-list"/>
+ <class name="boxed-list"/>
+ </style>
<child>
- <object class="GtkListBox" id="env_box">
- <property name="selection-mode">none</property>
- <style>
- <class name="rich-list"/>
- </style>
+ <object class="GtkListBoxRow">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="prefix_label">
- <property name="label" translatable="yes">Prefix</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="prefix">
- <property name="selectable">1</property>
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="ellipsize">end</property>
- <property name="hexpand">1</property>
- </object>
- </child>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel" id="prefix_label">
+ <property name="label" translatable="yes">Prefix</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="prefix">
+ <property name="selectable">1</property>
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="ellipsize">end</property>
+ <property name="hexpand">1</property>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="xdg_data_home_label">
- <property name="label">XDG_DATA_HOME</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="xdg_data_home">
- <property name="selectable">1</property>
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="ellipsize">end</property>
- <property name="hexpand">1</property>
- </object>
- </child>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel" id="xdg_data_home_label">
+ <property name="label">XDG_DATA_HOME</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="xdg_data_home">
+ <property name="selectable">1</property>
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="ellipsize">end</property>
+ <property name="hexpand">1</property>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="xdg_data_dirs_label">
- <property name="label">XDG_DATA_DIRS</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="xdg_data_dirs">
- <property name="selectable">1</property>
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="ellipsize">end</property>
- <property name="hexpand">1</property>
- </object>
- </child>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel" id="xdg_data_dirs_label">
+ <property name="label">XDG_DATA_DIRS</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="xdg_data_dirs">
+ <property name="selectable">1</property>
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="ellipsize">end</property>
+ <property name="hexpand">1</property>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="gtk_path_label">
- <property name="label">GTK_PATH</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="gtk_path">
- <property name="selectable">1</property>
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="ellipsize">end</property>
- <property name="hexpand">1</property>
- </object>
- </child>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel" id="gtk_path_label">
+ <property name="label">GTK_PATH</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="gtk_path">
+ <property name="selectable">1</property>
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="ellipsize">end</property>
+ <property name="hexpand">1</property>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="gtk_exe_prefix_label">
- <property name="label">GTK_EXE_PREFIX</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="gtk_exe_prefix">
- <property name="selectable">1</property>
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="ellipsize">end</property>
- <property name="hexpand">1</property>
- </object>
- </child>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel" id="gtk_exe_prefix_label">
+ <property name="label">GTK_EXE_PREFIX</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="gtk_exe_prefix">
+ <property name="selectable">1</property>
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="ellipsize">end</property>
+ <property name="hexpand">1</property>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="gtk_data_prefix_label">
- <property name="label">GTK_DATA_PREFIX</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="gtk_data_prefix">
- <property name="selectable">1</property>
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="ellipsize">end</property>
- <property name="hexpand">1</property>
- </object>
- </child>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel" id="gtk_data_prefix_label">
+ <property name="label">GTK_DATA_PREFIX</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="gtk_data_prefix">
+ <property name="selectable">1</property>
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="ellipsize">end</property>
+ <property name="hexpand">1</property>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="gsettings_schema_dir_label">
- <property name="label">GSETTINGS_SCHEMA_DIR</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="gsettings_schema_dir">
- <property name="selectable">1</property>
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="ellipsize">end</property>
- <property name="hexpand">1</property>
- </object>
- </child>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel" id="gsettings_schema_dir_label">
+ <property name="label">GSETTINGS_SCHEMA_DIR</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="gsettings_schema_dir">
+ <property name="selectable">1</property>
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="ellipsize">end</property>
+ <property name="hexpand">1</property>
</object>
</child>
</object>
@@ -451,89 +442,86 @@
</object>
</child>
<child>
- <object class="GtkFrame" id="display_frame">
+ <object class="GtkListBox" id="display_box">
+ <property name="selection-mode">none</property>
<property name="halign">center</property>
+ <style>
+ <class name="rich-list"/>
+ <class name="boxed-list"/>
+ </style>
<child>
- <object class="GtkListBox" id="display_box">
- <property name="selection-mode">none</property>
- <style>
- <class name="rich-list"/>
- </style>
+ <object class="GtkListBoxRow">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="display_label">
- <property name="label" translatable="yes">Display</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="display_name">
- <property name="selectable">1</property>
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="ellipsize">end</property>
- <property name="hexpand">1</property>
- </object>
- </child>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel" id="display_label">
+ <property name="label" translatable="yes">Display</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="display_name">
+ <property name="selectable">1</property>
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="ellipsize">end</property>
+ <property name="hexpand">1</property>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="display_rgba_label">
- <property name="label" translatable="yes">RGBA Visual</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- </object>
- </child>
- <child>
- <object class="GtkImage" id="display_rgba">
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="icon-name">object-select-symbolic</property>
- <property name="hexpand">1</property>
- </object>
- </child>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel" id="display_rgba_label">
+ <property name="label" translatable="yes">RGBA Visual</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImage" id="display_rgba">
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="icon-name">object-select-symbolic</property>
+ <property name="hexpand">1</property>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="display_composited_label">
- <property name="label" translatable="yes">Composited</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- </object>
- </child>
- <child>
- <object class="GtkImage" id="display_composited">
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="icon-name">object-select-symbolic</property>
- <property name="hexpand">1</property>
- </object>
- </child>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel" id="display_composited_label">
+ <property name="label" translatable="yes">Composited</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImage" id="display_composited">
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="icon-name">object-select-symbolic</property>
+ <property name="hexpand">1</property>
</object>
</child>
</object>
@@ -543,100 +531,94 @@
</object>
</child>
<child>
- <object class="GtkFrame" id="monitor_frame">
+ <object class="GtkListBox" id="monitor_box">
+ <property name="selection-mode">none</property>
<property name="halign">center</property>
- <child>
- <object class="GtkListBox" id="monitor_box">
- <property name="selection-mode">none</property>
- <style>
- <class name="rich-list"/>
- </style>
- </object>
- </child>
+ <style>
+ <class name="rich-list"/>
+ <class name="boxed-list"/>
+ </style>
</object>
</child>
<child>
- <object class="GtkFrame" id="gl_frame">
+ <object class="GtkListBox" id="gl_box">
+ <property name="selection-mode">none</property>
<property name="halign">center</property>
+ <style>
+ <class name="rich-list"/>
+ <class name="boxed-list"/>
+ </style>
<child>
- <object class="GtkListBox" id="gl_box">
- <property name="selection-mode">none</property>
- <style>
- <class name="rich-list"/>
- </style>
+ <object class="GtkListBoxRow">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="gl_version_label">
- <property name="label" translatable="yes">GL Version</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="gl_version">
- <property name="selectable">1</property>
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="ellipsize">end</property>
- <property name="hexpand">1</property>
- </object>
- </child>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel" id="gl_version_label">
+ <property name="label" translatable="yes">GL Version</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="gl_version">
+ <property name="selectable">1</property>
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="ellipsize">end</property>
+ <property name="hexpand">1</property>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow" id="gl_error_row">
+ <property name="activatable">0</property>
+ <property name="visible">0</property>
<child>
- <object class="GtkListBoxRow" id="gl_error_row">
- <property name="activatable">0</property>
- <property name="visible">0</property>
- <child>
- <object class="GtkBox">
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="gl_error">
- <property name="selectable">1</property>
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="ellipsize">end</property>
- <property name="hexpand">1</property>
- <style>
- <class name="error"/>
- </style>
- </object>
- </child>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel" id="gl_error">
+ <property name="selectable">1</property>
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="ellipsize">end</property>
+ <property name="hexpand">1</property>
+ <style>
+ <class name="error"/>
+ </style>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow" id="gl_vendor_row">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow" id="gl_vendor_row">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="gl_vendor_label">
- <property name="label" translatable="yes">GL Vendor</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="gl_vendor">
- <property name="selectable">1</property>
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="ellipsize">end</property>
- <property name="hexpand">1</property>
- </object>
- </child>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel" id="gl_vendor_label">
+ <property name="label" translatable="yes">GL Vendor</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="gl_vendor">
+ <property name="selectable">1</property>
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="ellipsize">end</property>
+ <property name="hexpand">1</property>
</object>
</child>
</object>
@@ -646,91 +628,88 @@
</object>
</child>
<child>
- <object class="GtkFrame" id="vulkan_frame">
+ <object class="GtkListBox" id="vulkan_box">
+ <property name="selection-mode">none</property>
<property name="halign">center</property>
+ <style>
+ <class name="rich-list"/>
+ <class name="boxed-list"/>
+ </style>
<child>
- <object class="GtkListBox" id="vulkan_box">
- <property name="selection-mode">none</property>
- <style>
- <class name="rich-list"/>
- </style>
+ <object class="GtkListBoxRow">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="vk_device_label">
- <property name="label" translatable="yes">Vulkan Device</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="vk_device">
- <property name="selectable">1</property>
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="ellipsize">end</property>
- <property name="hexpand">1</property>
- </object>
- </child>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel" id="vk_device_label">
+ <property name="label" translatable="yes">Vulkan Device</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="vk_device">
+ <property name="selectable">1</property>
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="ellipsize">end</property>
+ <property name="hexpand">1</property>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="vk_api_version_label">
- <property name="label" translatable="yes">Vulkan API version</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="vk_api_version">
- <property name="selectable">1</property>
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="ellipsize">end</property>
- <property name="hexpand">1</property>
- </object>
- </child>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel" id="vk_api_version_label">
+ <property name="label" translatable="yes">Vulkan API version</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="vk_api_version">
+ <property name="selectable">1</property>
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="ellipsize">end</property>
+ <property name="hexpand">1</property>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="vk_driver_version_label">
- <property name="label" translatable="yes">Vulkan driver version</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="vk_driver_version">
- <property name="selectable">1</property>
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="ellipsize">end</property>
- <property name="hexpand">1</property>
- </object>
- </child>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel" id="vk_driver_version_label">
+ <property name="label" translatable="yes">Vulkan driver version</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="vk_driver_version">
+ <property name="selectable">1</property>
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="ellipsize">end</property>
+ <property name="hexpand">1</property>
</object>
</child>
</object>
@@ -740,16 +719,13 @@
</object>
</child>
<child>
- <object class="GtkFrame" id="device_frame">
+ <object class="GtkListBox" id="device_box">
+ <property name="selection-mode">none</property>
<property name="halign">center</property>
- <child>
- <object class="GtkListBox" id="device_box">
- <property name="selection-mode">none</property>
- <style>
- <class name="rich-list"/>
- </style>
- </object>
- </child>
+ <style>
+ <class name="rich-list"/>
+ <class name="boxed-list"/>
+ </style>
</object>
</child>
</object>
@@ -771,13 +747,6 @@
<widget name="vk_driver_version_label"/>
<widget name="app_id_label"/>
<widget name="resource_path_label"/>
- <widget name="prefix_label"/>
- <widget name="xdg_data_home_label"/>
- <widget name="xdg_data_dirs_label"/>
- <widget name="gtk_path_label"/>
- <widget name="gtk_exe_prefix_label"/>
- <widget name="gtk_data_prefix_label"/>
- <widget name="gsettings_schema_dir_label"/>
<widget name="display_label"/>
<widget name="display_rgba_label"/>
<widget name="display_composited_label"/>
@@ -785,14 +754,14 @@
</object>
<object class="GtkSizeGroup">
<widgets>
- <widget name="version_frame"/>
- <widget name="app_id_frame"/>
- <widget name="gl_frame"/>
- <widget name="monitor_frame"/>
- <widget name="vulkan_frame"/>
- <widget name="env_frame"/>
- <widget name="display_frame"/>
- <widget name="device_frame"/>
+ <widget name="version_box"/>
+ <widget name="app_id_box"/>
+ <widget name="gl_box"/>
+ <widget name="monitor_box"/>
+ <widget name="vulkan_box"/>
+ <widget name="env_box"/>
+ <widget name="display_box"/>
+ <widget name="device_box"/>
</widgets>
</object>
</interface>
diff --git a/gtk/inspector/misc-info.c b/gtk/inspector/misc-info.c
index 1f9c13d9f5..a9a061927e 100644
--- a/gtk/inspector/misc-info.c
+++ b/gtk/inspector/misc-info.c
@@ -32,6 +32,7 @@
#include "gtkmenubutton.h"
#include "gtkwidgetprivate.h"
#include "gtkbinlayout.h"
+#include "gtkwidgetprivate.h"
struct _GtkInspectorMiscInfo
@@ -370,6 +371,10 @@ update_info (gpointer data)
g_list_free (list);
gtk_widget_set_visible (sl->tick_callback, gtk_widget_has_tick_callback (GTK_WIDGET (sl->object)));
+ gtk_widget_set_visible (sl->realized, gtk_widget_get_realized (GTK_WIDGET (sl->object)));
+ gtk_widget_set_visible (sl->mapped, gtk_widget_get_mapped (GTK_WIDGET (sl->object)));
+ gtk_widget_set_visible (sl->is_toplevel, GTK_IS_NATIVE (sl->object));
+ gtk_widget_set_visible (sl->child_visible, _gtk_widget_get_child_visible (GTK_WIDGET (sl->object)));
}
update_surface (sl);
@@ -497,6 +502,7 @@ gtk_inspector_misc_info_set_object (GtkInspectorMiscInfo *sl,
gtk_widget_set_visible (sl->mapped_row, GTK_IS_WIDGET (object));
gtk_widget_set_visible (sl->realized_row, GTK_IS_WIDGET (object));
gtk_widget_set_visible (sl->is_toplevel_row, GTK_IS_WIDGET (object));
+ gtk_widget_set_visible (sl->child_visible_row, GTK_IS_WIDGET (object));
gtk_widget_set_visible (sl->frame_clock_row, GTK_IS_WIDGET (object));
gtk_widget_set_visible (sl->buildable_id_row, GTK_IS_BUILDABLE (object));
gtk_widget_set_visible (sl->framecount_row, GDK_IS_FRAME_CLOCK (object));
diff --git a/gtk/inspector/misc-info.ui b/gtk/inspector/misc-info.ui
index efe9bccce8..3a7696b7a4 100644
--- a/gtk/inspector/misc-info.ui
+++ b/gtk/inspector/misc-info.ui
@@ -12,696 +12,609 @@
<property name="margin-bottom">60</property>
<property name="spacing">10</property>
<child>
- <object class="GtkFrame">
+ <object class="GtkListBox">
+ <property name="selection-mode">none</property>
<property name="halign">center</property>
+ <property name="hexpand">False</property>
+ <style>
+ <class name="rich-list"/>
+ <class name="boxed-list"/>
+ </style>
<child>
- <object class="GtkListBox">
- <property name="selection-mode">none</property>
+ <object class="GtkListBoxRow" id="address_row">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow" id="address_row">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="address_label">
- <property name="label" translatable="yes">Address</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- <property name="hexpand">1</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="address">
- <property name="selectable">1</property>
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- </object>
- </child>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel" id="address_label">
+ <property name="label" translatable="yes">Address</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ <property name="hexpand">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="address">
+ <property name="selectable">1</property>
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow" id="type_row">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow" id="type_row">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="type_label">
- <property name="label" translatable="yes">Type</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- <property name="hexpand">1</property>
- </object>
- </child>
- <child>
- <object class="GtkMenuButton" id="type">
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- </object>
- </child>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel" id="type_label">
+ <property name="label" translatable="yes">Type</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ <property name="hexpand">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuButton" id="type">
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow" id="refcount_row">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow" id="refcount_row">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="refcount_label">
- <property name="label" translatable="yes">Reference Count</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- <property name="hexpand">1</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="refcount">
- <property name="selectable">1</property>
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- </object>
- </child>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel" id="refcount_label">
+ <property name="label" translatable="yes">Reference Count</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ <property name="hexpand">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="refcount">
+ <property name="selectable">1</property>
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow" id="state_row">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow" id="state_row">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="state_label">
- <property name="label" translatable="yes">State</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- <property name="hexpand">1</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="state">
- <property name="selectable">1</property>
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- </object>
- </child>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel" id="state_label">
+ <property name="label" translatable="yes">State</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ <property name="hexpand">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="state">
+ <property name="selectable">1</property>
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow" id="direction_row">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow" id="direction_row">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="direction_label">
- <property name="label" translatable="yes">Direction</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- <property name="hexpand">1</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="direction">
- <property name="selectable">1</property>
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- </object>
- </child>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel" id="direction_label">
+ <property name="label" translatable="yes">Direction</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ <property name="hexpand">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="direction">
+ <property name="selectable">1</property>
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow" id="buildable_id_row">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow" id="buildable_id_row">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="buildable_id_label">
- <property name="label" translatable="yes">Buildable ID</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- <property name="hexpand">1</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="buildable_id">
- <property name="selectable">1</property>
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- </object>
- </child>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel" id="buildable_id_label">
+ <property name="label" translatable="yes">Buildable ID</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ <property name="hexpand">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="buildable_id">
+ <property name="selectable">1</property>
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow" id="mnemonic_label_row">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow" id="mnemonic_label_row">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel">
- <property name="label" translatable="yes">Mnemonic Label</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- <property name="hexpand">1</property>
- </object>
- </child>
- <child>
- <object class="GtkBox" id="mnemonic_label">
- <property name="spacing">10</property>
- <property name="halign">end</property>
- </object>
- </child>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="label" translatable="yes">Mnemonic Label</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ <property name="hexpand">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkBox" id="mnemonic_label">
+ <property name="spacing">10</property>
+ <property name="halign">end</property>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow" id="request_mode_row">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow" id="request_mode_row">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel">
- <property name="label" translatable="yes">Request Mode</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0</property>
- <property name="hexpand">1</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="request_mode">
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- </object>
- </child>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="label" translatable="yes">Request Mode</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0</property>
+ <property name="hexpand">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="request_mode">
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow" id="measure_info_row">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow" id="measure_info_row">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel">
- <property name="label" translatable="yes">Measure map</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0</property>
- <property name="hexpand">1</property>
- </object>
- </child>
- <child>
- <object class="GtkToggleButton" id="measure_show">
- <property name="label" translatable="yes">Show</property>
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <signal name="clicked" handler="update_measure_picture" swapped="yes" after="1" object="measure_picture"/>
- <signal name="clicked" handler="measure_graph_measure" after="1"/>
- </object>
- </child>
- <child>
- <object class="GtkToggleButton" id="measure_expand_toggle">
- <property name="label" translatable="yes">Expand</property>
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <signal name="clicked" handler="update_measure_picture" swapped="yes" after="1" object="measure_picture"/>
- </object>
- </child>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="label" translatable="yes">Measure map</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0</property>
+ <property name="hexpand">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkToggleButton" id="measure_show">
+ <property name="label" translatable="yes">Show</property>
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <signal name="clicked" handler="update_measure_picture" swapped="yes" after="1" object="measure_picture"/>
+ <signal name="clicked" handler="measure_graph_measure" after="1"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkToggleButton" id="measure_expand_toggle">
+ <property name="label" translatable="yes">Expand</property>
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <signal name="clicked" handler="update_measure_picture" swapped="yes" after="1" object="measure_picture"/>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow" id="measure_row">
+ <property name="activatable">0</property>
+ <property name="visible" bind-source="measure_show" bind-property="active" bind-flags="sync-create"/>
<child>
- <object class="GtkListBoxRow" id="measure_row">
- <property name="activatable">0</property>
- <property name="visible" bind-source="measure_show" bind-property="active" bind-flags="sync-create"/>
- <child>
- <object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
- <property name="spacing">40</property>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkPicture" id="measure_picture">
+ <property name="paintable">
+ <object class="GtkInspectorMeasureGraph" id="measure_graph" />
+ </property>
+ <property name="can-shrink">0</property>
+ <property name="hexpand">1</property>
<child>
- <object class="GtkPicture" id="measure_picture">
- <property name="paintable">
- <object class="GtkInspectorMeasureGraph" id="measure_graph" />
- </property>
- <property name="can-shrink">0</property>
- <property name="hexpand">1</property>
- <child>
- <object class="GtkDragSource">
- <signal name="prepare" handler="measure_picture_drag_prepare" swapped="no"/>
- </object>
- </child>
+ <object class="GtkDragSource">
+ <signal name="prepare" handler="measure_picture_drag_prepare" swapped="no"/>
</object>
</child>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow" id="allocated_size_row">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow" id="allocated_size_row">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel">
- <property name="label" translatable="yes">Allocation</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0</property>
- <property name="hexpand">1</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="allocated_size">
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- </object>
- </child>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="label" translatable="yes">Allocation</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0</property>
+ <property name="hexpand">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="allocated_size">
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow" id="baseline_row">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow" id="baseline_row">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel">
- <property name="label" translatable="yes">Baseline</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0</property>
- <property name="hexpand">1</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="baseline">
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- </object>
- </child>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="label" translatable="yes">Baseline</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0</property>
+ <property name="hexpand">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="baseline">
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow" id="surface_row">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow" id="surface_row">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="surface_label">
- <property name="label" translatable="yes">Surface</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- <property name="hexpand">1</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="surface">
- <property name="selectable">1</property>
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="ellipsize">end</property>
- </object>
- </child>
- <child>
- <object class="GtkButton" id="surface_button">
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="label" translatable="yes">Properties</property>
- <signal name="clicked" handler="show_surface"/>
- </object>
- </child>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel" id="surface_label">
+ <property name="label" translatable="yes">Surface</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ <property name="hexpand">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="surface">
+ <property name="selectable">1</property>
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="ellipsize">end</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkButton" id="surface_button">
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="label" translatable="yes">Properties</property>
+ <signal name="clicked" handler="show_surface"/>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow" id="renderer_row">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow" id="renderer_row">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="renderer_label">
- <property name="label" translatable="yes">Renderer</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- <property name="hexpand">1</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="renderer">
- <property name="selectable">1</property>
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="ellipsize">end</property>
- </object>
- </child>
- <child>
- <object class="GtkButton" id="renderer_button">
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="label" translatable="yes">Properties</property>
- <signal name="clicked" handler="show_renderer"/>
- </object>
- </child>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel" id="renderer_label">
+ <property name="label" translatable="yes">Renderer</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ <property name="hexpand">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="renderer">
+ <property name="selectable">1</property>
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="ellipsize">end</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkButton" id="renderer_button">
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="label" translatable="yes">Properties</property>
+ <signal name="clicked" handler="show_renderer"/>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow" id="frame_clock_row">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow" id="frame_clock_row">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="frame_clock_label">
- <property name="label" translatable="yes">Frame Clock</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- <property name="hexpand">1</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="frame_clock">
- <property name="selectable">1</property>
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="ellipsize">end</property>
- </object>
- </child>
- <child>
- <object class="GtkButton" id="frame_clock_button">
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="label" translatable="yes">Properties</property>
- <signal name="clicked" handler="show_frame_clock"/>
- </object>
- </child>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel" id="frame_clock_label">
+ <property name="label" translatable="yes">Frame Clock</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ <property name="hexpand">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="frame_clock">
+ <property name="selectable">1</property>
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="ellipsize">end</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkButton" id="frame_clock_button">
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="label" translatable="yes">Properties</property>
+ <signal name="clicked" handler="show_frame_clock"/>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow" id="tick_callback_row">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow" id="tick_callback_row">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel">
- <property name="label" translatable="yes">Tick Callback</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0</property>
- <property name="hexpand">1</property>
- </object>
- </child>
- <child>
- <object class="GtkImage" id="tick_callback">
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="icon-name">object-select-symbolic</property>
- </object>
- </child>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="label" translatable="yes">Tick Callback</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0</property>
+ <property name="hexpand">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImage" id="tick_callback">
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="icon-name">object-select-symbolic</property>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow" id="framecount_row">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow" id="framecount_row">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel">
- <property name="label" translatable="yes">Frame Count</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0</property>
- <property name="hexpand">1</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="framecount">
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- </object>
- </child>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="label" translatable="yes">Frame Count</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0</property>
+ <property name="hexpand">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="framecount">
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow" id="framerate_row">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow" id="framerate_row">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel">
- <property name="label" translatable="yes">Frame Rate</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0</property>
- <property name="hexpand">1</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="framerate">
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- </object>
- </child>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="label" translatable="yes">Frame Rate</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0</property>
+ <property name="hexpand">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="framerate">
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow" id="mapped_row">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow" id="mapped_row">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel">
- <property name="label" translatable="yes">Mapped</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0</property>
- <property name="hexpand">1</property>
- </object>
- </child>
- <child>
- <object class="GtkImage" id="mapped">
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="icon-name">object-select-symbolic</property>
- </object>
- </child>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="label" translatable="yes">Mapped</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0</property>
+ <property name="hexpand">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImage" id="mapped">
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="icon-name">object-select-symbolic</property>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow" id="realized_row">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow" id="realized_row">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel">
- <property name="label" translatable="yes">Realized</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0</property>
- <property name="hexpand">1</property>
- </object>
- </child>
- <child>
- <object class="GtkImage" id="realized">
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="icon-name">object-select-symbolic</property>
- </object>
- </child>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="label" translatable="yes">Realized</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0</property>
+ <property name="hexpand">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImage" id="realized">
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="icon-name">object-select-symbolic</property>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow" id="is_toplevel_row">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow" id="is_toplevel_row">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel">
- <property name="label" translatable="yes">Is Toplevel</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0</property>
- <property name="hexpand">1</property>
- </object>
- </child>
- <child>
- <object class="GtkImage" id="is_toplevel">
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="icon-name">object-select-symbolic</property>
- </object>
- </child>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="label" translatable="yes">Is Toplevel</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0</property>
+ <property name="hexpand">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImage" id="is_toplevel">
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="icon-name">object-select-symbolic</property>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow" id="child_visible_row">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow" id="child_visible_row">
- <property name="activatable">0</property>
- <child>
- <object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel">
- <property name="label" translatable="yes">Child Visible</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0</property>
- <property name="hexpand">1</property>
- </object>
- </child>
- <child>
- <object class="GtkImage" id="child_visible">
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="icon-name">object-select-symbolic</property>
- </object>
- </child>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="label" translatable="yes">Child Visible</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0</property>
+ <property name="hexpand">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImage" id="child_visible">
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="icon-name">object-select-symbolic</property>
</object>
</child>
</object>
diff --git a/gtk/inspector/variant-editor.c b/gtk/inspector/variant-editor.c
index cf8a16a3fc..52c99f05ce 100644
--- a/gtk/inspector/variant-editor.c
+++ b/gtk/inspector/variant-editor.c
@@ -21,7 +21,7 @@
#include "variant-editor.h"
#include "gtksizegroup.h"
-#include "gtktogglebutton.h"
+#include "gtkcheckbutton.h"
#include "gtkentry.h"
#include "gtklabel.h"
#include "gtkbox.h"
@@ -66,10 +66,11 @@ dispose (GObject *object)
GtkInspectorVariantEditor *self = GTK_INSPECTOR_VARIANT_EDITOR (object);
if (self->editor)
- {
+ {
g_signal_handlers_disconnect_by_func (self->editor, variant_editor_changed_cb, self->data);
gtk_widget_unparent (self->editor);
+ self->editor = NULL;
}
G_OBJECT_CLASS (gtk_inspector_variant_editor_parent_class)->dispose (object);
@@ -94,14 +95,18 @@ ensure_editor (GtkInspectorVariantEditor *self,
g_variant_type_equal (self->type, type))
return;
+ self->type = type;
+
if (g_variant_type_equal (type, G_VARIANT_TYPE_BOOLEAN))
{
if (self->editor)
gtk_widget_unparent (self->editor);
- self->editor = gtk_toggle_button_new_with_label ("FALSE");
+ self->editor = gtk_check_button_new ();
g_signal_connect (self->editor, "notify::active",
G_CALLBACK (variant_editor_changed_cb), self);
+
+ gtk_widget_set_parent (self->editor, GTK_WIDGET (self));
}
else if (g_variant_type_equal (type, G_VARIANT_TYPE_STRING))
{
@@ -112,6 +117,8 @@ ensure_editor (GtkInspectorVariantEditor *self,
gtk_editable_set_width_chars (GTK_EDITABLE (self->editor), 10);
g_signal_connect (self->editor, "notify::text",
G_CALLBACK (variant_editor_changed_cb), self);
+
+ gtk_widget_set_parent (self->editor, GTK_WIDGET (self));
}
else if (!GTK_IS_BOX (self->editor))
{
@@ -128,10 +135,9 @@ ensure_editor (GtkInspectorVariantEditor *self,
gtk_box_append (GTK_BOX (self->editor), label);
g_signal_connect (entry, "notify::text",
G_CALLBACK (variant_editor_changed_cb), self);
- }
- self->type = type;
- gtk_widget_set_parent (self->editor, GTK_WIDGET (self));
+ gtk_widget_set_parent (self->editor, GTK_WIDGET (self));
+ }
}
GtkWidget *
@@ -169,18 +175,14 @@ gtk_inspector_variant_editor_set_value (GtkWidget *editor,
ensure_editor (self, g_variant_get_type (value));
- g_signal_handlers_block_by_func (self->editor, variant_editor_changed_cb, self->data);
+ g_signal_handlers_block_by_func (self->editor, variant_editor_changed_cb, self);
if (g_variant_type_equal (self->type, G_VARIANT_TYPE_BOOLEAN))
{
- GtkToggleButton *tb = GTK_TOGGLE_BUTTON (self->editor);
-
- if (gtk_toggle_button_get_active (tb) != g_variant_get_boolean (value))
- {
- gtk_toggle_button_set_active (tb, g_variant_get_boolean (value));
- gtk_button_set_label (GTK_BUTTON (tb),
- g_variant_get_boolean (value) ? "TRUE" : "FALSE");
- }
+ GtkCheckButton *b = GTK_CHECK_BUTTON (self->editor);
+
+ if (gtk_check_button_get_active (b) != g_variant_get_boolean (value))
+ gtk_check_button_set_active (b, g_variant_get_boolean (value));
}
else if (g_variant_type_equal (self->type, G_VARIANT_TYPE_STRING))
{
@@ -201,7 +203,7 @@ gtk_inspector_variant_editor_set_value (GtkWidget *editor,
g_free (text);
}
- g_signal_handlers_unblock_by_func (self->editor, variant_editor_changed_cb, self->data);
+ g_signal_handlers_unblock_by_func (self->editor, variant_editor_changed_cb, self);
}
GVariant *
@@ -215,8 +217,8 @@ gtk_inspector_variant_editor_get_value (GtkWidget *editor)
if (g_variant_type_equal (self->type, G_VARIANT_TYPE_BOOLEAN))
{
- GtkToggleButton *tb = GTK_TOGGLE_BUTTON (self->editor);
- value = g_variant_new_boolean (gtk_toggle_button_get_active (tb));
+ GtkCheckButton *b = GTK_CHECK_BUTTON (self->editor);
+ value = g_variant_new_boolean (gtk_check_button_get_active (b));
}
else if (g_variant_type_equal (self->type, G_VARIANT_TYPE_STRING))
{
diff --git a/gtk/inspector/visual.ui b/gtk/inspector/visual.ui
index e125449bab..310d8ce2d1 100644
--- a/gtk/inspector/visual.ui
+++ b/gtk/inspector/visual.ui
@@ -16,352 +16,349 @@
<property name="margin-bottom">60</property>
<property name="spacing">10</property>
<child>
- <object class="GtkFrame" id="visual_frame">
+ <object class="GtkListBox" id="visual_box">
+ <property name="selection-mode">none</property>
<property name="halign">center</property>
+ <style>
+ <class name="rich-list"/>
+ <class name="boxed-list"/>
+ </style>
<child>
- <object class="GtkListBox" id="visual_box">
- <property name="selection-mode">none</property>
- <style>
- <class name="rich-list"/>
- </style>
+ <object class="GtkListBoxRow">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow">
- <property name="activatable">0</property>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
<child>
- <object class="GtkBox">
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="theme_label">
- <property name="label" translatable="yes">GTK Theme</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- </object>
- </child>
- <child>
- <object class="GtkDropDown" id="theme_combo">
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="hexpand">1</property>
- </object>
- </child>
+ <object class="GtkLabel" id="theme_label">
+ <property name="label" translatable="yes">GTK Theme</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkDropDown" id="theme_combo">
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="hexpand">1</property>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow">
<child>
- <object class="GtkListBoxRow">
+ <object class="GtkBox">
+ <property name="spacing">40</property>
<child>
- <object class="GtkBox">
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="dark_label">
- <property name="label" translatable="yes">Dark Variant</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- </object>
- </child>
- <child>
- <object class="GtkSwitch" id="dark_switch">
- <property name="halign">end</property>
- <property name="valign">center</property>
- <property name="hexpand">1</property>
- </object>
- </child>
+ <object class="GtkLabel" id="dark_label">
+ <property name="label" translatable="yes">Dark Variant</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSwitch" id="dark_switch">
+ <property name="halign">end</property>
+ <property name="valign">center</property>
+ <property name="hexpand">1</property>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow">
- <property name="activatable">0</property>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
<child>
- <object class="GtkBox">
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="cursor_label">
- <property name="label" translatable="yes">Cursor Theme</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- </object>
- </child>
- <child>
- <object class="GtkDropDown" id="cursor_combo">
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="hexpand">1</property>
- </object>
- </child>
+ <object class="GtkLabel" id="cursor_label">
+ <property name="label" translatable="yes">Cursor Theme</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkDropDown" id="cursor_combo">
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="hexpand">1</property>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow">
- <property name="activatable">0</property>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
<child>
- <object class="GtkBox">
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="cursor_size_label">
- <property name="label" translatable="yes">Cursor Size</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- </object>
- </child>
- <child>
- <object class="GtkSpinButton" id="cursor_size_spin">
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="max-width-chars">2</property>
- <property name="width-chars">2</property>
- <property name="adjustment">
- <object class="GtkAdjustment" id="cursor_size_adjustment">
- <property name="lower">16</property>
- <property name="upper">128</property>
- <property name="step-increment">8</property>
- <property name="page-increment">8</property>
- </object>
- </property>
- <property name="snap-to-ticks">1</property>
- <property name="hexpand">1</property>
- </object>
- </child>
+ <object class="GtkLabel" id="cursor_size_label">
+ <property name="label" translatable="yes">Cursor Size</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="cursor_size_spin">
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="max-width-chars">2</property>
+ <property name="width-chars">2</property>
+ <property name="adjustment">
+ <object class="GtkAdjustment" id="cursor_size_adjustment">
+ <property name="lower">16</property>
+ <property name="upper">128</property>
+ <property name="step-increment">8</property>
+ <property name="page-increment">8</property>
+ </object>
+ </property>
+ <property name="snap-to-ticks">1</property>
+ <property name="hexpand">1</property>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow">
- <property name="activatable">0</property>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
<child>
- <object class="GtkBox">
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="icon_label">
- <property name="label" translatable="yes">Icon Theme</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- </object>
- </child>
- <child>
- <object class="GtkDropDown" id="icon_combo">
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="hexpand">1</property>
- </object>
- </child>
+ <object class="GtkLabel" id="icon_label">
+ <property name="label" translatable="yes">Icon Theme</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkDropDown" id="icon_combo">
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="hexpand">1</property>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow">
- <property name="activatable">0</property>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
<child>
- <object class="GtkBox">
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="font_label">
- <property name="label" translatable="yes">Font</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- </object>
- </child>
- <child>
- <object class="GtkFontButton" id="font_button">
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="hexpand">1</property>
- </object>
- </child>
+ <object class="GtkLabel" id="font_label">
+ <property name="label" translatable="yes">Font</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkFontButton" id="font_button">
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="hexpand">1</property>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow">
- <property name="activatable">0</property>
+ <object class="GtkBox">
+ <property name="spacing">20</property>
<child>
- <object class="GtkBox">
- <property name="spacing">20</property>
- <child>
- <object class="GtkLabel" id="font_scale_label">
- <property name="label" translatable="yes">Font Scale</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- </object>
- </child>
- <child>
- <object class="GtkScale" id="font_scale_scale">
- <property name="valign">baseline</property>
- <property name="adjustment">
- <object class="GtkAdjustment" id="font_scale_adjustment">
- <property name="lower">0.5</property>
- <property name="upper">2</property>
- <property name="step-increment">0.01</property>
- <property name="page-increment">0.01</property>
- </object>
- </property>
- <property name="draw-value">0</property>
- <property name="hexpand">1</property>
- <marks>
- <mark value="1.0" position="top"></mark>
- </marks>
- </object>
- </child>
- <child>
- <object class="GtkEntry" id="font_scale_entry">
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="width-chars">4</property>
- <property name="max-width-chars">4</property>
- <property name="input-purpose">number</property>
- </object>
- </child>
+ <object class="GtkLabel" id="font_scale_label">
+ <property name="label" translatable="yes">Font Scale</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkScale" id="font_scale_scale">
+ <property name="valign">baseline</property>
+ <property name="adjustment">
+ <object class="GtkAdjustment" id="font_scale_adjustment">
+ <property name="lower">0.5</property>
+ <property name="upper">2</property>
+ <property name="step-increment">0.01</property>
+ <property name="page-increment">0.01</property>
+ </object>
+ </property>
+ <property name="draw-value">0</property>
+ <property name="hexpand">1</property>
+ <marks>
+ <mark value="1.0" position="top"></mark>
+ </marks>
+ </object>
+ </child>
+ <child>
+ <object class="GtkEntry" id="font_scale_entry">
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="width-chars">4</property>
+ <property name="max-width-chars">4</property>
+ <property name="input-purpose">number</property>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow">
- <property name="activatable">0</property>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
<child>
- <object class="GtkBox">
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="direction_label">
- <property name="label" translatable="yes">Text Direction</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- </object>
- </child>
- <child>
- <object class="GtkDropDown" id="direction_combo">
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="hexpand">1</property>
- <signal name="notify::selected" handler="direction_changed"/>
- <property name="model">
- <object class="GtkStringList">
- <items>
- <item translatable="yes">Left-to-Right</item>
- <item translatable="yes">Right-to-Left</item>
- </items>
- </object>
- </property>
- </object>
- </child>
+ <object class="GtkLabel" id="direction_label">
+ <property name="label" translatable="yes">Text Direction</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkDropDown" id="direction_combo">
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="hexpand">1</property>
+ <signal name="notify::selected" handler="direction_changed"/>
+ <property name="model">
+ <object class="GtkStringList">
+ <items>
+ <item translatable="yes">Left-to-Right</item>
+ <item translatable="yes">Right-to-Left</item>
+ </items>
+ </object>
+ </property>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow">
- <property name="activatable">0</property>
+ <object class="GtkBox">
+ <property name="spacing">40</property>
<child>
- <object class="GtkBox">
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="hidpi_label">
- <property name="label" translatable="yes">Window Scaling</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- </object>
- </child>
- <child>
- <object class="GtkSpinButton" id="hidpi_spin">
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="adjustment">
- <object class="GtkAdjustment" id="scale_adjustment">
- <property name="lower">1</property>
- <property name="upper">3</property>
- <property name="step-increment">1</property>
- <property name="page-increment">1</property>
- </object>
- </property>
- <property name="snap-to-ticks">1</property>
- <property name="hexpand">1</property>
- </object>
- </child>
+ <object class="GtkLabel" id="hidpi_label">
+ <property name="label" translatable="yes">Window Scaling</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="hidpi_spin">
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="adjustment">
+ <object class="GtkAdjustment" id="scale_adjustment">
+ <property name="lower">1</property>
+ <property name="upper">3</property>
+ <property name="step-increment">1</property>
+ <property name="page-increment">1</property>
+ </object>
+ </property>
+ <property name="snap-to-ticks">1</property>
+ <property name="hexpand">1</property>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow">
<child>
- <object class="GtkListBoxRow">
+ <object class="GtkBox">
+ <property name="spacing">40</property>
<child>
- <object class="GtkBox">
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="animation_label">
- <property name="label" translatable="yes">Animations</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- </object>
- </child>
- <child>
- <object class="GtkSwitch" id="animation_switch">
- <property name="halign">end</property>
- <property name="valign">center</property>
- <property name="hexpand">1</property>
- </object>
- </child>
+ <object class="GtkLabel" id="animation_label">
+ <property name="label" translatable="yes">Animations</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSwitch" id="animation_switch">
+ <property name="halign">end</property>
+ <property name="valign">center</property>
+ <property name="hexpand">1</property>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow">
+ <property name="activatable">0</property>
<child>
- <object class="GtkListBoxRow">
- <property name="activatable">0</property>
+ <object class="GtkBox">
+ <property name="spacing">20</property>
<child>
- <object class="GtkBox">
- <property name="spacing">20</property>
- <child>
- <object class="GtkLabel" id="slowdown_label">
- <property name="label" translatable="yes">Slowdown</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- </object>
- </child>
- <child>
- <object class="GtkScale" id="slowdown_scale">
- <property name="adjustment">
- <object class="GtkAdjustment" id="slowdown_adjustment">
- <property name="lower">-3</property>
- <property name="upper">3</property>
- <property name="step-increment">1</property>
- <property name="page-increment">1</property>
- </object>
- </property>
- <property name="valign">baseline</property>
- <property name="draw-value">0</property>
- <property name="hexpand">1</property>
- <marks>
- <mark value="0.0" position="top"></mark>
- </marks>
- </object>
- </child>
- <child>
- <object class="GtkEntry" id="slowdown_entry">
- <property name="halign">end</property>
- <property name="valign">baseline</property>
- <property name="width-chars">4</property>
- <property name="max-width-chars">4</property>
- <property name="input-purpose">number</property>
- </object>
- </child>
+ <object class="GtkLabel" id="slowdown_label">
+ <property name="label" translatable="yes">Slowdown</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkScale" id="slowdown_scale">
+ <property name="adjustment">
+ <object class="GtkAdjustment" id="slowdown_adjustment">
+ <property name="lower">-3</property>
+ <property name="upper">3</property>
+ <property name="step-increment">1</property>
+ <property name="page-increment">1</property>
+ </object>
+ </property>
+ <property name="valign">baseline</property>
+ <property name="draw-value">0</property>
+ <property name="hexpand">1</property>
+ <marks>
+ <mark value="0.0" position="top"></mark>
+ </marks>
+ </object>
+ </child>
+ <child>
+ <object class="GtkEntry" id="slowdown_entry">
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="width-chars">4</property>
+ <property name="max-width-chars">4</property>
+ <property name="input-purpose">number</property>
</object>
</child>
</object>
@@ -371,261 +368,257 @@
</object>
</child>
<child>
- <object class="GtkFrame" id="debug_frame">
+ <object class="GtkListBox" id="debug_box">
+ <property name="selection-mode">none</property>
<property name="halign">center</property>
+ <style>
+ <class name="rich-list"/>
+ <class name="boxed-list"/>
+ </style>
<child>
- <object class="GtkListBox" id="debug_box">
- <property name="selection-mode">none</property>
- <property name="show-separators">1</property>
- <style>
- <class name="rich-list"/>
- </style>
+ <object class="GtkListBoxRow">
<child>
- <object class="GtkListBoxRow">
+ <object class="GtkBox">
+ <property name="spacing">40</property>
<child>
- <object class="GtkBox">
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="fps_label">
- <property name="label" translatable="yes">Show fps overlay</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- </object>
- </child>
- <child>
- <object class="GtkSwitch" id="fps_switch">
- <property name="halign">end</property>
- <property name="valign">center</property>
- <property name="hexpand">1</property>
- <signal name="notify::active" handler="fps_activate"/>
- </object>
- </child>
+ <object class="GtkLabel" id="fps_label">
+ <property name="label" translatable="yes">Show fps overlay</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSwitch" id="fps_switch">
+ <property name="halign">end</property>
+ <property name="valign">center</property>
+ <property name="hexpand">1</property>
+ <signal name="notify::active" handler="fps_activate"/>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow">
<child>
- <object class="GtkListBoxRow">
+ <object class="GtkBox">
+ <property name="spacing">40</property>
<child>
- <object class="GtkBox">
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="updates_label">
- <property name="label" translatable="yes">Show Graphic Updates</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- </object>
- </child>
- <child>
- <object class="GtkSwitch" id="updates_switch">
- <property name="halign">end</property>
- <property name="valign">center</property>
- <property name="hexpand">1</property>
- <signal name="notify::active" handler="updates_activate"/>
- </object>
- </child>
+ <object class="GtkLabel" id="updates_label">
+ <property name="label" translatable="yes">Show Graphic Updates</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSwitch" id="updates_switch">
+ <property name="halign">end</property>
+ <property name="valign">center</property>
+ <property name="hexpand">1</property>
+ <signal name="notify::active" handler="updates_activate"/>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow">
<child>
- <object class="GtkListBoxRow">
+ <object class="GtkBox">
+ <property name="spacing">40</property>
<child>
- <object class="GtkBox">
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="fallback_label">
- <property name="label" translatable="yes">Show Fallback Rendering</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- </object>
- </child>
- <child>
- <object class="GtkSwitch" id="fallback_switch">
- <property name="halign">end</property>
- <property name="valign">center</property>
- <property name="hexpand">1</property>
- <signal name="notify::active" handler="fallback_activate"/>
- </object>
- </child>
+ <object class="GtkLabel" id="fallback_label">
+ <property name="label" translatable="yes">Show Fallback Rendering</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSwitch" id="fallback_switch">
+ <property name="halign">end</property>
+ <property name="valign">center</property>
+ <property name="hexpand">1</property>
+ <signal name="notify::active" handler="fallback_activate"/>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow">
<child>
- <object class="GtkListBoxRow">
+ <object class="GtkBox">
+ <property name="spacing">40</property>
<child>
- <object class="GtkBox">
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="baselines_label">
- <property name="label" translatable="yes">Show Baselines</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- </object>
- </child>
- <child>
- <object class="GtkSwitch" id="baselines_switch">
- <property name="halign">end</property>
- <property name="valign">center</property>
- <property name="hexpand">1</property>
- <signal name="notify::active" handler="baselines_activate"/>
- </object>
- </child>
+ <object class="GtkLabel" id="baselines_label">
+ <property name="label" translatable="yes">Show Baselines</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSwitch" id="baselines_switch">
+ <property name="halign">end</property>
+ <property name="valign">center</property>
+ <property name="hexpand">1</property>
+ <signal name="notify::active" handler="baselines_activate"/>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow">
<child>
- <object class="GtkListBoxRow">
+ <object class="GtkBox">
+ <property name="spacing">40</property>
<child>
- <object class="GtkBox">
- <property name="spacing">40</property>
+ <object class="GtkBox" id="layout_label_box">
+ <property name="spacing">6</property>
<child>
- <object class="GtkBox" id="layout_label_box">
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="layout_label">
- <property name="label" translatable="yes">Show Layout Borders</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- </object>
- </child>
- <child>
- <object class="GtkMenuButton">
- <property name="icon-name">dialog-question-symbolic</property>
- <property name="popover">
- <object class="GtkPopover">
+ <object class="GtkLabel" id="layout_label">
+ <property name="label" translatable="yes">Show Layout Borders</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuButton">
+ <property name="icon-name">dialog-question-symbolic</property>
+ <property name="popover">
+ <object class="GtkPopover">
+ <child>
+ <object class="GtkGrid">
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="row-spacing">4</property>
+ <property name="column-spacing">4</property>
+ <child>
+ <object class="GtkDrawingArea">
+ <property name="name">css-padding-color</property>
+ <layout>
+ <property name="column">0</property>
+ <property name="row">0</property>
+ </layout>
+ </object>
+ </child>
+ <child>
+ <object class="GtkDrawingArea">
+ <property name="name">css-border-color</property>
+ <layout>
+ <property name="column">0</property>
+ <property name="row">1</property>
+ </layout>
+ </object>
+ </child>
+ <child>
+ <object class="GtkDrawingArea">
+ <property name="name">css-margin-color</property>
+ <layout>
+ <property name="column">0</property>
+ <property name="row">2</property>
+ </layout>
+ </object>
+ </child>
+ <child>
+ <object class="GtkDrawingArea">
+ <property name="name">widget-margin-color</property>
+ <layout>
+ <property name="column">0</property>
+ <property name="row">3</property>
+ </layout>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="label" translatable="yes">CSS Padding</property>
+ <property name="xalign">0</property>
+ <layout>
+ <property name="column">1</property>
+ <property name="row">0</property>
+ </layout>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="label" translatable="yes">CSS Border</property>
+ <property name="xalign">0</property>
+ <layout>
+ <property name="column">1</property>
+ <property name="row">1</property>
+ </layout>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="label" translatable="yes">CSS Margin</property>
+ <property name="xalign">0</property>
+ <layout>
+ <property name="column">1</property>
+ <property name="row">2</property>
+ </layout>
+ </object>
+ </child>
<child>
- <object class="GtkGrid">
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="row-spacing">4</property>
- <property name="column-spacing">4</property>
- <child>
- <object class="GtkDrawingArea">
- <property name="name">css-padding-color</property>
- <layout>
- <property name="column">0</property>
- <property name="row">0</property>
- </layout>
- </object>
- </child>
- <child>
- <object class="GtkDrawingArea">
- <property name="name">css-border-color</property>
- <layout>
- <property name="column">0</property>
- <property name="row">1</property>
- </layout>
- </object>
- </child>
- <child>
- <object class="GtkDrawingArea">
- <property name="name">css-margin-color</property>
- <layout>
- <property name="column">0</property>
- <property name="row">2</property>
- </layout>
- </object>
- </child>
- <child>
- <object class="GtkDrawingArea">
- <property name="name">widget-margin-color</property>
- <layout>
- <property name="column">0</property>
- <property name="row">3</property>
- </layout>
- </object>
- </child>
- <child>
- <object class="GtkLabel">
- <property name="label" translatable="yes">CSS Padding</property>
- <property name="xalign">0</property>
- <layout>
- <property name="column">1</property>
- <property name="row">0</property>
- </layout>
- </object>
- </child>
- <child>
- <object class="GtkLabel">
- <property name="label" translatable="yes">CSS Border</property>
- <property name="xalign">0</property>
- <layout>
- <property name="column">1</property>
- <property name="row">1</property>
- </layout>
- </object>
- </child>
- <child>
- <object class="GtkLabel">
- <property name="label" translatable="yes">CSS Margin</property>
- <property name="xalign">0</property>
- <layout>
- <property name="column">1</property>
- <property name="row">2</property>
- </layout>
- </object>
- </child>
- <child>
- <object class="GtkLabel">
- <property name="label" translatable="yes">Widget Margin</property>
- <property name="xalign">0</property>
- <layout>
- <property name="column">1</property>
- <property name="row">3</property>
- </layout>
- </object>
- </child>
+ <object class="GtkLabel">
+ <property name="label" translatable="yes">Widget Margin</property>
+ <property name="xalign">0</property>
+ <layout>
+ <property name="column">1</property>
+ <property name="row">3</property>
+ </layout>
</object>
</child>
</object>
- </property>
+ </child>
</object>
- </child>
- </object>
- </child>
- <child>
- <object class="GtkSwitch" id="layout_switch">
- <property name="halign">end</property>
- <property name="valign">center</property>
- <property name="hexpand">1</property>
- <signal name="notify::active" handler="layout_activate"/>
+ </property>
</object>
</child>
</object>
</child>
+ <child>
+ <object class="GtkSwitch" id="layout_switch">
+ <property name="halign">end</property>
+ <property name="valign">center</property>
+ <property name="hexpand">1</property>
+ <signal name="notify::active" handler="layout_activate"/>
+ </object>
+ </child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow">
<child>
- <object class="GtkListBoxRow">
+ <object class="GtkBox">
+ <property name="spacing">40</property>
<child>
- <object class="GtkBox">
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="focus_label">
- <property name="label" translatable="yes">Show Focus</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- </object>
- </child>
- <child>
- <object class="GtkSwitch" id="focus_switch">
- <property name="halign">end</property>
- <property name="valign">center</property>
- <property name="hexpand">1</property>
- <signal name="notify::active" handler="focus_activate"/>
- </object>
- </child>
+ <object class="GtkLabel" id="focus_label">
+ <property name="label" translatable="yes">Show Focus</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSwitch" id="focus_switch">
+ <property name="halign">end</property>
+ <property name="valign">center</property>
+ <property name="hexpand">1</property>
+ <signal name="notify::active" handler="focus_activate"/>
</object>
</child>
</object>
@@ -635,35 +628,31 @@
</object>
</child>
<child>
- <object class="GtkFrame" id="misc_frame">
+ <object class="GtkListBox" id="misc_box">
+ <property name="selection-mode">none</property>
<property name="halign">center</property>
+ <style>
+ <class name="rich-list"/>
+ <class name="boxed-list"/>
+ </style>
<child>
- <object class="GtkListBox" id="misc_box">
- <property name="selection-mode">none</property>
- <property name="show-separators">1</property>
- <style>
- <class name="rich-list"/>
- </style>
+ <object class="GtkListBoxRow">
<child>
- <object class="GtkListBoxRow">
+ <object class="GtkBox">
+ <property name="spacing">40</property>
<child>
- <object class="GtkBox">
- <property name="spacing">40</property>
- <child>
- <object class="GtkLabel" id="touchscreen_label">
- <property name="label" translatable="yes">Simulate Touchscreen</property>
- <property name="halign">start</property>
- <property name="valign">baseline</property>
- <property name="xalign">0.0</property>
- </object>
- </child>
- <child>
- <object class="GtkSwitch" id="touchscreen_switch">
- <property name="halign">end</property>
- <property name="valign">center</property>
- <property name="hexpand">1</property>
- </object>
- </child>
+ <object class="GtkLabel" id="touchscreen_label">
+ <property name="label" translatable="yes">Simulate Touchscreen</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSwitch" id="touchscreen_switch">
+ <property name="halign">end</property>
+ <property name="valign">center</property>
+ <property name="hexpand">1</property>
</object>
</child>
</object>
@@ -673,25 +662,21 @@
</object>
</child>
<child>
- <object class="GtkFrame" id="inspector_frame">
+ <object class="GtkListBox" id="inspector_box">
+ <property name="selection-mode">none</property>
<property name="halign">center</property>
+ <style>
+ <class name="rich-list"/>
+ <class name="boxed-list"/>
+ </style>
<child>
- <object class="GtkListBox">
- <property name="selection-mode">none</property>
- <property name="show-separators">1</property>
- <style>
- <class name="rich-list"/>
- </style>
+ <object class="GtkListBoxRow">
<child>
- <object class="GtkListBoxRow">
- <child>
- <object class="GtkButton">
- <property name="label" translatable="yes">Inspect Inspector</property>
- <property name="halign">center</property>
- <property name="valign">center</property>
- <signal name="clicked" handler="inspect_inspector"/>
- </object>
- </child>
+ <object class="GtkButton">
+ <property name="label" translatable="yes">Inspect Inspector</property>
+ <property name="halign">center</property>
+ <property name="valign">center</property>
+ <signal name="clicked" handler="inspect_inspector"/>
</object>
</child>
</object>
@@ -741,10 +726,10 @@
</object>
<object class="GtkSizeGroup">
<widgets>
- <widget name="visual_frame"/>
- <widget name="debug_frame"/>
- <widget name="misc_frame"/>
- <widget name="inspector_frame"/>
+ <widget name="visual_box"/>
+ <widget name="debug_box"/>
+ <widget name="misc_box"/>
+ <widget name="inspector_box"/>
</widgets>
</object>
</interface>
diff --git a/gtk/theme/Default/_common.scss b/gtk/theme/Default/_common.scss
index fd25bfc0d6..7135eba9ac 100644
--- a/gtk/theme/Default/_common.scss
+++ b/gtk/theme/Default/_common.scss
@@ -43,6 +43,10 @@ image:disabled {
-gtk-icon-filter: opacity(0.5);
}
+picture:disabled {
+ opacity: 0.5;
+}
+
.view,
%view {
color: $text_color;
@@ -3401,6 +3405,38 @@ columnview.complex {
}
}
+
+/**********************************************************************
+ * Boxed Lists *
+ * Lists inside a rounded frame. Can be used together with .rich-list * *
+ **********************************************************************/
+
+.boxed-list {
+ border-radius: $window_radius;
+ border: 1px solid $borders_color;
+
+ > row {
+ @include focus-ring($offset: -1px);
+
+ border-bottom: 1px solid transparentize($borders_color, 0.5);
+
+ &:backdrop {
+ border-bottom-color: transparentize($backdrop_borders_color, 0.5);
+ }
+
+ &:first-child {
+ border-top-left-radius: $window_radius;
+ border-top-right-radius: $window_radius;
+ }
+
+ &:last-child {
+ border-bottom-left-radius: $window_radius;
+ border-bottom-right-radius: $window_radius;
+ border-bottom: none;
+ }
+ }
+}
+
/*********************
* App Notifications *
*********************/
diff --git a/gtk/ui/gtkmediacontrols.ui b/gtk/ui/gtkmediacontrols.ui
index 08799d64e6..1c791437af 100644
--- a/gtk/ui/gtkmediacontrols.ui
+++ b/gtk/ui/gtkmediacontrols.ui
@@ -25,6 +25,7 @@
<property name="valign">3</property>
<property name="has-frame">0</property>
<property name="icon-name">media-playback-start-symbolic</property>
+ <property name="tooltip-text" context="media controls tooltip" translatable="yes">Play</property>
<signal name="clicked" handler="play_button_clicked" object="GtkMediaControls" swapped="no"/>
</object>
</child>
diff --git a/gtk/ui/gtkprintunixdialog.ui b/gtk/ui/gtkprintunixdialog.ui
index bc04e45fe9..d27c585ea2 100644
--- a/gtk/ui/gtkprintunixdialog.ui
+++ b/gtk/ui/gtkprintunixdialog.ui
@@ -19,9 +19,6 @@
<object class="GtkBox" id="dialog-vbox1">
<property name="orientation">1</property>
<property name="spacing">2</property>
- <style>
- <class name="view"/>
- </style>
<child>
<object class="GtkBox" id="box1">
<property name="orientation">1</property>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index c0719e6fa5..7b3cf70e2d 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -398,6 +398,7 @@ gtk/ui/gtkfilechooserwidget.ui
gtk/ui/gtkfontchooserdialog.ui
gtk/ui/gtkfontchooserwidget.ui
gtk/ui/gtklockbutton.ui
+gtk/ui/gtkmediacontrols.ui
gtk/ui/gtkmessagedialog.ui
gtk/ui/gtkpagesetupunixdialog.ui
gtk/ui/gtkplacesviewrow.ui
diff --git a/testsuite/gtk/builder.c b/testsuite/gtk/builder.c
index 090d89378d..7ffb8455a8 100644
--- a/testsuite/gtk/builder.c
+++ b/testsuite/gtk/builder.c
@@ -1641,7 +1641,7 @@ test_widget (void)
builder = builder_new_from_string (buffer, -1, NULL);
button1 = gtk_builder_get_object (builder, "button1");
- g_assert_true (gtk_widget_has_focus (GTK_WIDGET (button1)));
+ g_assert_true (gtk_widget_is_focus (GTK_WIDGET (button1)));
window1 = gtk_builder_get_object (builder, "window1");
gtk_window_destroy (GTK_WINDOW (window1));
diff --git a/testsuite/gtk/meson.build b/testsuite/gtk/meson.build
index 73dd1369c3..a5811561e7 100644
--- a/testsuite/gtk/meson.build
+++ b/testsuite/gtk/meson.build
@@ -261,6 +261,7 @@ foreach test : focus_chain_tests
join_paths(meson.current_source_dir(), 'focus-chain', test[0] + '.ui'),
join_paths(meson.current_source_dir(), 'focus-chain', test[0] + '.' + test[1]),
],
+ is_parallel: false,
env: test_env,
suite: [ 'gtk', 'focus' ],
)
diff --git a/testsuite/gtk/shortcuts.c b/testsuite/gtk/shortcuts.c
index 10a7913faa..f4895c5d2e 100644
--- a/testsuite/gtk/shortcuts.c
+++ b/testsuite/gtk/shortcuts.c
@@ -360,7 +360,6 @@ test_trigger_trigger (void)
}
gdk_surface_destroy (surface);
- g_object_unref (surface);
g_object_unref (trigger[0]);
g_object_unref (trigger[1]);
diff --git a/testsuite/gtk/test-focus-chain.c b/testsuite/gtk/test-focus-chain.c
index 3846ac525d..63484ee1a5 100644
--- a/testsuite/gtk/test-focus-chain.c
+++ b/testsuite/gtk/test-focus-chain.c
@@ -208,14 +208,18 @@ load_ui_file (GFile *ui_file,
timeout_handle_id = g_timeout_add (2000,
quit_iteration_loop,
&keep_running);
- while (keep_running)
- {
- if (!g_main_context_iteration (NULL, FALSE))
- break;
- }
+ while (keep_running && !gtk_window_is_active (GTK_WINDOW (window)))
+ g_main_context_iteration (NULL, TRUE);
+
if (keep_running)
g_source_remove (timeout_handle_id);
+ if (!gtk_window_is_active (GTK_WINDOW (window)))
+ {
+ g_print ("Skipping focus tests because window did not get focus. Headless display?");
+ exit (77);
+ }
+
if (ext)
{
int i;