Skip to content

Commit 4434365

Browse files
zhangxianwei8lukefromdc
authored andcommitted
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>
1 parent e7222d9 commit 4434365

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

plugins/media-keys/msd-media-keys-window.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -489,8 +489,8 @@ draw_action_volume (MsdMediaKeysWindow *window,
489489
volume_box_width = icon_box_width;
490490
volume_box_height = round (window_height * 0.05);
491491

492-
icon_box_x0 = (window_width - icon_box_width) / 2;
493-
icon_box_y0 = (window_height - icon_box_height) / 2;
492+
icon_box_x0 = round ((window_width - icon_box_width) / 2);
493+
icon_box_y0 = round ((window_height - icon_box_height) / 2);
494494
volume_box_x0 = round (icon_box_x0);
495495
volume_box_y0 = round (window_height - icon_box_y0 / 2 - volume_box_height);
496496

@@ -625,8 +625,8 @@ draw_action_custom (MsdMediaKeysWindow *window,
625625
label_box_width = round (window_width);
626626
label_box_height = round (window_height * 0.175);
627627

628-
icon_box_x0 = (window_width - icon_box_width) / 2;
629-
icon_box_y0 = (window_height - icon_box_height) / 2;
628+
icon_box_x0 = round ((window_width - icon_box_width) / 2);
629+
icon_box_y0 = round ((window_height - icon_box_height) / 2);
630630
label_box_y0 = round (window_height - label_box_height / 2);
631631

632632
#if 0

0 commit comments

Comments
 (0)