summaryrefslogtreecommitdiff
path: root/mate-panel/panel-run-dialog.c
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2017-12-20 14:03:18 -0500
committerlukefromdc <[email protected]>2018-01-25 20:20:58 -0500
commit7f99492c269f541c81e4f36742ecc3f0b4ebac04 (patch)
treee528643e8afb5fab8517c0116700b24ee0e87c26 /mate-panel/panel-run-dialog.c
parente8f52ab153125b06d0de4847274d29dc0ac951a6 (diff)
downloadmate-panel-7f99492c269f541c81e4f36742ecc3f0b4ebac04.tar.bz2
mate-panel-7f99492c269f541c81e4f36742ecc3f0b4ebac04.tar.xz
Support panel auto-scaling for HiDPI displays
*Fix scaling of panel widgets, buttons, and the menu bar *Draw grab handles at the ends of the panel *Fix size of _almost_ all included applets *Fix panel snapping coordinates *Down-scale monitor coordinates to support multi-monitors Author: Victor Kareh <[email protected]> Date: Wed Dec 20 14:03:18 2017 -0500
Diffstat (limited to 'mate-panel/panel-run-dialog.c')
-rw-r--r--mate-panel/panel-run-dialog.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mate-panel/panel-run-dialog.c b/mate-panel/panel-run-dialog.c
index e00d0c51..a696138e 100644
--- a/mate-panel/panel-run-dialog.c
+++ b/mate-panel/panel-run-dialog.c
@@ -1695,6 +1695,7 @@ panel_run_dialog_setup_entry (PanelRunDialog *dialog,
GdkScreen *screen;
int width_request;
GtkWidget *entry;
+ gint scale;
dialog->combobox = PANEL_GTK_BUILDER_GET (gui, "comboboxentry");
@@ -1707,9 +1708,10 @@ panel_run_dialog_setup_entry (PanelRunDialog *dialog,
(GTK_COMBO_BOX (dialog->combobox), 0);
screen = gtk_window_get_screen (GTK_WINDOW (dialog->run_dialog));
+ scale = gtk_widget_get_scale_factor (GTK_WINDOW (dialog->run_dialog));
/* 1/4 the width of the first monitor should be a good value */
- width_request = panel_multiscreen_width (screen, 0) / 4;
+ width_request = panel_multiscreen_width (screen, 0) / (4 * scale);
g_object_set (G_OBJECT (dialog->combobox),
"width_request", width_request,
NULL);