diff options
author | Dan Gudmundsson <[email protected]> | 2019-02-18 12:37:23 +0100 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2019-02-18 12:37:23 +0100 |
commit | 1fc95bdd084d9e43e255a1962dbb562a2e1aa367 (patch) | |
tree | 0eaf5423b445b45ed7982161b3ea8379e5d2f9a9 /lib/observer/src/observer_app_wx.erl | |
parent | e25fe1d35209d321a512091018a78ee9b7cc0b64 (diff) | |
parent | 77e83d0757d56d15f4b1bc70044b89d3eaf48b2b (diff) | |
download | otp-1fc95bdd084d9e43e255a1962dbb562a2e1aa367.tar.gz otp-1fc95bdd084d9e43e255a1962dbb562a2e1aa367.tar.bz2 otp-1fc95bdd084d9e43e255a1962dbb562a2e1aa367.zip |
Merge branch 'pr/2105' into maint
* pr/2105:
Add OBSERVER_SCALE environment variable for HiDPI support
OTP-15586
Diffstat (limited to 'lib/observer/src/observer_app_wx.erl')
-rw-r--r-- | lib/observer/src/observer_app_wx.erl | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/observer/src/observer_app_wx.erl b/lib/observer/src/observer_app_wx.erl index 2a481966da..8c3eef5411 100644 --- a/lib/observer/src/observer_app_wx.erl +++ b/lib/observer/src/observer_app_wx.erl @@ -117,16 +117,19 @@ init([Notebook, Parent, _Config]) -> UseGC = haveGC(), Version28 = ?wxMAJOR_VERSION =:= 2 andalso ?wxMINOR_VERSION =:= 8, + Scale = observer_wx:get_scale(), Font = case os:type() of {unix,_} when UseGC, Version28 -> - wxFont:new(12,?wxFONTFAMILY_DECORATIVE,?wxFONTSTYLE_NORMAL,?wxFONTWEIGHT_NORMAL); + wxFont:new(Scale * 12,?wxFONTFAMILY_DECORATIVE,?wxFONTSTYLE_NORMAL,?wxFONTWEIGHT_NORMAL); _ -> - wxSystemSettings:getFont(?wxSYS_DEFAULT_GUI_FONT) + Font0 = wxSystemSettings:getFont(?wxSYS_DEFAULT_GUI_FONT), + wxFont:setPointSize(Font0, Scale * wxFont:getPointSize(Font0)), + Font0 end, SelCol = wxSystemSettings:getColour(?wxSYS_COLOUR_HIGHLIGHT), GreyBrush = wxBrush:new({230,230,240}), SelBrush = wxBrush:new(SelCol), - LinkPen = wxPen:new(SelCol, [{width, 2}]), + LinkPen = wxPen:new(SelCol, [{width, Scale * 2}]), process_flag(trap_exit, true), {Panel, #state{parent=Parent, panel =Panel, @@ -134,7 +137,7 @@ init([Notebook, Parent, _Config]) -> app_w =DrawingArea, usegc = UseGC, paint=#paint{font = Font, - pen = wxPen:new({80,80,80}, [{width, 2}]), + pen = wxPen:new({80,80,80}, [{width, Scale * 2}]), brush= GreyBrush, sel = SelBrush, links= LinkPen |