mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-17 14:30:15 +00:00
GtkFrame: Fix a casting in the compute_child_allocation() method
The casting used to calculate the child allocation is confusing MAX(). As a result, width and height end up with negative values, which makes no sense. https://bugzilla.gnome.org/show_bug.cgi?id=666109
This commit is contained in:
parent
a7f3a9ff74
commit
064204da9b
@ -835,9 +835,9 @@ gtk_frame_real_compute_child_allocation (GtkFrame *frame,
|
||||
|
||||
child_allocation->x = border_width + padding.left;
|
||||
child_allocation->y = border_width + top_margin;
|
||||
child_allocation->width = MAX (1, (gint) allocation.width - (border_width * 2) -
|
||||
padding.left - padding.right);
|
||||
child_allocation->height = MAX (1, ((gint) allocation.height - child_allocation->y -
|
||||
child_allocation->width = MAX (1, (gint) (allocation.width - (border_width * 2) -
|
||||
padding.left - padding.right));
|
||||
child_allocation->height = MAX (1, (gint) (allocation.height - child_allocation->y -
|
||||
border_width - padding.bottom));
|
||||
|
||||
child_allocation->x += allocation.x;
|
||||
|
Loading…
Reference in New Issue
Block a user