[gtk+] notebook: fix size requisition for the initial_gap style property
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] notebook: fix size requisition for the initial_gap style property
- Date: Wed, 30 May 2012 22:03:49 +0000 (UTC)
commit 10a4771ae3cf53fcfe3a0586d108f02ca52a8b5f
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Sat May 26 00:42:57 2012 -0400
notebook: fix size requisition for the initial_gap style property
This is probably going to be replaced by something different soon, but
in the meantime, fix this annoying bug, visible e.g. in widget-factory
for left/right tab examples.
gtk/gtknotebook.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 5978e3d..a7f05d5 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -2033,6 +2033,7 @@ gtk_notebook_get_preferred_tabs_size (GtkNotebook *notebook,
gint tab_overlap;
gint tab_curvature;
gint arrow_spacing;
+ gint initial_gap;
gint scroll_arrow_hlength;
gint scroll_arrow_vlength;
@@ -2042,6 +2043,7 @@ gtk_notebook_get_preferred_tabs_size (GtkNotebook *notebook,
gtk_widget_style_get (widget,
"focus-line-width", &focus_width,
"focus-padding", &focus_pad,
+ "initial-gap", &initial_gap,
"tab-overlap", &tab_overlap,
"tab-curvature", &tab_curvature,
"arrow-spacing", &arrow_spacing,
@@ -2145,7 +2147,7 @@ gtk_notebook_get_preferred_tabs_size (GtkNotebook *notebook,
action_width += action_widget_requisition[ACTION_WIDGET_START].width;
action_width += action_widget_requisition[ACTION_WIDGET_END].width;
- requisition->width = tab_width + tab_overlap + action_width;
+ requisition->width = tab_width + tab_overlap + action_width + initial_gap;
requisition->height = tab_height;
break;
@@ -2184,7 +2186,7 @@ gtk_notebook_get_preferred_tabs_size (GtkNotebook *notebook,
action_height += action_widget_requisition[ACTION_WIDGET_START].height;
action_height += action_widget_requisition[ACTION_WIDGET_END].height;
- requisition->height = tab_height + tab_overlap + action_height;
+ requisition->height = tab_height + tab_overlap + action_height + initial_gap;
requisition->height = MAX (requisition->height, tab_max + tab_overlap);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]