diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-03-26 00:56:17 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-06-30 00:41:49 +0800 |
commit | 56d3ccc621f0a75d9500ffa8daf3b0104f36708d (patch) | |
tree | df7c1e7eb7c58b12680facf84d003b061d87d36a /widgets | |
parent | f17c9c1b20037a8a859003a7b2c4734702a9a210 (diff) | |
download | gsoc2013-evolution-56d3ccc621f0a75d9500ffa8daf3b0104f36708d.tar gsoc2013-evolution-56d3ccc621f0a75d9500ffa8daf3b0104f36708d.tar.gz gsoc2013-evolution-56d3ccc621f0a75d9500ffa8daf3b0104f36708d.tar.bz2 gsoc2013-evolution-56d3ccc621f0a75d9500ffa8daf3b0104f36708d.tar.lz gsoc2013-evolution-56d3ccc621f0a75d9500ffa8daf3b0104f36708d.tar.xz gsoc2013-evolution-56d3ccc621f0a75d9500ffa8daf3b0104f36708d.tar.zst gsoc2013-evolution-56d3ccc621f0a75d9500ffa8daf3b0104f36708d.zip |
Reduce EAlertBar height.
Use height-for-width size requests instead of width-for-height.
Height is still not as small as I'd like, but it's a little better.
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/misc/e-alert-bar.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/widgets/misc/e-alert-bar.c b/widgets/misc/e-alert-bar.c index 2d3fb9fe72..05f87cc752 100644 --- a/widgets/misc/e-alert-bar.c +++ b/widgets/misc/e-alert-bar.c @@ -161,15 +161,27 @@ alert_bar_dispose (GObject *object) G_OBJECT_CLASS (e_alert_bar_parent_class)->dispose (object); } +static GtkSizeRequestMode +alert_bar_get_request_mode (GtkWidget *widget) +{ + /* GtkHBox does width-for-height by default. But we + * want the alert bar to be as short as possible. */ + return GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH; +} + static void e_alert_bar_class_init (EAlertBarClass *class) { GObjectClass *object_class; + GtkWidgetClass *widget_class; g_type_class_add_private (class, sizeof (EAlertBarPrivate)); object_class = G_OBJECT_CLASS (class); object_class->dispose = alert_bar_dispose; + + widget_class = GTK_WIDGET_CLASS (class); + widget_class->get_request_mode = alert_bar_get_request_mode; } static void @@ -187,12 +199,6 @@ e_alert_bar_init (EAlertBar *alert_bar) container = gtk_info_bar_get_content_area (GTK_INFO_BAR (alert_bar)); - widget = gtk_hbox_new (FALSE, 12); - gtk_container_add (GTK_CONTAINER (container), widget); - gtk_widget_show (widget); - - container = widget; - widget = gtk_image_new (); gtk_misc_set_alignment (GTK_MISC (widget), 0.5, 0.0); gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0); |