diff options
author | Zhang Xianwei <[email protected]> | 2018-11-26 13:19:31 +0800 |
---|---|---|
committer | lukefromdc <[email protected]> | 2018-11-26 19:40:15 +0000 |
commit | 44343657a4dfa2d6d73b373663e84ff553629990 (patch) | |
tree | 7bbd1a683a91f9475251251ef08885e00311ecc6 /plugins | |
parent | e7222d9a010f59a3056ea61e28c0176309c8b8e6 (diff) | |
download | mate-settings-daemon-44343657a4dfa2d6d73b373663e84ff553629990.tar.bz2 mate-settings-daemon-44343657a4dfa2d6d73b373663e84ff553629990.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]>
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/media-keys/msd-media-keys-window.c | 8 |
1 files 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 |