forked from AuroraMiddleware/gtk
viewport: Don't subtract borders and padding from -1
-1 is a special value for "undefined" and needs to stay that way https://bugzilla.gnome.org/show_bug.cgi?id=729607
This commit is contained in:
parent
c39b6be22b
commit
352e28a138
@ -1049,24 +1049,28 @@ gtk_viewport_get_preferred_size (GtkWidget *widget,
|
||||
|
||||
if (orientation == GTK_ORIENTATION_HORIZONTAL)
|
||||
{
|
||||
for_size -= border.top + border.bottom;
|
||||
if (for_size >= 0)
|
||||
for_size -= border.top + border.bottom;
|
||||
minimum += border.left + border.right;
|
||||
}
|
||||
else
|
||||
{
|
||||
for_size -= border.left + border.right;
|
||||
if (for_size >= 0)
|
||||
for_size -= border.left + border.right;
|
||||
minimum += border.top + border.bottom;
|
||||
}
|
||||
}
|
||||
|
||||
if (orientation == GTK_ORIENTATION_HORIZONTAL)
|
||||
{
|
||||
for_size -= padding.top + padding.bottom;
|
||||
if (for_size >= 0)
|
||||
for_size -= padding.top + padding.bottom;
|
||||
minimum += padding.left + padding.right;
|
||||
}
|
||||
else
|
||||
{
|
||||
for_size -= padding.left + padding.right;
|
||||
if (for_size >= 0)
|
||||
for_size -= padding.left + padding.right;
|
||||
minimum += padding.top + padding.bottom;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user