From 44343657a4dfa2d6d73b373663e84ff553629990 Mon Sep 17 00:00:00 2001 From: Zhang Xianwei Date: Mon, 26 Nov 2018 13:19:31 +0800 Subject: media-keys: always round the render coordinates for media icons This ensures the pixbuf is always rendered as crisp as possible. See https://github.com/GNOME/gnome-settings-daemon/commit/a03c072a8241d4d481ee94e5e1ffd829e85271f5 Signed-off-by: Zhang Xianwei --- plugins/media-keys/msd-media-keys-window.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/media-keys/msd-media-keys-window.c b/plugins/media-keys/msd-media-keys-window.c index 912b2b8..3f87bd0 100644 --- a/plugins/media-keys/msd-media-keys-window.c +++ b/plugins/media-keys/msd-media-keys-window.c @@ -489,8 +489,8 @@ draw_action_volume (MsdMediaKeysWindow *window, volume_box_width = icon_box_width; volume_box_height = round (window_height * 0.05); - icon_box_x0 = (window_width - icon_box_width) / 2; - icon_box_y0 = (window_height - icon_box_height) / 2; + icon_box_x0 = round ((window_width - icon_box_width) / 2); + icon_box_y0 = round ((window_height - icon_box_height) / 2); volume_box_x0 = round (icon_box_x0); volume_box_y0 = round (window_height - icon_box_y0 / 2 - volume_box_height); @@ -625,8 +625,8 @@ draw_action_custom (MsdMediaKeysWindow *window, label_box_width = round (window_width); label_box_height = round (window_height * 0.175); - icon_box_x0 = (window_width - icon_box_width) / 2; - icon_box_y0 = (window_height - icon_box_height) / 2; + icon_box_x0 = round ((window_width - icon_box_width) / 2); + icon_box_y0 = round ((window_height - icon_box_height) / 2); label_box_y0 = round (window_height - label_box_height / 2); #if 0 -- cgit v1.2.1