st-texture-cache: Set sliced actor size in logical size

The actor size should be set in logical size more than in the actual size
of the texture when using resource scale.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/5
This commit is contained in:
Marco Trevisan (Treviño) 2019-02-25 21:26:46 +01:00 committed by Jonas Ådahl
parent 40e7638a4b
commit ef1697d00d

View File

@ -1008,14 +1008,16 @@ st_texture_cache_load_gicon (StTextureCache *cache,
}
static ClutterActor *
load_from_pixbuf (GdkPixbuf *pixbuf)
load_from_pixbuf (GdkPixbuf *pixbuf,
int paint_scale,
float resource_scale)
{
g_autoptr(ClutterContent) image = NULL;
ClutterActor *actor;
int width = gdk_pixbuf_get_width (pixbuf);
int height = gdk_pixbuf_get_height (pixbuf);
image = pixbuf_to_st_content_image (pixbuf, width, height, 1, 1.0f);
image = pixbuf_to_st_content_image (pixbuf, -1, -1, paint_scale, resource_scale);
actor = clutter_actor_new ();
clutter_actor_set_size (actor, width, height);
@ -1109,7 +1111,9 @@ on_sliced_image_loaded (GObject *source_object,
for (list = pixbufs; list; list = list->next)
{
ClutterActor *actor = load_from_pixbuf (GDK_PIXBUF (list->data));
ClutterActor *actor = load_from_pixbuf (GDK_PIXBUF (list->data),
data->paint_scale,
data->resource_scale);
clutter_actor_hide (actor);
clutter_actor_add_child (data->actor, actor);
}