[sysprof/wip/gtk4-port: 131/132] memprofpage: fix togglebuttons and panels
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof/wip/gtk4-port: 131/132] memprofpage: fix togglebuttons and panels
- Date: Tue, 7 Dec 2021 08:29:14 +0000 (UTC)
commit 1e3b9297924b5c6364580075ed11fb172e944e61
Author: Christian Hergert <chergert redhat com>
Date: Fri Oct 1 17:07:47 2021 -0700
memprofpage: fix togglebuttons and panels
src/libsysprof-ui/sysprof-memprof-page.c | 14 +++++++-------
src/libsysprof-ui/sysprof-memprof-page.ui | 19 ++++++++-----------
2 files changed, 15 insertions(+), 18 deletions(-)
---
diff --git a/src/libsysprof-ui/sysprof-memprof-page.c b/src/libsysprof-ui/sysprof-memprof-page.c
index 683943d2..58f3079e 100644
--- a/src/libsysprof-ui/sysprof-memprof-page.c
+++ b/src/libsysprof-ui/sysprof-memprof-page.c
@@ -61,10 +61,10 @@ typedef struct
GtkTreeViewColumn *function_size_column;
GtkCellRendererText *function_size_cell;
GtkStack *stack;
- GtkCheckButton *summary;
- GtkCheckButton *all_allocs;
- GtkCheckButton *temp_allocs;
- GtkCheckButton *leaked_allocs_button;
+ GtkToggleButton *summary;
+ GtkToggleButton *all_allocs;
+ GtkToggleButton *temp_allocs;
+ GtkToggleButton *leaked_allocs_button;
GtkLabel *temp_allocs_count;
GtkLabel *num_allocs;
GtkLabel *leaked_allocs;
@@ -1020,14 +1020,14 @@ do_allocs (SysprofMemprofPage *self,
static void
mode_notify_active (SysprofMemprofPage *self,
GParamSpec *pspec,
- GtkCheckButton *button)
+ GtkToggleButton *button)
{
SysprofMemprofPagePrivate *priv = sysprof_memprof_page_get_instance_private (self);
g_assert (SYSPROF_IS_MEMPROF_PAGE (self));
- g_assert (GTK_IS_CHECK_BUTTON (button));
+ g_assert (GTK_IS_TOGGLE_BUTTON (button));
- if (gtk_check_button_get_active (GTK_CHECK_BUTTON (button)))
+ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)))
{
if (button == priv->summary)
do_allocs (self, SYSPROF_MEMPROF_MODE_SUMMARY);
diff --git a/src/libsysprof-ui/sysprof-memprof-page.ui b/src/libsysprof-ui/sysprof-memprof-page.ui
index 983642b7..3674eb12 100644
--- a/src/libsysprof-ui/sysprof-memprof-page.ui
+++ b/src/libsysprof-ui/sysprof-memprof-page.ui
@@ -6,7 +6,7 @@
<property name="orientation">vertical</property>
<property name="visible">true</property>
<child>
- <object class="GtkBox">
+ <object class="GtkCenterBox">
<property name="orientation">horizontal</property>
<property name="visible">true</property>
<child type="center">
@@ -20,35 +20,31 @@
<class name="linked"/>
</style>
<child>
- <object class="GtkCheckButton" id="summary">
+ <object class="GtkToggleButton" id="summary">
<property name="label" translatable="yes">Summary</property>
- <property name="draw-indicator">false</property>
<property name="visible">true</property>
<property name="active">false</property>
</object>
</child>
<child>
- <object class="GtkCheckButton" id="all_allocs">
+ <object class="GtkToggleButton" id="all_allocs">
<property name="label" translatable="yes">All Allocations</property>
- <property name="draw-indicator">false</property>
<property name="visible">true</property>
<property name="group">summary</property>
<property name="active">true</property>
</object>
</child>
<child>
- <object class="GtkCheckButton" id="temp_allocs">
+ <object class="GtkToggleButton" id="temp_allocs">
<property name="label" translatable="yes">Temporary Allocations</property>
- <property name="draw-indicator">false</property>
<property name="visible">true</property>
<property name="active">false</property>
<property name="group">summary</property>
</object>
</child>
<child>
- <object class="GtkCheckButton" id="leaked_allocs_button">
+ <object class="GtkToggleButton" id="leaked_allocs_button">
<property name="label" translatable="yes">Leaked Allocations</property>
- <property name="draw-indicator">false</property>
<property name="visible">true</property>
<property name="active">false</property>
<property name="group">summary</property>
@@ -81,7 +77,7 @@
<property name="visible">true</property>
<child>
<object class="EggThreeGrid">
- <property name="expand">true</property>
+ <property name="hexpand">true</property>
<property name="row-spacing">6</property>
<property name="column-spacing">18</property>
<property name="visible">true</property>
@@ -224,10 +220,11 @@
<child>
<object class="EggPaned" id="callgraph">
<property name="orientation">horizontal</property>
- <property name="expand">true</property>
+ <property name="vexpand">true</property>
<property name="visible">true</property>
<child>
<object class="EggPaned">
+ <property name="width-request">400</property>
<property name="orientation">vertical</property>
<property name="visible">true</property>
<child>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]