Skip to content

Commit

Permalink
media-keys: always round the render coordinates for media icons
Browse files Browse the repository at this point in the history
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 raveit65 committed Nov 27, 2018
1 parent ed4afca commit 79fe889
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/gsd-media-keys-window.c
Expand Up @@ -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);

Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 79fe889

Please sign in to comment.