Skip to content

Commit

Permalink
Fix cpufreq applet spacing on HiDPI displays
Browse files Browse the repository at this point in the history
  • Loading branch information
vkareh authored and raveit65 committed Mar 21, 2018
1 parent 0cc3725 commit ea40c35
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cpufreq/src/cpufreq-applet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ea40c35

Please sign in to comment.