[gtk+] notebook: fixup the last commit
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] notebook: fixup the last commit
- Date: Mon, 7 Mar 2011 03:08:53 +0000 (UTC)
commit a54ca77fb7aa159ec8c1d50db3c5c608fe9c27d3
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Sun Mar 6 22:04:13 2011 -0500
notebook: fixup the last commit
Let the tab overlap eat the padding, otherwise having tab-overlap >
tab-curvature without cutting the label is impossible.
This way we give the label widget all the allocation possible before
giving up and cutting it if the values for tab-overlap are too extreme
for the given padding.
gtk/gtknotebook.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 08699bc..77d44f9 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -6065,13 +6065,18 @@ gtk_notebook_page_allocate (GtkNotebook *notebook,
* coordinate of the allocation too, to position it after
* the end of the overlap.
*/
- if (page != priv->cur_page && tab_overlap > tab_curvature)
+ if (page != priv->cur_page && tab_overlap > tab_curvature + MIN (tab_padding.left, tab_padding.right))
{
- child_allocation.width -= tab_overlap - tab_curvature;
-
if (gtk_notebook_page_num (notebook, page->child) >
gtk_notebook_page_num (notebook, priv->cur_page->child))
- child_allocation.x += tab_overlap - tab_curvature;
+ {
+ child_allocation.x += tab_overlap - tab_curvature - tab_padding.left;
+ child_allocation.width -= tab_overlap - tab_curvature - tab_padding.left;
+ }
+ else
+ {
+ child_allocation.width -= tab_overlap - tab_curvature - tab_padding.right;
+ }
}
}
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]