Skip to content

Commit

Permalink
Scale cursor size for HiDPI when changing themes
Browse files Browse the repository at this point in the history
  • Loading branch information
vkareh authored and raveit65 committed Mar 27, 2018
1 parent 6e38885 commit c026529
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions capplets/common/mate-theme-info.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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);
Expand All @@ -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);

Expand Down

0 comments on commit c026529

Please sign in to comment.