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
This commit is contained in:
Matthias Clasen 2007-07-09 20:01:54 +00:00 committed by Matthias Clasen
parent eab944bb15
commit 73dc5465ea
2 changed files with 14 additions and 4 deletions

View File

@ -1,3 +1,9 @@
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)
2007-07-09 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktooltip.c (gtk_tooltip_trigger_tooltip_query):

View File

@ -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))
{