forked from AuroraMiddleware/gtk
Take UI scale into acount when loading "image-missing" fallback
Fallback icons loaded were loading at half size (for a 2x scale) and for cases where it mattered, were being positioned off-center.
This commit is contained in:
parent
128cdaa113
commit
89c7d5fe4b
@ -484,11 +484,12 @@ ensure_surface_for_gicon (GtkIconHelper *self,
|
|||||||
if (destination == NULL)
|
if (destination == NULL)
|
||||||
{
|
{
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
destination = gtk_icon_theme_load_icon (icon_theme,
|
destination = gtk_icon_theme_load_icon_for_scale (icon_theme,
|
||||||
"image-missing",
|
"image-missing",
|
||||||
width,
|
MIN (width, height),
|
||||||
flags | GTK_ICON_LOOKUP_USE_BUILTIN | GTK_ICON_LOOKUP_GENERIC_FALLBACK,
|
scale,
|
||||||
&error);
|
flags | GTK_ICON_LOOKUP_USE_BUILTIN | GTK_ICON_LOOKUP_GENERIC_FALLBACK,
|
||||||
|
&error);
|
||||||
/* We include this image as resource, so we always have it available or
|
/* We include this image as resource, so we always have it available or
|
||||||
* the icontheme code is broken */
|
* the icontheme code is broken */
|
||||||
g_assert_no_error (error);
|
g_assert_no_error (error);
|
||||||
|
Loading…
Reference in New Issue
Block a user