From ea40c35e823914cd5721ad7af436cb9e69736d2d Mon Sep 17 00:00:00 2001 From: Victor Kareh Date: Tue, 20 Mar 2018 07:18:44 -0400 Subject: Fix cpufreq applet spacing on HiDPI displays --- cpufreq/src/cpufreq-applet.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cpufreq/src') diff --git a/cpufreq/src/cpufreq-applet.c b/cpufreq/src/cpufreq-applet.c index 4f60202c..c667eda6 100644 --- a/cpufreq/src/cpufreq-applet.c +++ b/cpufreq/src/cpufreq-applet.c @@ -372,8 +372,10 @@ cpufreq_applet_get_preferred_width (GtkWidget *widget, gint *minimum_width, gint CPUFreqApplet *applet; gint labels_width = 0; gint width; + gint scale; applet = CPUFREQ_APPLET (widget); + scale = gtk_widget_get_scale_factor (widget); if (applet->orient == MATE_PANEL_APPLET_ORIENT_LEFT || applet->orient == MATE_PANEL_APPLET_ORIENT_RIGHT) @@ -401,7 +403,7 @@ cpufreq_applet_get_preferred_width (GtkWidget *widget, gint *minimum_width, gint width = labels_width; } - *minimum_width = *natural_width = width; + *minimum_width = *natural_width = width / scale; } static void -- cgit v1.2.1