summaryrefslogtreecommitdiff
path: root/src/ui/theme.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/theme.c')
-rw-r--r--src/ui/theme.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ui/theme.c b/src/ui/theme.c
index 2f527fb24..2b3cd5eaf 100644
--- a/src/ui/theme.c
+++ b/src/ui/theme.c
@@ -885,13 +885,13 @@ meta_frame_layout_draw_with_style (MetaFrameLayout *layout,
width = cairo_image_surface_get_width (surface) / scale;
height = cairo_image_surface_get_height (surface) / scale;
- x = button_rect.x + (button_rect.width - width) / 2;
- y = button_rect.y + (button_rect.height - height) / 2;
+ x = button_rect.x + (button_rect.width - layout->icon_size) / 2;
+ y = button_rect.y + (button_rect.height - layout->icon_size) / 2;
cairo_translate (cr, x, y);
cairo_scale (cr,
- width / layout->icon_size,
- height / layout->icon_size);
+ layout->icon_size / width,
+ layout->icon_size / height);
cairo_set_source_surface (cr, surface, 0, 0);
cairo_paint (cr);