Add 0002_fix_cpufreq_applet_spacing.patch. Fix cpufreq applet spacing on HiDPI displays.

This commit is contained in:
Martin Wimpress
2018-03-21 17:47:05 +00:00
parent a93d1a467d
commit b2f02f9ea9
2 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,24 @@
diff --git a/cpufreq/src/cpufreq-applet.c b/cpufreq/src/cpufreq-applet.c
index 4f60202..c667eda 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

View File

@ -1,2 +1,3 @@
0001_add_style_class_multiload_applet.patch
0002_fix_cpufreq_applet_spacing.patch
1000-fix-build-on-linux-4.7-or-newer.patch