forked from AuroraMiddleware/gtk
cssimage: Fix size computation for -gtk-icontheme()
For images without a concrete size but with an aspect ratio, we took the wrong code path. (I even copied the documentation that said "Otherwise" but didn't put an else clause there, go me!)
This commit is contained in:
parent
0d1d17107f
commit
27b9efbea2
@ -320,7 +320,8 @@ _gtk_css_image_get_concrete_size (GtkCssImage *image,
|
||||
*concrete_height = default_width / image_aspect;
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
/* Otherwise, the width and height of the concrete object
|
||||
* size is the same as the object's intrinsic width and
|
||||
* intrinsic height, if they exist.
|
||||
@ -344,6 +345,7 @@ _gtk_css_image_get_concrete_size (GtkCssImage *image,
|
||||
*concrete_height = image_width / image_aspect;
|
||||
else
|
||||
*concrete_height = default_height;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user