From 9a9ac2b3f6a0bcbd2ecd85b92070d63416d16527 Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Fri, 1 Oct 2021 11:37:02 -0700 Subject: [PATCH] libsysprof-ui: port a number of properties to GTK 4 --- src/libsysprof-ui/sysprof-aid-icon.ui | 35 ++----- src/libsysprof-ui/sysprof-details-page.ui | 5 +- src/libsysprof-ui/sysprof-environ-editor.c | 5 +- src/libsysprof-ui/sysprof-marks-page.ui | 5 +- src/libsysprof-ui/sysprof-memprof-page.ui | 5 +- .../sysprof-process-model-row.ui | 5 +- .../sysprof-profiler-assistant.c | 7 ++ .../sysprof-profiler-assistant.ui | 91 +++++++++---------- .../sysprof-visualizer-group-header.c | 5 +- 9 files changed, 82 insertions(+), 81 deletions(-) diff --git a/src/libsysprof-ui/sysprof-aid-icon.ui b/src/libsysprof-ui/sysprof-aid-icon.ui index 1a430846..f16b6ba0 100644 --- a/src/libsysprof-ui/sysprof-aid-icon.ui +++ b/src/libsysprof-ui/sysprof-aid-icon.ui @@ -1,32 +1,23 @@ - - + diff --git a/src/libsysprof-ui/sysprof-details-page.ui b/src/libsysprof-ui/sysprof-details-page.ui index 2e803b22..66e8f86b 100644 --- a/src/libsysprof-ui/sysprof-details-page.ui +++ b/src/libsysprof-ui/sysprof-details-page.ui @@ -9,7 +9,10 @@ true - 36 + 36 + 36 + 36 + 36 12 6 true diff --git a/src/libsysprof-ui/sysprof-environ-editor.c b/src/libsysprof-ui/sysprof-environ-editor.c index 9776a537..96f70166 100644 --- a/src/libsysprof-ui/sysprof-environ-editor.c +++ b/src/libsysprof-ui/sysprof-environ-editor.c @@ -70,7 +70,10 @@ sysprof_environ_editor_create_dummy_row (SysprofEnvironEditor *self) label = g_object_new (GTK_TYPE_LABEL, "label", _("New variable…"), - "margin", 6, + "margin-start", 6, + "margin-end", 6, + "margin-top", 6, + "margin-bottom", 6, "visible", TRUE, "xalign", 0.0f, NULL); diff --git a/src/libsysprof-ui/sysprof-marks-page.ui b/src/libsysprof-ui/sysprof-marks-page.ui index 131079d0..0697c835 100644 --- a/src/libsysprof-ui/sysprof-marks-page.ui +++ b/src/libsysprof-ui/sysprof-marks-page.ui @@ -12,7 +12,10 @@ vertical - 6 + 6 + 6 + 6 + 6 true diff --git a/src/libsysprof-ui/sysprof-memprof-page.ui b/src/libsysprof-ui/sysprof-memprof-page.ui index 739b494a..71a17e32 100644 --- a/src/libsysprof-ui/sysprof-memprof-page.ui +++ b/src/libsysprof-ui/sysprof-memprof-page.ui @@ -72,7 +72,10 @@ true - 16 + 16 + 16 + 16 + 16 vertical true diff --git a/src/libsysprof-ui/sysprof-process-model-row.ui b/src/libsysprof-ui/sysprof-process-model-row.ui index 53ed2841..721c26fe 100644 --- a/src/libsysprof-ui/sysprof-process-model-row.ui +++ b/src/libsysprof-ui/sysprof-process-model-row.ui @@ -4,7 +4,10 @@ true - 6 + 6 + 6 + 6 + 6 6 diff --git a/src/libsysprof-ui/sysprof-profiler-assistant.c b/src/libsysprof-ui/sysprof-profiler-assistant.c index 7a989bdd..28827544 100644 --- a/src/libsysprof-ui/sysprof-profiler-assistant.c +++ b/src/libsysprof-ui/sysprof-profiler-assistant.c @@ -24,6 +24,8 @@ #include +#include "egg-three-grid.h" + #include "sysprof-platform.h" #include "sysprof-aid-icon.h" @@ -61,6 +63,7 @@ struct _SysprofProfilerAssistant GtkSwitch *whole_system_switch; GtkSwitch *launch_switch; GtkSwitch *inherit_switch; + GtkWidget *scroller; }; enum { @@ -352,6 +355,7 @@ sysprof_profiler_assistant_dispose (GObject *object) SysprofProfilerAssistant *self = (SysprofProfilerAssistant *)object; g_clear_object (&self->process_model); + g_clear_pointer (&self->scroller, gtk_widget_unparent); G_OBJECT_CLASS (sysprof_profiler_assistant_parent_class)->dispose (object); } @@ -392,6 +396,9 @@ sysprof_profiler_assistant_class_init (SysprofProfilerAssistantClass *klass) gtk_widget_class_bind_template_child (widget_class, SysprofProfilerAssistant, launch_switch); gtk_widget_class_bind_template_child (widget_class, SysprofProfilerAssistant, inherit_switch); gtk_widget_class_bind_template_child (widget_class, SysprofProfilerAssistant, search_entry); + gtk_widget_class_bind_template_child (widget_class, SysprofProfilerAssistant, scroller); + + g_type_ensure (EGG_TYPE_THREE_GRID); g_type_ensure (SYSPROF_TYPE_AID_ICON); g_type_ensure (SYSPROF_TYPE_BATTERY_AID); diff --git a/src/libsysprof-ui/sysprof-profiler-assistant.ui b/src/libsysprof-ui/sysprof-profiler-assistant.ui index 0f0b59b0..5ad2c4dc 100644 --- a/src/libsysprof-ui/sysprof-profiler-assistant.ui +++ b/src/libsysprof-ui/sysprof-profiler-assistant.ui @@ -63,19 +63,22 @@