inspector: Stop deriving from scrolled window

This commit is contained in:
Matthias Clasen 2019-05-28 22:34:47 +00:00
parent 461e8e0218
commit 211128fb7c
9 changed files with 1466 additions and 1348 deletions

View File

@ -60,6 +60,8 @@
struct _GtkInspectorGeneralPrivate
{
GtkWidget *swin;
GtkWidget *box;
GtkWidget *version_box;
GtkWidget *env_box;
GtkWidget *display_box;
@ -88,7 +90,7 @@ struct _GtkInspectorGeneralPrivate
GtkAdjustment *focus_adjustment;
};
G_DEFINE_TYPE_WITH_PRIVATE (GtkInspectorGeneral, gtk_inspector_general, GTK_TYPE_SCROLLED_WINDOW)
G_DEFINE_TYPE_WITH_PRIVATE (GtkInspectorGeneral, gtk_inspector_general, GTK_TYPE_WIDGET)
static void
init_version (GtkInspectorGeneral *gen)
@ -857,8 +859,8 @@ gtk_inspector_general_constructed (GObject *object)
G_OBJECT_CLASS (gtk_inspector_general_parent_class)->constructed (object);
gen->priv->focus_adjustment = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (gen));
gtk_container_set_focus_vadjustment (GTK_CONTAINER (gtk_bin_get_child (GTK_BIN (gen))),
gen->priv->focus_adjustment = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (gen->priv->swin));
gtk_container_set_focus_vadjustment (GTK_CONTAINER (gen->priv->box),
gen->priv->focus_adjustment);
g_signal_connect (gen->priv->version_box, "keynav-failed", G_CALLBACK (keynav_failed), gen);
@ -869,6 +871,37 @@ gtk_inspector_general_constructed (GObject *object)
g_signal_connect (gen->priv->device_box, "keynav-failed", G_CALLBACK (keynav_failed), gen);
}
static void
measure (GtkWidget *widget,
GtkOrientation orientation,
int for_size,
int *minimum,
int *natural,
int *minimum_baseline,
int *natural_baseline)
{
GtkInspectorGeneral *gen = GTK_INSPECTOR_GENERAL (widget);
gtk_widget_measure (gen->priv->swin,
orientation,
for_size,
minimum, natural,
minimum_baseline, natural_baseline);
}
static void
size_allocate (GtkWidget *widget,
int width,
int height,
int baseline)
{
GtkInspectorGeneral *gen = GTK_INSPECTOR_GENERAL (widget);
gtk_widget_size_allocate (gen->priv->swin,
&(GtkAllocation) { 0, 0, width, height },
baseline);
}
static void
gtk_inspector_general_class_init (GtkInspectorGeneralClass *klass)
{
@ -877,7 +910,12 @@ gtk_inspector_general_class_init (GtkInspectorGeneralClass *klass)
object_class->constructed = gtk_inspector_general_constructed;
widget_class->measure = measure;
widget_class->size_allocate = size_allocate;
gtk_widget_class_set_template_from_resource (widget_class, "/org/gtk/libgtk/inspector/general.ui");
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorGeneral, swin);
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorGeneral, box);
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorGeneral, version_box);
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorGeneral, env_box);
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorGeneral, display_box);

View File

@ -32,13 +32,14 @@ typedef struct _GtkInspectorGeneralPrivate GtkInspectorGeneralPrivate;
typedef struct _GtkInspectorGeneral
{
GtkScrolledWindow parent;
GtkWidget parent;
GtkInspectorGeneralPrivate *priv;
} GtkInspectorGeneral;
typedef struct _GtkInspectorGeneralClass
{
GtkScrolledWindowClass parent;
GtkWidgetClass parent_class;
} GtkInspectorGeneralClass;
G_BEGIN_DECLS

View File

@ -1,92 +1,97 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface domain="gtk40">
<template class="GtkInspectorGeneral" parent="GtkScrolledWindow">
<property name="hscrollbar-policy">never</property>
<template class="GtkInspectorGeneral" parent="GtkWidget">
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="margin">60</property>
<property name="spacing">10</property>
<object class="GtkScrolledWindow" id="swin">
<property name="hscrollbar-policy">never</property>
<child>
<object class="GtkFrame" id="version_frame">
<property name="halign">center</property>
<object class="GtkBox" id="box">
<property name="orientation">vertical</property>
<property name="margin">60</property>
<property name="spacing">10</property>
<child>
<object class="GtkListBox" id="version_box">
<property name="selection-mode">none</property>
<object class="GtkFrame" id="version_frame">
<property name="halign">center</property>
<child>
<object class="GtkListBoxRow">
<property name="activatable">0</property>
<object class="GtkListBox" id="version_box">
<property name="selection-mode">none</property>
<child>
<object class="GtkBox">
<property name="margin">10</property>
<property name="spacing">40</property>
<object class="GtkListBoxRow">
<property name="activatable">0</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 class="GtkBox">
<property name="margin">10</property>
<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>
</object>
</child>
<child>
<object class="GtkListBoxRow">
<property name="activatable">0</property>
<child>
<object class="GtkBox">
<property name="margin">10</property>
<property name="spacing">40</property>
<object class="GtkListBoxRow">
<property name="activatable">0</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 class="GtkBox">
<property name="margin">10</property>
<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>
</object>
</child>
<child>
<object class="GtkListBoxRow">
<property name="activatable">0</property>
<child>
<object class="GtkBox">
<property name="margin">10</property>
<property name="spacing">40</property>
<object class="GtkListBoxRow">
<property name="activatable">0</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 class="GtkBox">
<property name="margin">10</property>
<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>
@ -95,204 +100,204 @@
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkFrame" id="env_frame">
<property name="halign">center</property>
<child>
<object class="GtkListBox" id="env_box">
<property name="selection-mode">none</property>
<object class="GtkFrame" id="env_frame">
<property name="halign">center</property>
<child>
<object class="GtkListBoxRow">
<property name="activatable">0</property>
<object class="GtkListBox" id="env_box">
<property name="selection-mode">none</property>
<child>
<object class="GtkBox">
<property name="margin">10</property>
<property name="spacing">40</property>
<object class="GtkListBoxRow">
<property name="activatable">0</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 class="GtkBox">
<property name="margin">10</property>
<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>
</object>
</child>
<child>
<object class="GtkListBoxRow">
<property name="activatable">0</property>
<child>
<object class="GtkBox">
<property name="margin">10</property>
<property name="spacing">40</property>
<object class="GtkListBoxRow">
<property name="activatable">0</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 class="GtkBox">
<property name="margin">10</property>
<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>
</object>
</child>
<child>
<object class="GtkListBoxRow">
<property name="activatable">0</property>
<child>
<object class="GtkBox">
<property name="margin">10</property>
<property name="spacing">40</property>
<object class="GtkListBoxRow">
<property name="activatable">0</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 class="GtkBox">
<property name="margin">10</property>
<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>
</object>
</child>
<child>
<object class="GtkListBoxRow">
<property name="activatable">0</property>
<child>
<object class="GtkBox">
<property name="margin">10</property>
<property name="spacing">40</property>
<object class="GtkListBoxRow">
<property name="activatable">0</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 class="GtkBox">
<property name="margin">10</property>
<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>
</object>
</child>
<child>
<object class="GtkListBoxRow">
<property name="activatable">0</property>
<child>
<object class="GtkBox">
<property name="margin">10</property>
<property name="spacing">40</property>
<object class="GtkListBoxRow">
<property name="activatable">0</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 class="GtkBox">
<property name="margin">10</property>
<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>
</object>
</child>
<child>
<object class="GtkListBoxRow">
<property name="activatable">0</property>
<child>
<object class="GtkBox">
<property name="margin">10</property>
<property name="spacing">40</property>
<object class="GtkListBoxRow">
<property name="activatable">0</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 class="GtkBox">
<property name="margin">10</property>
<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>
</object>
</child>
<child>
<object class="GtkListBoxRow">
<property name="activatable">0</property>
<child>
<object class="GtkBox">
<property name="margin">10</property>
<property name="spacing">40</property>
<object class="GtkListBoxRow">
<property name="activatable">0</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 class="GtkBox">
<property name="margin">10</property>
<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>
</child>
</object>
@ -301,90 +306,90 @@
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkFrame" id="display_frame">
<property name="halign">center</property>
<child>
<object class="GtkListBox" id="display_box">
<property name="selection-mode">none</property>
<object class="GtkFrame" id="display_frame">
<property name="halign">center</property>
<child>
<object class="GtkListBoxRow">
<property name="activatable">0</property>
<object class="GtkListBox" id="display_box">
<property name="selection-mode">none</property>
<child>
<object class="GtkBox">
<property name="margin">10</property>
<property name="spacing">40</property>
<object class="GtkListBoxRow">
<property name="activatable">0</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 class="GtkBox">
<property name="margin">10</property>
<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>
</object>
</child>
<child>
<object class="GtkListBoxRow">
<property name="activatable">0</property>
<child>
<object class="GtkBox">
<property name="margin">10</property>
<property name="spacing">40</property>
<object class="GtkListBoxRow">
<property name="activatable">0</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 class="GtkBox">
<property name="margin">10</property>
<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>
</object>
</child>
<child>
<object class="GtkListBoxRow">
<property name="activatable">0</property>
<child>
<object class="GtkBox">
<property name="margin">10</property>
<property name="spacing">40</property>
<object class="GtkListBoxRow">
<property name="activatable">0</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 class="GtkBox">
<property name="margin">10</property>
<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>
</child>
</object>
@ -393,64 +398,64 @@
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkFrame" id="gl_frame">
<property name="halign">center</property>
<child>
<object class="GtkListBox" id="gl_box">
<property name="selection-mode">none</property>
<object class="GtkFrame" id="gl_frame">
<property name="halign">center</property>
<child>
<object class="GtkListBoxRow">
<property name="activatable">0</property>
<object class="GtkListBox" id="gl_box">
<property name="selection-mode">none</property>
<child>
<object class="GtkBox">
<property name="margin">10</property>
<property name="spacing">40</property>
<object class="GtkListBoxRow">
<property name="activatable">0</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 class="GtkBox">
<property name="margin">10</property>
<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>
</object>
</child>
<child>
<object class="GtkListBoxRow">
<property name="activatable">0</property>
<child>
<object class="GtkBox">
<property name="margin">10</property>
<property name="spacing">40</property>
<object class="GtkListBoxRow">
<property name="activatable">0</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 class="GtkBox">
<property name="margin">10</property>
<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>
</child>
</object>
@ -459,92 +464,92 @@
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkFrame" id="vulkan_frame">
<property name="halign">center</property>
<child>
<object class="GtkListBox" id="vulkan_box">
<property name="selection-mode">none</property>
<object class="GtkFrame" id="vulkan_frame">
<property name="halign">center</property>
<child>
<object class="GtkListBoxRow">
<property name="activatable">0</property>
<object class="GtkListBox" id="vulkan_box">
<property name="selection-mode">none</property>
<child>
<object class="GtkBox">
<property name="margin">10</property>
<property name="spacing">40</property>
<object class="GtkListBoxRow">
<property name="activatable">0</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 class="GtkBox">
<property name="margin">10</property>
<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>
</object>
</child>
<child>
<object class="GtkListBoxRow">
<property name="activatable">0</property>
<child>
<object class="GtkBox">
<property name="margin">10</property>
<property name="spacing">40</property>
<object class="GtkListBoxRow">
<property name="activatable">0</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 class="GtkBox">
<property name="margin">10</property>
<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>
</object>
</child>
<child>
<object class="GtkListBoxRow">
<property name="activatable">0</property>
<child>
<object class="GtkBox">
<property name="margin">10</property>
<property name="spacing">40</property>
<object class="GtkListBoxRow">
<property name="activatable">0</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 class="GtkBox">
<property name="margin">10</property>
<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>
</child>
</object>
@ -553,14 +558,14 @@
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkFrame" id="device_frame">
<property name="halign">center</property>
<child>
<object class="GtkListBox" id="device_box">
<property name="selection-mode">none</property>
<object class="GtkFrame" id="device_frame">
<property name="halign">center</property>
<child>
<object class="GtkListBox" id="device_box">
<property name="selection-mode">none</property>
</object>
</child>
</object>
</child>
</object>

View File

@ -38,6 +38,7 @@ struct _GtkInspectorMiscInfoPrivate {
GObject *object;
GtkWidget *swin;
GtkWidget *address;
GtkWidget *type;
GtkWidget *type_popover;
@ -95,7 +96,7 @@ enum
PROP_OBJECT_TREE
};
G_DEFINE_TYPE_WITH_PRIVATE (GtkInspectorMiscInfo, gtk_inspector_misc_info, GTK_TYPE_SCROLLED_WINDOW)
G_DEFINE_TYPE_WITH_PRIVATE (GtkInspectorMiscInfo, gtk_inspector_misc_info, GTK_TYPE_WIDGET)
static gchar *
format_state_flags (GtkStateFlags state)
@ -568,6 +569,37 @@ set_property (GObject *object,
}
}
static void
measure (GtkWidget *widget,
GtkOrientation orientation,
int for_size,
int *minimum,
int *natural,
int *minimum_baseline,
int *natural_baseline)
{
GtkInspectorMiscInfo *sl = GTK_INSPECTOR_MISC_INFO (widget);
gtk_widget_measure (sl->priv->swin,
orientation,
for_size,
minimum, natural,
minimum_baseline, natural_baseline);
}
static void
size_allocate (GtkWidget *widget,
int width,
int height,
int baseline)
{
GtkInspectorMiscInfo *sl = GTK_INSPECTOR_MISC_INFO (widget);
gtk_widget_size_allocate (sl->priv->swin,
&(GtkAllocation) { 0, 0, width, height },
baseline);
}
static void
gtk_inspector_misc_info_class_init (GtkInspectorMiscInfoClass *klass)
{
@ -579,12 +611,15 @@ gtk_inspector_misc_info_class_init (GtkInspectorMiscInfoClass *klass)
widget_class->map = map;
widget_class->unmap = unmap;
widget_class->measure = measure;
widget_class->size_allocate = size_allocate;
g_object_class_install_property (object_class, PROP_OBJECT_TREE,
g_param_spec_object ("object-tree", "Object Tree", "Object tree",
GTK_TYPE_WIDGET, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
gtk_widget_class_set_template_from_resource (widget_class, "/org/gtk/libgtk/inspector/misc-info.ui");
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorMiscInfo, swin);
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorMiscInfo, address);
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorMiscInfo, type);
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorMiscInfo, refcount_row);

View File

@ -32,13 +32,13 @@ typedef struct _GtkInspectorMiscInfoPrivate GtkInspectorMiscInfoPrivate;
typedef struct _GtkInspectorMiscInfo
{
GtkScrolledWindow parent;
GtkWidget parent;
GtkInspectorMiscInfoPrivate *priv;
} GtkInspectorMiscInfo;
typedef struct _GtkInspectorMiscInfoClass
{
GtkScrolledWindowClass parent;
GtkWidgetClass parent_class;
} GtkInspectorMiscInfoClass;
G_BEGIN_DECLS

File diff suppressed because it is too large Load Diff

View File

@ -52,6 +52,8 @@
struct _GtkInspectorVisualPrivate
{
GtkWidget *swin;
GtkWidget *box;
GtkWidget *visual_box;
GtkWidget *theme_combo;
GtkWidget *dark_switch;
@ -87,7 +89,7 @@ struct _GtkInspectorVisualPrivate
GtkInspectorOverlay *layout_overlay;
};
G_DEFINE_TYPE_WITH_PRIVATE (GtkInspectorVisual, gtk_inspector_visual, GTK_TYPE_SCROLLED_WINDOW)
G_DEFINE_TYPE_WITH_PRIVATE (GtkInspectorVisual, gtk_inspector_visual, GTK_TYPE_WIDGET)
static void
fix_direction_recurse (GtkWidget *widget,
@ -960,8 +962,8 @@ gtk_inspector_visual_constructed (GObject *object)
G_OBJECT_CLASS (gtk_inspector_visual_parent_class)->constructed (object);
vis->priv->focus_adjustment = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (vis));
gtk_container_set_focus_vadjustment (GTK_CONTAINER (gtk_bin_get_child (GTK_BIN (vis))),
vis->priv->focus_adjustment = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (vis->priv->swin));
gtk_container_set_focus_vadjustment (GTK_CONTAINER (vis->priv->box),
vis->priv->focus_adjustment);
g_signal_connect (vis->priv->visual_box, "keynav-failed", G_CALLBACK (keynav_failed), vis);
@ -988,6 +990,37 @@ gtk_inspector_visual_finalize (GObject *object)
G_OBJECT_CLASS (gtk_inspector_visual_parent_class)->finalize (object);
}
static void
measure (GtkWidget *widget,
GtkOrientation orientation,
int for_size,
int *minimum,
int *natural,
int *minimum_baseline,
int *natural_baseline)
{
GtkInspectorVisual *vis = GTK_INSPECTOR_VISUAL (widget);
gtk_widget_measure (vis->priv->swin,
orientation,
for_size,
minimum, natural,
minimum_baseline, natural_baseline);
}
static void
size_allocate (GtkWidget *widget,
int width,
int height,
int baseline)
{
GtkInspectorVisual *vis = GTK_INSPECTOR_VISUAL (widget);
gtk_widget_size_allocate (vis->priv->swin,
&(GtkAllocation) { 0, 0, width, height },
baseline);
}
static void
gtk_inspector_visual_class_init (GtkInspectorVisualClass *klass)
{
@ -997,7 +1030,12 @@ gtk_inspector_visual_class_init (GtkInspectorVisualClass *klass)
object_class->constructed = gtk_inspector_visual_constructed;
object_class->finalize = gtk_inspector_visual_finalize;
widget_class->measure = measure;
widget_class->size_allocate = size_allocate;
gtk_widget_class_set_template_from_resource (widget_class, "/org/gtk/libgtk/inspector/visual.ui");
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorVisual, swin);
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorVisual, box);
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorVisual, direction_combo);
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorVisual, theme_combo);
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorVisual, dark_switch);

View File

@ -32,13 +32,13 @@ typedef struct _GtkInspectorVisualPrivate GtkInspectorVisualPrivate;
typedef struct _GtkInspectorVisual
{
GtkScrolledWindow parent;
GtkWidget parent;
GtkInspectorVisualPrivate *priv;
} GtkInspectorVisual;
typedef struct _GtkInspectorVisualClass
{
GtkScrolledWindowClass parent;
GtkWidgetClass parent_class;
} GtkInspectorVisualClass;
G_BEGIN_DECLS

View File

@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface domain="gtk40">
<object class="GtkAdjustment" id="scale_adjustment">
<property name="lower">1</property>
@ -23,338 +24,340 @@
<property name="step-increment">8</property>
<property name="page-increment">8</property>
</object>
<template class="GtkInspectorVisual" parent="GtkScrolledWindow">
<property name="hscrollbar-policy">never</property>
<template class="GtkInspectorVisual" parent="GtkWidget">
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="margin">60</property>
<property name="spacing">10</property>
<object class="GtkScrolledWindow" id="swin">
<property name="hscrollbar-policy">never</property>
<child>
<object class="GtkFrame" id="visual_frame">
<property name="halign">center</property>
<object class="GtkBox" id="box">
<property name="orientation">vertical</property>
<property name="margin">60</property>
<property name="spacing">10</property>
<child>
<object class="GtkListBox" id="visual_box">
<property name="selection-mode">none</property>
<style>
<class name="view"/>
</style>
<object class="GtkFrame" id="visual_frame">
<property name="halign">center</property>
<child>
<object class="GtkListBoxRow">
<property name="activatable">0</property>
<object class="GtkListBox" id="visual_box">
<property name="selection-mode">none</property>
<style>
<class name="view"/>
</style>
<child>
<object class="GtkBox">
<property name="margin">10</property>
<property name="spacing">40</property>
<object class="GtkListBoxRow">
<property name="activatable">0</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="GtkComboBoxText" id="theme_combo">
<property name="halign">end</property>
<property name="valign">baseline</property>
<property name="hexpand">1</property>
<object class="GtkBox">
<property name="margin">10</property>
<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="GtkComboBoxText" id="theme_combo">
<property name="halign">end</property>
<property name="valign">baseline</property>
<property name="hexpand">1</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkListBoxRow">
<property name="activatable">1</property>
<child>
<object class="GtkBox">
<property name="margin">10</property>
<property name="spacing">40</property>
<object class="GtkListBoxRow">
<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">baseline</property>
<property name="hexpand">1</property>
<object class="GtkBox">
<property name="margin">10</property>
<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">baseline</property>
<property name="hexpand">1</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkListBoxRow">
<property name="activatable">0</property>
<child>
<object class="GtkBox">
<property name="margin">10</property>
<property name="spacing">40</property>
<object class="GtkListBoxRow">
<property name="activatable">0</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="GtkComboBoxText" id="cursor_combo">
<property name="halign">end</property>
<property name="valign">baseline</property>
<property name="hexpand">1</property>
<object class="GtkBox">
<property name="margin">10</property>
<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="GtkComboBoxText" id="cursor_combo">
<property name="halign">end</property>
<property name="valign">baseline</property>
<property name="hexpand">1</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkListBoxRow">
<property name="activatable">0</property>
<child>
<object class="GtkBox">
<property name="margin">10</property>
<property name="spacing">40</property>
<object class="GtkListBoxRow">
<property name="activatable">0</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">cursor_size_adjustment</property>
<property name="snap-to-ticks">1</property>
<property name="hexpand">1</property>
<object class="GtkBox">
<property name="margin">10</property>
<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">cursor_size_adjustment</property>
<property name="snap-to-ticks">1</property>
<property name="hexpand">1</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkListBoxRow">
<property name="activatable">0</property>
<child>
<object class="GtkBox">
<property name="margin">10</property>
<property name="spacing">40</property>
<object class="GtkListBoxRow">
<property name="activatable">0</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="GtkComboBoxText" id="icon_combo">
<property name="halign">end</property>
<property name="valign">baseline</property>
<property name="hexpand">1</property>
<object class="GtkBox">
<property name="margin">10</property>
<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="GtkComboBoxText" id="icon_combo">
<property name="halign">end</property>
<property name="valign">baseline</property>
<property name="hexpand">1</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkListBoxRow">
<property name="activatable">0</property>
<child>
<object class="GtkBox">
<property name="margin">10</property>
<property name="spacing">40</property>
<object class="GtkListBoxRow">
<property name="activatable">0</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 class="GtkBox">
<property name="margin">10</property>
<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>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkListBoxRow">
<property name="activatable">0</property>
<child>
<object class="GtkBox">
<property name="margin">10</property>
<property name="spacing">20</property>
<object class="GtkListBoxRow">
<property name="activatable">0</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">font_scale_adjustment</property>
<property name="draw-value">0</property>
<property name="hexpand">1</property>
<marks>
<mark value="1.0" position="top"/>
</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="input-purpose">number</property>
<object class="GtkBox">
<property name="margin">10</property>
<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">font_scale_adjustment</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="input-purpose">number</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkListBoxRow">
<property name="activatable">0</property>
<child>
<object class="GtkBox">
<property name="margin">10</property>
<property name="spacing">40</property>
<object class="GtkListBoxRow">
<property name="activatable">0</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="GtkComboBoxText" id="direction_combo">
<property name="halign">end</property>
<property name="valign">baseline</property>
<property name="hexpand">1</property>
<signal name="changed" handler="direction_changed"/>
<items>
<item translatable="yes" id="ltr">Left-to-Right</item>
<item translatable="yes" id="rtl">Right-to-Left</item>
</items>
<object class="GtkBox">
<property name="margin">10</property>
<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="GtkComboBoxText" id="direction_combo">
<property name="halign">end</property>
<property name="valign">baseline</property>
<property name="hexpand">1</property>
<signal name="changed" handler="direction_changed"/>
<items>
<item translatable="yes" id="ltr">Left-to-Right</item>
<item translatable="yes" id="rtl">Right-to-Left</item>
</items>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkListBoxRow">
<property name="activatable">0</property>
<child>
<object class="GtkBox">
<property name="margin">10</property>
<property name="spacing">40</property>
<object class="GtkListBoxRow">
<property name="activatable">0</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">scale_adjustment</property>
<property name="snap-to-ticks">1</property>
<property name="hexpand">1</property>
<object class="GtkBox">
<property name="margin">10</property>
<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">scale_adjustment</property>
<property name="snap-to-ticks">1</property>
<property name="hexpand">1</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkListBoxRow">
<property name="activatable">1</property>
<child>
<object class="GtkBox">
<property name="margin">10</property>
<property name="spacing">40</property>
<object class="GtkListBoxRow">
<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">baseline</property>
<property name="hexpand">1</property>
<object class="GtkBox">
<property name="margin">10</property>
<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">baseline</property>
<property name="hexpand">1</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkListBoxRow">
<property name="activatable">0</property>
<child>
<object class="GtkBox">
<property name="margin">10</property>
<property name="spacing">20</property>
<object class="GtkListBoxRow">
<property name="activatable">0</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="can-focus">1</property>
<property name="adjustment">slowdown_adjustment</property>
<property name="valign">baseline</property>
<property name="draw-value">0</property>
<property name="hexpand">1</property>
<marks>
<mark value="0.0" position="top"/>
</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="input-purpose">number</property>
<object class="GtkBox">
<property name="margin">10</property>
<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="can-focus">1</property>
<property name="adjustment">slowdown_adjustment</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="input-purpose">number</property>
</object>
</child>
</object>
</child>
</object>
@ -363,144 +366,139 @@
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkFrame" id="debug_frame">
<property name="halign">center</property>
<child>
<object class="GtkListBox" id="debug_box">
<property name="selection-mode">none</property>
<property name="show-separators">True</property>
<object class="GtkFrame" id="debug_frame">
<property name="halign">center</property>
<child>
<object class="GtkListBoxRow">
<property name="activatable">1</property>
<object class="GtkListBox" id="debug_box">
<property name="selection-mode">none</property>
<property name="show-separators">1</property>
<child>
<object class="GtkBox">
<property name="margin">10</property>
<property name="spacing">40</property>
<object class="GtkListBoxRow">
<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">baseline</property>
<property name="hexpand">1</property>
<signal name="notify::active" handler="fps_activate"/>
<object class="GtkBox">
<property name="margin">10</property>
<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">baseline</property>
<property name="hexpand">1</property>
<signal name="notify::active" handler="fps_activate"/>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkListBoxRow">
<property name="activatable">1</property>
<child>
<object class="GtkBox">
<property name="margin">10</property>
<property name="spacing">40</property>
<object class="GtkListBoxRow">
<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">baseline</property>
<property name="hexpand">1</property>
<signal name="notify::active" handler="updates_activate"/>
<object class="GtkBox">
<property name="margin">10</property>
<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">baseline</property>
<property name="hexpand">1</property>
<signal name="notify::active" handler="updates_activate"/>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkListBoxRow">
<property name="activatable">1</property>
<child>
<object class="GtkBox">
<property name="margin">10</property>
<property name="spacing">40</property>
<object class="GtkListBoxRow">
<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">baseline</property>
<property name="hexpand">1</property>
<signal name="notify::active" handler="baselines_activate"/>
<object class="GtkBox">
<property name="margin">10</property>
<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">baseline</property>
<property name="hexpand">1</property>
<signal name="notify::active" handler="baselines_activate"/>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkListBoxRow">
<property name="activatable">1</property>
<child>
<object class="GtkBox">
<property name="margin">10</property>
<property name="spacing">40</property>
<object class="GtkListBoxRow">
<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="GtkSwitch" id="layout_switch">
<property name="halign">end</property>
<property name="valign">baseline</property>
<property name="hexpand">1</property>
<signal name="notify::active" handler="layout_activate"/>
<object class="GtkBox">
<property name="margin">10</property>
<property name="spacing">40</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="GtkSwitch" id="layout_switch">
<property name="halign">end</property>
<property name="valign">baseline</property>
<property name="hexpand">1</property>
<signal name="notify::active" handler="layout_activate"/>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkListBoxRow">
<property name="activatable">1</property>
<child>
<object class="GtkBox">
<property name="margin">10</property>
<property name="spacing">40</property>
<object class="GtkListBoxRow">
<child>
<object class="GtkLabel" id="resize_label">
<property name="label" translatable="yes">Show Widget Resizes</property>
<property name="halign">start</property>
<property name="valign">baseline</property>
<property name="xalign">0.0</property>
</object>
</child>
<child>
<object class="GtkSwitch" id="resize_switch">
<property name="halign">end</property>
<property name="valign">baseline</property>
<property name="hexpand">1</property>
<signal name="notify::active" handler="widget_resize_activate"/>
<object class="GtkBox">
<property name="margin">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="resize_label">
<property name="label" translatable="yes">Show Widget Resizes</property>
<property name="halign">start</property>
<property name="valign">baseline</property>
<property name="xalign">0.0</property>
</object>
</child>
<child>
<object class="GtkSwitch" id="resize_switch">
<property name="halign">end</property>
<property name="valign">baseline</property>
<property name="hexpand">1</property>
<signal name="notify::active" handler="widget_resize_activate"/>
</object>
</child>
</object>
</child>
</object>
@ -509,62 +507,60 @@
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkFrame" id="misc_frame">
<property name="halign">center</property>
<child>
<object class="GtkListBox" id="misc_box">
<property name="selection-mode">none</property>
<property name="show-separators">True</property>
<object class="GtkFrame" id="misc_frame">
<property name="halign">center</property>
<child>
<object class="GtkListBoxRow">
<property name="activatable">1</property>
<object class="GtkListBox" id="misc_box">
<property name="selection-mode">none</property>
<property name="show-separators">1</property>
<child>
<object class="GtkBox">
<property name="margin">10</property>
<property name="spacing">40</property>
<object class="GtkListBoxRow">
<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">baseline</property>
<property name="hexpand">1</property>
<object class="GtkBox">
<property name="margin">10</property>
<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">baseline</property>
<property name="hexpand">1</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkListBoxRow">
<property name="activatable">1</property>
<child>
<object class="GtkBox">
<property name="margin">10</property>
<property name="spacing">40</property>
<object class="GtkListBoxRow">
<child>
<object class="GtkLabel" id="software_gl_label">
<property name="label" translatable="yes">Software GL</property>
<property name="halign">start</property>
<property name="valign">baseline</property>
<property name="xalign">0.0</property>
</object>
</child>
<child>
<object class="GtkSwitch" id="software_gl_switch">
<property name="halign">end</property>
<property name="valign">baseline</property>
<property name="hexpand">1</property>
<signal name="notify::active" handler="software_gl_activate"/>
<object class="GtkBox">
<property name="margin">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="software_gl_label">
<property name="label" translatable="yes">Software GL</property>
<property name="halign">start</property>
<property name="valign">baseline</property>
<property name="xalign">0.0</property>
</object>
</child>
<child>
<object class="GtkSwitch" id="software_gl_switch">
<property name="halign">end</property>
<property name="valign">baseline</property>
<property name="hexpand">1</property>
<signal name="notify::active" handler="software_gl_activate"/>
</object>
</child>
</object>
</child>
</object>