[gtk+] dialog: add a box around the action area to use for styling
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] dialog: add a box around the action area to use for styling
- Date: Wed, 23 Apr 2014 03:47:34 +0000 (UTC)
commit 7e479aa9eeff38d358d20b155a55a07ab04ba1e9
Author: William Jon McCann <william jon mccann gmail com>
Date: Wed Apr 9 14:30:37 2014 -0400
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.
https://bugzilla.gnome.org/show_bug.cgi?id=722211
gtk/gtkdialog.c | 4 +++-
gtk/resources/ui/gtkdialog.ui | 23 +++++++++++++++++++----
2 files changed, 22 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkdialog.c b/gtk/gtkdialog.c
index eb342a5..4eead01 100644
--- a/gtk/gtkdialog.c
+++ b/gtk/gtkdialog.c
@@ -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);
}
diff --git a/gtk/resources/ui/gtkdialog.ui b/gtk/resources/ui/gtkdialog.ui
index c03b8dd..3a2cd79 100644
--- a/gtk/resources/ui/gtkdialog.ui
+++ b/gtk/resources/ui/gtkdialog.ui
@@ -23,14 +23,29 @@
<class name="dialog-vbox"/>
</style>
<child>
- <object class="GtkButtonBox" id="action_area">
+ <object class="GtkBox" id="action_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="layout_style">end</property>
<style>
- <class name="dialog-action-area"/>
+ <class name="dialog-action-box"/>
</style>
- </object>
+ <child>
+ <object class="GtkButtonBox" id="action_area">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <style>
+ <class name="dialog-action-area"/>
+ </style>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]