diff options
author | Zhang Xianwei <[email protected]> | 2018-11-26 13:57:56 +0800 |
---|---|---|
committer | raveit65 <[email protected]> | 2018-11-27 13:50:14 +0100 |
commit | ff8f8d3c924ea6195bba045e07cb4b26059e672e (patch) | |
tree | 5c928a317b3e572656ee093c19c91042d77230b7 | |
parent | 1a69d224748f696492db547f9f23ac561d958fe3 (diff) | |
download | mate-power-manager-ff8f8d3c924ea6195bba045e07cb4b26059e672e.tar.bz2 mate-power-manager-ff8f8d3c924ea6195bba045e07cb4b26059e672e.tar.xz |
media-keys: Use constant for icon size in OSD
Signed-off-by: Zhang Xianwei <[email protected]>
-rw-r--r-- | src/gsd-media-keys-window.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gsd-media-keys-window.c b/src/gsd-media-keys-window.c index e59ba44..ff3a1ea 100644 --- a/src/gsd-media-keys-window.c +++ b/src/gsd-media-keys-window.c @@ -34,6 +34,8 @@ #define MSD_MEDIA_KEYS_WINDOW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MSD_TYPE_MEDIA_KEYS_WINDOW, MsdMediaKeysWindowPrivate)) +#define ICON_SCALE 0.65 /* size of the icon compared to the whole OSD */ + struct MsdMediaKeysWindowPrivate { MsdMediaKeysWindowAction action; @@ -449,8 +451,8 @@ draw_action_volume (MsdMediaKeysWindow *window, gtk_window_get_size (GTK_WINDOW (window), &window_width, &window_height); - icon_box_width = round (window_width * 0.65); - icon_box_height = round (window_height * 0.65); + icon_box_width = round (window_width * ICON_SCALE); + icon_box_height = round (window_height * ICON_SCALE); volume_box_width = icon_box_width; volume_box_height = round (window_height * 0.05); @@ -573,8 +575,8 @@ draw_action_custom (MsdMediaKeysWindow *window, gtk_window_get_size (GTK_WINDOW (window), &window_width, &window_height); - icon_box_width = round (window_width * 0.65); - icon_box_height = round (window_height * 0.65); + icon_box_width = round (window_width * ICON_SCALE); + icon_box_height = round (window_height * ICON_SCALE); bright_box_width = round (icon_box_width); bright_box_height = round (window_height * 0.05); |