summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorZhang Xianwei <[email protected]>2018-11-26 13:17:20 +0800
committerlukefromdc <[email protected]>2018-11-26 19:40:15 +0000
commitbda6d7a8574afde561cff093606c7efa5df94093 (patch)
treedfc0f45be7eb6906d0a2fcfd5b3b170dcd9622b9 /plugins
parent4a54f6895c42c4fa501807a824b95591dd13b7ab (diff)
downloadmate-settings-daemon-bda6d7a8574afde561cff093606c7efa5df94093.tar.bz2
mate-settings-daemon-bda6d7a8574afde561cff093606c7efa5df94093.tar.xz
media-keys: Use constant for icon size in OSD
Signed-off-by: Zhang Xianwei <[email protected]>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/media-keys/msd-media-keys-window.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/media-keys/msd-media-keys-window.c b/plugins/media-keys/msd-media-keys-window.c
index 2fd6297..d85190a 100644
--- a/plugins/media-keys/msd-media-keys-window.c
+++ b/plugins/media-keys/msd-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;
@@ -482,8 +484,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);
@@ -618,8 +620,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);
label_box_width = round (window_width);
label_box_height = round (window_height * 0.175);