Commit 7e479aa9 authored by William Jon McCann's avatar William Jon McCann Committed by Matthias Clasen

dialog: add a box around the action area to use for styling

If we want to set style properties that include the area
of the border-width part of action_area we need to use a
parent box.
parent 384b227e
......@@ -174,6 +174,7 @@ struct _GtkDialogPrivate
GtkWidget *vbox;
GtkWidget *headerbar;
GtkWidget *action_area;
GtkWidget *action_box;
GtkSizeGroup *size_group;
gint use_header_bar;
......@@ -289,7 +290,7 @@ apply_use_header_bar (GtkDialog *dialog)
GtkDialogPrivate *priv = dialog->priv;
gtk_widget_set_visible (priv->action_area, !priv->use_header_bar);
gtk_widget_set_visible (priv->action_box, !priv->use_header_bar);
gtk_widget_set_visible (priv->headerbar, priv->use_header_bar);
if (!priv->use_header_bar)
......@@ -655,6 +656,7 @@ gtk_dialog_class_init (GtkDialogClass *class)
gtk_widget_class_bind_template_child_internal_private (widget_class, GtkDialog, vbox);
gtk_widget_class_bind_template_child_internal_private (widget_class, GtkDialog, headerbar);
gtk_widget_class_bind_template_child_internal_private (widget_class, GtkDialog, action_area);
gtk_widget_class_bind_template_child_internal_private (widget_class, GtkDialog, action_box);
gtk_widget_class_bind_template_callback (widget_class, gtk_dialog_delete_event_handler);
......@@ -22,6 +22,13 @@
<class name="dialog-vbox"/>
<object class="GtkBox" id="action_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<class name="dialog-action-box"/>
<object class="GtkButtonBox" id="action_area">
<property name="visible">True</property>
......@@ -39,6 +46,14 @@
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment