[evolution/gnome-3-16] Bug 746950 - Menu item tooltip changes height of status bar
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-3-16] Bug 746950 - Menu item tooltip changes height of status bar
- Date: Wed, 1 Apr 2015 13:02:35 +0000 (UTC)
commit d69597df1efbd36e2f638d0d2630e7586b17b629
Author: Milan Crha <mcrha redhat com>
Date: Wed Apr 1 14:58:19 2015 +0200
Bug 746950 - Menu item tooltip changes height of status bar
shell/e-shell-taskbar.c | 5 +++++
shell/e-shell-window.c | 5 +++++
2 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/shell/e-shell-taskbar.c b/shell/e-shell-taskbar.c
index 53685cf..9300367 100644
--- a/shell/e-shell-taskbar.c
+++ b/shell/e-shell-taskbar.c
@@ -365,6 +365,7 @@ shell_taskbar_size_allocate (GtkWidget *widget,
{
EShellTaskbar *shell_taskbar;
gint fixed_height, minimum_height = 0, natural_height = 0;
+ gboolean height_changed;
if (GTK_WIDGET_CLASS (e_shell_taskbar_parent_class)->get_preferred_height)
GTK_WIDGET_CLASS (e_shell_taskbar_parent_class)->get_preferred_height (widget,
&minimum_height, &natural_height);
@@ -374,11 +375,15 @@ shell_taskbar_size_allocate (GtkWidget *widget,
/* Maximum height allocation sticks. */
fixed_height = shell_taskbar->priv->fixed_height;
fixed_height = MAX (fixed_height, MAX (allocation->height, minimum_height));
+ height_changed = fixed_height != shell_taskbar->priv->fixed_height;
shell_taskbar->priv->fixed_height = fixed_height;
/* Chain up to parent's size_allocate() method. */
GTK_WIDGET_CLASS (e_shell_taskbar_parent_class)->
size_allocate (widget, allocation);
+
+ if (height_changed)
+ g_object_set (G_OBJECT (shell_taskbar), "height-request", fixed_height, NULL);
}
static void
diff --git a/shell/e-shell-window.c b/shell/e-shell-window.c
index 7e4a925..34be908 100644
--- a/shell/e-shell-window.c
+++ b/shell/e-shell-window.c
@@ -747,6 +747,11 @@ shell_window_create_shell_view (EShellWindow *shell_window,
widget = GTK_WIDGET (e_shell_view_get_shell_taskbar (shell_view));
gtk_notebook_append_page (notebook, widget, NULL);
+ e_binding_bind_property (
+ widget, "height-request",
+ shell_window->priv->tooltip_label, "height-request",
+ G_BINDING_SYNC_CREATE);
+
/* Listen for changes that affect the shell window. */
e_signal_connect_notify_swapped (
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]