[gtk+] notebook: unconditionally apply padding to the tab content
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] notebook: unconditionally apply padding to the tab content
- Date: Tue, 27 Sep 2011 17:44:16 +0000 (UTC)
commit d6a58e5bd3dbb1a3c61d1487d9baeeae8cccda24
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed Sep 21 19:17:05 2011 -0400
notebook: unconditionally apply padding to the tab content
Not only when on left or top, otherwise the other position look
off-centered.
https://bugzilla.gnome.org/show_bug.cgi?id=659777
gtk/gtknotebook.c | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 660c850..f2c38ca 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -6239,10 +6239,8 @@ gtk_notebook_page_allocate (GtkNotebook *notebook,
child_allocation.width = tab_requisition.width;
}
- child_allocation.y = page->allocation.y;
-
- if (tab_pos == GTK_POS_TOP)
- child_allocation.y += tab_padding.top + focus_width + focus_padding;
+ child_allocation.y =
+ page->allocation.y + tab_padding.top + focus_width + focus_padding;
child_allocation.height = MAX (1, (page->allocation.height -
tab_padding.top - tab_padding.bottom -
@@ -6288,10 +6286,8 @@ gtk_notebook_page_allocate (GtkNotebook *notebook,
child_allocation.height = tab_requisition.height;
}
- child_allocation.x = page->allocation.x;
-
- if (tab_pos == GTK_POS_LEFT)
- child_allocation.x += tab_padding.left + focus_width + focus_padding;
+ child_allocation.x =
+ page->allocation.x + tab_padding.left + focus_width + focus_padding;
child_allocation.width = MAX (1, (page->allocation.width -
tab_padding.left - tab_padding.right -
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]