diff options
author | Victor Kareh <[email protected]> | 2019-01-22 10:54:54 -0500 |
---|---|---|
committer | lukefromdc <[email protected]> | 2019-01-31 20:00:19 +0000 |
commit | 8abba9a150e4004004609ff7a1c72a188f170d5f (patch) | |
tree | 73898365c201433d6c0325676f1440d76bf8ef06 /src/ui/ui.c | |
parent | a931b089754c0fc3e43705e9ac2137803274dced (diff) | |
download | marco-8abba9a150e4004004609ff7a1c72a188f170d5f.tar.bz2 marco-8abba9a150e4004004609ff7a1c72a188f170d5f.tar.xz |
Increase icon size on tab and workspace popups
Alt+Tab and Workspace popups should be sized relative to the monitor size.
This way they look nice and large regardless of the display resolution.
Also, given much larger modern resolutions, icon sizes should be larger by default.
Diffstat (limited to 'src/ui/ui.c')
-rw-r--r-- | src/ui/ui.c | 31 |
1 files changed, 8 insertions, 23 deletions
diff --git a/src/ui/ui.c b/src/ui/ui.c index 5cb03a88..b3f40062 100644 --- a/src/ui/ui.c +++ b/src/ui/ui.c @@ -569,7 +569,7 @@ meta_ui_pop_delay_exposes (MetaUI *ui) } static GdkPixbuf * -load_default_window_icon (int size) +load_default_window_icon (int size, int scale) { GtkIconTheme *theme = gtk_icon_theme_get_default (); const char *icon_name; @@ -579,17 +579,19 @@ load_default_window_icon (int size) else icon_name = "image-missing"; - return gtk_icon_theme_load_icon (theme, icon_name, size, 0, NULL); + return gtk_icon_theme_load_icon_for_scale (theme, icon_name, size, scale, 0, NULL); } GdkPixbuf* meta_ui_get_default_window_icon (MetaUI *ui) { static GdkPixbuf *default_icon = NULL; + int scale; if (default_icon == NULL) { - default_icon = load_default_window_icon (META_ICON_WIDTH); + scale = gtk_widget_get_scale_factor (GTK_WIDGET (ui->frames)); + default_icon = load_default_window_icon (META_ICON_WIDTH, scale); g_assert (default_icon); } @@ -602,29 +604,12 @@ GdkPixbuf* meta_ui_get_default_mini_icon (MetaUI *ui) { static GdkPixbuf *default_icon = NULL; + int scale; if (default_icon == NULL) { - GtkIconTheme *theme; - gboolean icon_exists; - - theme = gtk_icon_theme_get_default (); - - icon_exists = gtk_icon_theme_has_icon (theme, META_DEFAULT_ICON_NAME); - - if (icon_exists) - default_icon = gtk_icon_theme_load_icon (theme, - META_DEFAULT_ICON_NAME, - META_MINI_ICON_WIDTH, - 0, - NULL); - else - default_icon = gtk_icon_theme_load_icon (theme, - "image-missing", - META_MINI_ICON_WIDTH, - 0, - NULL); - + scale = gtk_widget_get_scale_factor (GTK_WIDGET (ui->frames)); + default_icon = load_default_window_icon (META_MINI_ICON_WIDTH, scale); g_assert (default_icon); } |