Make CcPanel override GtkBuildable, and special-case two types of children: "content" for the main content, and "titlebar" for the titlebar. Those two child types exist merely for convenience, since it's still possible to override the entire panel with adw_bin_set_child(). For now, no panel is using any of these conveniences.
43 lines
1.6 KiB
XML
43 lines
1.6 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<interface>
|
|
<template class="CcPanel" parent="AdwBin">
|
|
<child>
|
|
<object class="GtkBox" id="main_box">
|
|
<property name="hexpand">True</property>
|
|
<property name="vexpand">True</property>
|
|
<property name="orientation">vertical</property>
|
|
|
|
<child>
|
|
<object class="AdwBin" id="titlebar_bin">
|
|
<property name="hexpand">True</property>
|
|
<child>
|
|
<object class="AdwHeaderBar" id="titlebar">
|
|
<property name="show-end-title-buttons">True</property>
|
|
<property name="show-start-title-buttons" bind-source="CcPanel" bind-property="folded" bind-flags="default|sync-create" />
|
|
<child type="start">
|
|
<object class="GtkButton">
|
|
<property name="visible" bind-source="CcPanel" bind-property="folded" bind-flags="default|sync-create" />
|
|
<property name="icon-name">go-previous-symbolic</property>
|
|
</object>
|
|
</child>
|
|
<property name="title-widget">
|
|
<object class="AdwWindowTitle">
|
|
<property name="title" bind-source="CcPanel" bind-property="title" bind-flags="default|sync-create" />
|
|
</object>
|
|
</property>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
|
|
<child>
|
|
<object class="AdwBin" id="content_bin">
|
|
<property name="hexpand">True</property>
|
|
<property name="vexpand">True</property>
|
|
</object>
|
|
</child>
|
|
|
|
</object>
|
|
</child>
|
|
</template>
|
|
</interface>
|