diff options
author | Dan Gudmundsson <[email protected]> | 2011-11-24 15:50:20 +0100 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2011-11-25 10:40:32 +0100 |
commit | d05100131a0492d71cbda3fa2a6ba647f14c610a (patch) | |
tree | 147a192a1d5c7a10196f51a0f124a35c52d7ff2c /lib/observer/src/observer_wx.erl | |
parent | e7a2f0d7228d8933ee55bdb18fb01a1b19c078a7 (diff) | |
download | otp-d05100131a0492d71cbda3fa2a6ba647f14c610a.tar.gz otp-d05100131a0492d71cbda3fa2a6ba647f14c610a.tar.bz2 otp-d05100131a0492d71cbda3fa2a6ba647f14c610a.zip |
[observer] Change process_info stack to be listctrl
Diffstat (limited to 'lib/observer/src/observer_wx.erl')
-rw-r--r-- | lib/observer/src/observer_wx.erl | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/lib/observer/src/observer_wx.erl b/lib/observer/src/observer_wx.erl index 65380a49b0..5586cfcb9a 100644 --- a/lib/observer/src/observer_wx.erl +++ b/lib/observer/src/observer_wx.erl @@ -78,7 +78,7 @@ init(_Args) -> wx:new(), catch wxSystemOptions:setOption("mac.listctrl.always_use_generic", 1), Frame = wxFrame:new(wx:null(), ?wxID_ANY, "Observer", - [{size, {1000, 500}}, {style, ?wxDEFAULT_FRAME_STYLE}]), + [{size, {850, 600}}, {style, ?wxDEFAULT_FRAME_STYLE}]), IconFile = filename:join(code:priv_dir(observer), "erlang_observer.png"), Icon = wxIcon:new(IconFile, [{type,?wxBITMAP_TYPE_PNG}]), wxFrame:setIcon(Frame, Icon), @@ -155,11 +155,18 @@ setup(#state{frame = Frame} = State) -> nodes = Nodes }, %% Create resources which we don't want to duplicate - SysFont = wxSystemSettings:getFont(?wxSYS_DEFAULT_GUI_FONT), - SysFontSize = wxFont:getPointSize(SysFont), - Modern = wxFont:new(SysFontSize, ?wxFONTFAMILY_MODERN, ?wxFONTSTYLE_NORMAL, ?wxFONTWEIGHT_NORMAL), - put({font, modern}, Modern), - put({font, fixed}, Modern), + SysFont = wxSystemSettings:getFont(?wxSYS_SYSTEM_FIXED_FONT), + %% OemFont = wxSystemSettings:getFont(?wxSYS_OEM_FIXED_FONT), + %% io:format("Sz sys ~p(~p) oem ~p(~p)~n", + %% [wxFont:getPointSize(SysFont), wxFont:isFixedWidth(SysFont), + %% wxFont:getPointSize(OemFont), wxFont:isFixedWidth(OemFont)]), + Fixed = case wxFont:isFixedWidth(SysFont) of + true -> SysFont; + false -> %% Sigh + SysFontSize = wxFont:getPointSize(SysFont), + wxFont:new(SysFontSize, ?wxFONTFAMILY_MODERN, ?wxFONTSTYLE_NORMAL, ?wxFONTWEIGHT_NORMAL) + end, + put({font, fixed}, Fixed), UpdState. @@ -472,7 +479,7 @@ default_menus(NodesMenuItems) -> [#create_menu{id = ?ID_CONNECT, text = "Enable distribution"}]} end, case os:type() =:= {unix, darwin} of - false -> + false -> FileMenu = {"File", [Quit]}, HelpMenu = {"Help", [About,Help]}, [FileMenu, NodeMenu, HelpMenu]; |