gtk2/gtk/ui/gtkdialog.ui
Florian Müllner 66c8a996f9 dialog: Use default decoration for non-custom headerbars
There are two ways GTK can add a headerbar to a dialog:

 - the dialog is constructed with the :use-header-bar property

 - all windows should use client-side decorations

In the first case, the headerbar is added by GtkDialog with no
dedicated style class, and in the latter by GtkWindow with the
"default-decoration" style.

As a result, dialogs with plain titlebars can end up with clearly
distinct and inconsistent styles.

To address this, allow headerbars to track whether they should use
the "default-decoration" style and enable it for dialogs.

https://gitlab.gnome.org/GNOME/gtk/merge_requests/836
2019-05-12 20:09:03 +00:00

41 lines
1.3 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<interface domain="gtk40">
<template class="GtkDialog" parent="GtkWindow">
<property name="window-position">center-on-parent</property>
<property name="type-hint">dialog</property>
<child type="titlebar">
<object class="GtkHeaderBar" id="headerbar">
<property name="show-title-buttons">1</property>
<property name="has-subtitle">false</property>
</object>
</child>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<style>
<class name="dialog-vbox"/>
</style>
<child>
<object class="GtkBox" id="content_area"/>
</child>
<child>
<object class="GtkBox" id="action_box">
<style>
<class name="dialog-action-box"/>
</style>
<child>
<object class="GtkBox" id="action_area">
<property name="hexpand">1</property>
<property name="halign">end</property>
<style>
<class name="dialog-action-area"/>
</style>
</object>
</child>
</object>
</child>
</object>
</child>
</template>
</interface>