summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhang Xianwei <[email protected]>2018-11-26 14:29:12 +0800
committerraveit65 <[email protected]>2018-11-27 13:50:14 +0100
commit79fe889019638cd7f4cf5f64c3ef6dd691a992a3 (patch)
tree67cfd94c06d61b6f6e7f4f208f93886b313eb6f4
parented4afcacb5486ee1c8ba43c83327928cc23b11f2 (diff)
downloadmate-power-manager-79fe889019638cd7f4cf5f64c3ef6dd691a992a3.tar.bz2
mate-power-manager-79fe889019638cd7f4cf5f64c3ef6dd691a992a3.tar.xz
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 <[email protected]>
-rw-r--r--src/gsd-media-keys-window.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gsd-media-keys-window.c b/src/gsd-media-keys-window.c
index 9371940..c84e4e2 100644
--- a/src/gsd-media-keys-window.c
+++ b/src/gsd-media-keys-window.c
@@ -456,8 +456,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);
@@ -580,8 +580,8 @@ draw_action_custom (MsdMediaKeysWindow *window,
bright_box_width = round (icon_box_width);
bright_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);
bright_box_x0 = round (icon_box_x0);
bright_box_y0 = round (window_height - icon_box_y0 / 2 - bright_box_height);