[anjuta] AnjutaTabber: fix horizontal padding of tab contents
- From: Johannes Schmid <jhs src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] AnjutaTabber: fix horizontal padding of tab contents
- Date: Fri, 9 Jul 2010 22:07:44 +0000 (UTC)
commit f2e6c13ada6d6b2fcc9dbfbd2b02a467140a423d
Author: Abderrahim Kitouni <a kitouni gmail com>
Date: Mon Jul 5 21:04:43 2010 +0100
AnjutaTabber: fix horizontal padding of tab contents
The padding was previously used as spacing between tabs
(vertical padding is still not right)
https://bugzilla.gnome.org/show_bug.cgi?id=623116
libanjuta/anjuta-tabber.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/libanjuta/anjuta-tabber.c b/libanjuta/anjuta-tabber.c
index 652e6a5..8b0796c 100644
--- a/libanjuta/anjuta-tabber.c
+++ b/libanjuta/anjuta-tabber.c
@@ -173,7 +173,7 @@ anjuta_tabber_size_request(GtkWidget* widget, GtkRequisition* req)
gtk_widget_size_request (GTK_WIDGET (child->data), &child_req);
style = gtk_widget_get_style (widget);
- req->width += child_req.width + 2 * style->xthickness + padding;
+ req->width += child_req.width + 2 * (style->xthickness + padding);
req->height = MAX(req->height, child_req.height + 2 * style->ythickness);
}
}
@@ -206,7 +206,7 @@ anjuta_tabber_size_allocate(GtkWidget* widget, GtkAllocation* allocation)
{
GtkStyle *style = gtk_widget_get_style (widget);
- child_width = allocation->width / n_children - padding - (2 * style->xthickness);
+ child_width = allocation->width / n_children - 2 * (padding + style->xthickness);
for (child = tabber->priv->children; child != NULL; child = g_list_next (child))
{
@@ -216,11 +216,11 @@ anjuta_tabber_size_allocate(GtkWidget* widget, GtkAllocation* allocation)
child_alloc.width = child_width;
child_alloc.height = MAX(child_req.height, allocation->height);
- child_alloc.x = x + style->xthickness;
- child_alloc.y = y + style->ythickness;
+ child_alloc.x = x + style->xthickness + padding;
+ child_alloc.y = y + style->ythickness + padding;
gtk_widget_size_allocate (GTK_WIDGET (child->data), &child_alloc);
- x += child_alloc.width + 2 * style->xthickness + padding;
+ x += child_width + style->xthickness + 2 * padding;
}
}
}
@@ -243,9 +243,9 @@ anjuta_tabber_expose_event (GtkWidget* widget, GdkEventExpose *event)
style = gtk_widget_get_style (widget);
- alloc.x -= style->xthickness;
+ alloc.x -= style->xthickness + padding;
alloc.y -= style->ythickness;
- alloc.width += style->xthickness + padding;
+ alloc.width += 2 * (style->xthickness + padding);
alloc.height += style->ythickness;
gtk_paint_extension (style,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]