summaryrefslogtreecommitdiff
path: root/cpufreq
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2018-03-20 07:18:44 -0400
committerraveit65 <[email protected]>2018-03-21 07:49:27 +0100
commite35e951449351c498fbefd6cfd661fb213617d85 (patch)
tree974dfebaa4f2e957022ee40e771816050bd58de4 /cpufreq
parent2ef655a320a36dc2018e26b5352b768c6d626073 (diff)
downloadmate-applets-e35e951449351c498fbefd6cfd661fb213617d85.tar.bz2
mate-applets-e35e951449351c498fbefd6cfd661fb213617d85.tar.xz
Fix cpufreq applet spacing on HiDPI displays
Diffstat (limited to 'cpufreq')
-rw-r--r--cpufreq/src/cpufreq-applet.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/cpufreq/src/cpufreq-applet.c b/cpufreq/src/cpufreq-applet.c
index 335c8c63..03609bc5 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