renderer: Only scale by output scale
The original eekboard code scaled icons by a factor. That was simplified
in c529e9ed9c but we can do away with it
completely and fetch the icons at the right size making them not blurry.
This commit is contained in:
@ -504,7 +504,7 @@ render_key (EekRenderer *self,
|
|||||||
cairo_surface_t *icon_surface =
|
cairo_surface_t *icon_surface =
|
||||||
eek_renderer_get_icon_surface (self,
|
eek_renderer_get_icon_surface (self,
|
||||||
eek_symbol_get_icon_name (symbol),
|
eek_symbol_get_icon_name (symbol),
|
||||||
MIN(bounds.width, bounds.height),
|
SCALE * MIN(bounds.width, bounds.height),
|
||||||
scale);
|
scale);
|
||||||
if (icon_surface) {
|
if (icon_surface) {
|
||||||
gint width = cairo_image_surface_get_width (icon_surface);
|
gint width = cairo_image_surface_get_width (icon_surface);
|
||||||
@ -512,10 +512,9 @@ render_key (EekRenderer *self,
|
|||||||
|
|
||||||
cairo_save (cr);
|
cairo_save (cr);
|
||||||
cairo_translate (cr,
|
cairo_translate (cr,
|
||||||
(bounds.width - width * SCALE / scale) / 2,
|
(bounds.width - width / scale) / 2,
|
||||||
(bounds.height - height * SCALE / scale) / 2);
|
(bounds.height - height / scale) / 2);
|
||||||
cairo_rectangle (cr, 0, 0, width, height);
|
cairo_rectangle (cr, 0, 0, width, height);
|
||||||
cairo_scale (cr, SCALE, SCALE);
|
|
||||||
cairo_clip (cr);
|
cairo_clip (cr);
|
||||||
/* Draw the shape of the icon using the foreground color */
|
/* Draw the shape of the icon using the foreground color */
|
||||||
cairo_set_source_rgba (cr, foreground.red,
|
cairo_set_source_rgba (cr, foreground.red,
|
||||||
|
|||||||
Reference in New Issue
Block a user