mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-30 15:31:34 +00:00
revealer: Refactor code
Assign the values in the same place.
This commit is contained in:
parent
8cb03a8cc0
commit
0ad10ccf39
@ -457,8 +457,6 @@ gtk_revealer_size_allocate (GtkWidget *widget,
|
||||
return;
|
||||
}
|
||||
|
||||
child_width = width;
|
||||
child_height = height;
|
||||
hscale = get_child_size_scale (revealer, GTK_ORIENTATION_HORIZONTAL);
|
||||
vscale = get_child_size_scale (revealer, GTK_ORIENTATION_VERTICAL);
|
||||
if (hscale <= 0 || vscale <= 0)
|
||||
@ -494,11 +492,18 @@ gtk_revealer_size_allocate (GtkWidget *widget,
|
||||
{
|
||||
g_assert (vscale == 1.0);
|
||||
child_width = MIN (100*width, ceil (width / hscale));
|
||||
child_height = height;
|
||||
}
|
||||
else if (vscale < 1.0)
|
||||
{
|
||||
child_width = width;
|
||||
child_height = MIN (100*height, ceil (height / vscale));
|
||||
}
|
||||
else
|
||||
{
|
||||
child_width = width;
|
||||
child_height = height;
|
||||
}
|
||||
|
||||
transform = NULL;
|
||||
switch (effective_transition (revealer))
|
||||
|
Loading…
Reference in New Issue
Block a user