Skip to content
Permalink
Browse files

media-keys: always round the render coordinates for media icons

This ensures the pixbuf is always rendered as crisp as possible.

See GNOME/gnome-settings-daemon@a03c072

Signed-off-by: Zhang Xianwei <zhang.xianwei8@zte.com.cn>
  • Loading branch information...
zhangxianwei8 authored and lukefromdc committed Nov 26, 2018
1 parent e7222d9 commit 44343657a4dfa2d6d73b373663e84ff553629990
Showing with 4 additions and 4 deletions.
  1. +4 −4 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

0 comments on commit 4434365

Please sign in to comment.
You can’t perform that action at this time.