diff options
author | Victor Kareh <[email protected]> | 2017-12-20 14:03:18 -0500 |
---|---|---|
committer | lukefromdc <[email protected]> | 2018-01-25 20:20:58 -0500 |
commit | 7f99492c269f541c81e4f36742ecc3f0b4ebac04 (patch) | |
tree | e528643e8afb5fab8517c0116700b24ee0e87c26 /mate-panel/panel-struts.c | |
parent | e8f52ab153125b06d0de4847274d29dc0ac951a6 (diff) | |
download | mate-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-struts.c')
-rw-r--r-- | mate-panel/panel-struts.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/mate-panel/panel-struts.c b/mate-panel/panel-struts.c index 644dafb0..d59587e5 100644 --- a/mate-panel/panel-struts.c +++ b/mate-panel/panel-struts.c @@ -404,7 +404,8 @@ panel_struts_register_strut (PanelToplevel *toplevel, PanelOrientation orientation, int strut_size, int strut_start, - int strut_end) + int strut_end, + gint scale) { PanelStrut *strut; gboolean new_strut = FALSE; @@ -440,24 +441,24 @@ panel_struts_register_strut (PanelToplevel *toplevel, strut->geometry.x = strut->strut_start; strut->geometry.y = monitor_y; strut->geometry.width = strut->strut_end - strut->strut_start + 1; - strut->geometry.height = strut->strut_size; + strut->geometry.height = strut->strut_size / scale; break; case PANEL_ORIENTATION_BOTTOM: strut->geometry.x = strut->strut_start; strut->geometry.y = monitor_y + monitor_height - strut->strut_size; strut->geometry.width = strut->strut_end - strut->strut_start + 1; - strut->geometry.height = strut->strut_size; + strut->geometry.height = strut->strut_size / scale; break; case PANEL_ORIENTATION_LEFT: strut->geometry.x = monitor_x; strut->geometry.y = strut->strut_start; - strut->geometry.width = strut->strut_size; + strut->geometry.width = strut->strut_size / scale; strut->geometry.height = strut->strut_end - strut->strut_start + 1; break; case PANEL_ORIENTATION_RIGHT: strut->geometry.x = monitor_x + monitor_width - strut->strut_size; strut->geometry.y = strut->strut_start; - strut->geometry.width = strut->strut_size; + strut->geometry.width = strut->strut_size / scale; strut->geometry.height = strut->strut_end - strut->strut_start + 1; break; } |