summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2007-07-09 20:01:54 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2007-07-09 20:01:54 +0000
commit73dc5465eabbdd5cce53eda3ec213dda25f99943 (patch)
tree43e6eefdf2c911c9146482074900f12715e873ea /gtk
parenteab944bb15d2e8e2d5ee8b6afc65056d8e634e97 (diff)
downloadgtk+-73dc5465eabbdd5cce53eda3ec213dda25f99943.tar.gz
Changed size requisition so the viewport does not add the border thickness
2007-07-09 Matthias Clasen <mclasen@redhat.com> * gtk/gtkviewport.c (gtk_viewport_size_request): Changed size requisition so the viewport does not add the border thickness if it has GTK_SHADOW_NONE selected. (#361781, Miguel Gomez) svn path=/trunk/; revision=18421
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtkviewport.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c
index 114415b088..48fac8329a 100644
--- a/gtk/gtkviewport.c
+++ b/gtk/gtkviewport.c
@@ -712,11 +712,15 @@ gtk_viewport_size_request (GtkWidget *widget,
bin = GTK_BIN (widget);
- requisition->width = (GTK_CONTAINER (widget)->border_width +
- GTK_WIDGET (widget)->style->xthickness) * 2;
+ requisition->width = GTK_CONTAINER (widget)->border_width;
- requisition->height = (GTK_CONTAINER (widget)->border_width * 2 +
- GTK_WIDGET (widget)->style->ythickness) * 2;
+ requisition->height = GTK_CONTAINER (widget)->border_width;
+
+ if (GTK_VIEWPORT (widget)->shadow_type != GTK_SHADOW_NONE)
+ {
+ requisition->width += 2 * widget->style->xthickness;
+ requisition->height += 2 * widget->style->ythickness;
+ }
if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
{