libsysprof-gtk: use toolbarview

Just so we can see how that will interact with other bits as we put
together the grabbing machinery.
This commit is contained in:
Christian Hergert
2023-06-27 17:17:30 -07:00
parent af9288d3f7
commit 4d61d90b3a
2 changed files with 196 additions and 174 deletions

View File

@ -33,17 +33,17 @@ static const GOptionEntry entries[] = {
}; };
#define TEST_TYPE_CHARTS (test_charts_get_type()) #define TEST_TYPE_CHARTS (test_charts_get_type())
G_DECLARE_FINAL_TYPE (TestCharts, test_charts, TEST, CHARTS, GtkWindow) G_DECLARE_FINAL_TYPE (TestCharts, test_charts, TEST, CHARTS, AdwWindow)
struct _TestCharts struct _TestCharts
{ {
GtkWindow parent_instance; AdwWindow parent_instance;
SysprofDocument *document; SysprofDocument *document;
SysprofSession *session; SysprofSession *session;
}; };
G_DEFINE_FINAL_TYPE (TestCharts, test_charts, GTK_TYPE_WINDOW) G_DEFINE_FINAL_TYPE (TestCharts, test_charts, ADW_TYPE_WINDOW)
enum { enum {
PROP_0, PROP_0,

View File

@ -1,7 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<interface> <interface>
<template class="TestCharts" parent="GtkWindow"> <template class="TestCharts" parent="AdwWindow">
<child> <child>
<object class="AdwToolbarView">
<property name="top-bar-style">raised</property>
<child type="top">
<object class="AdwHeaderBar">
</object>
</child>
<property name="content">
<object class="GtkPaned"> <object class="GtkPaned">
<property name="position">200</property> <property name="position">200</property>
<child type="start"> <child type="start">
@ -150,13 +157,26 @@
<child type="end"> <child type="end">
<object class="GtkBox"> <object class="GtkBox">
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<child>
<object class="GtkBox">
<child>
<object class="GtkInscription">
<property name="nat-chars">35</property>
<property name="min-chars">35</property>
<property name="margin-end">8</property>
</object>
</child>
<child> <child>
<object class="SysprofTimeRuler" id="ruler"> <object class="SysprofTimeRuler" id="ruler">
<property name="height-request">24</property>
<property name="hexpand">true</property>
<binding name="session"> <binding name="session">
<lookup name="session">TestCharts</lookup> <lookup name="session">TestCharts</lookup>
</binding> </binding>
</object> </object>
</child> </child>
</object>
</child>
<child> <child>
<object class="GtkScrolledWindow"> <object class="GtkScrolledWindow">
<property name="hscrollbar-policy">never</property> <property name="hscrollbar-policy">never</property>
@ -272,6 +292,8 @@
</object> </object>
</child> </child>
</object> </object>
</property>
</object>
</child> </child>
</template> </template>
</interface> </interface>