diff options
author | Victor Kareh <[email protected]> | 2018-03-24 00:45:02 -0400 |
---|---|---|
committer | raveit65 <[email protected]> | 2018-03-27 14:12:03 +0200 |
commit | 1269bef5ff1d6ab307c84439a80d2de8a35c4a24 (patch) | |
tree | 501d6e47164793c7ca42d23cd9e6860e267b9142 /capplets/common | |
parent | 91e70288aba3058042a213af4febe57042deba4f (diff) | |
download | mate-control-center-1269bef5ff1d6ab307c84439a80d2de8a35c4a24.tar.bz2 mate-control-center-1269bef5ff1d6ab307c84439a80d2de8a35c4a24.tar.xz |
Scale cursor size for HiDPI when changing themes
Diffstat (limited to 'capplets/common')
-rw-r--r-- | capplets/common/mate-theme-info.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/capplets/common/mate-theme-info.c b/capplets/common/mate-theme-info.c index 678e11fd..3012c9b0 100644 --- a/capplets/common/mate-theme-info.c +++ b/capplets/common/mate-theme-info.c @@ -32,6 +32,7 @@ #include <glib/gi18n.h> #include <gmodule.h> #include <gtk/gtk.h> +#include <gdk/gdk.h> #include <gdk/gdkx.h> #include <gio/gio.h> #include <string.h> @@ -383,6 +384,8 @@ MateThemeMetaInfo* mate_theme_read_meta_theme(GFile* meta_theme_uri) str = mate_desktop_item_get_string(meta_theme_ditem, CURSOR_THEME_KEY); + GdkWindow *window = gdk_get_default_root_window (); + gint scale = gdk_window_get_scale_factor (window); if (str != NULL) { meta_theme_info->cursor_theme_name = g_strdup(str); @@ -399,6 +402,7 @@ MateThemeMetaInfo* mate_theme_read_meta_theme(GFile* meta_theme_uri) meta_theme_info->cursor_theme_name = g_strdup("default"); meta_theme_info->cursor_size = 18; } + meta_theme_info->cursor_size *= scale; str = mate_desktop_item_get_string(meta_theme_ditem, APPLICATION_FONT_KEY); |