get_icon_surface: Add a scale argument

This will allow us to pass the output scale around
This commit is contained in:
Guido Günther
2019-07-11 18:28:07 +02:00
parent 7db33bc92e
commit cd81aeb286
3 changed files with 11 additions and 7 deletions

View File

@ -503,7 +503,8 @@ render_key (EekRenderer *self,
cairo_surface_t *icon_surface =
eek_renderer_get_icon_surface (self,
eek_symbol_get_icon_name (symbol),
MIN(bounds.width, bounds.height));
MIN(bounds.width, bounds.height),
1);
if (icon_surface) {
gint width = cairo_image_surface_get_width (icon_surface);
gint height = cairo_image_surface_get_height (icon_surface);
@ -1071,7 +1072,8 @@ eek_renderer_render_key_outline (EekRenderer *renderer,
cairo_surface_t *
eek_renderer_get_icon_surface (EekRenderer *renderer,
const gchar *icon_name,
gint size)
gint size,
gint scale)
{
EekRendererClass *klass;
@ -1079,7 +1081,7 @@ eek_renderer_get_icon_surface (EekRenderer *renderer,
klass = EEK_RENDERER_GET_CLASS(renderer);
if (klass->get_icon_surface)
return klass->get_icon_surface (renderer, icon_name, size);
return klass->get_icon_surface (renderer, icon_name, size, scale);
return NULL;
}