aboutsummaryrefslogtreecommitdiffstats
path: root/lib/observer/src/observer_sys_wx.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2014-01-21 15:03:27 +0100
committerDan Gudmundsson <[email protected]>2014-01-27 16:13:58 +0100
commita0d7557b1f84e71f79af5f2d32caf2ce994adb4e (patch)
treecbf5f4317671567d3d86ed4e7a05da3c9055dcdc /lib/observer/src/observer_sys_wx.erl
parent61115ab061a21912743c62de19ad0eda57224545 (diff)
downloadotp-a0d7557b1f84e71f79af5f2d32caf2ce994adb4e.tar.gz
otp-a0d7557b1f84e71f79af5f2d32caf2ce994adb4e.tar.bz2
otp-a0d7557b1f84e71f79af5f2d32caf2ce994adb4e.zip
observer: cosmetic gui tweaks
Mainly mac stuff
Diffstat (limited to 'lib/observer/src/observer_sys_wx.erl')
-rw-r--r--lib/observer/src/observer_sys_wx.erl15
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/observer/src/observer_sys_wx.erl b/lib/observer/src/observer_sys_wx.erl
index 8321d6eefe..f989f9cf97 100644
--- a/lib/observer/src/observer_sys_wx.erl
+++ b/lib/observer/src/observer_sys_wx.erl
@@ -60,10 +60,10 @@ init([Notebook, Parent]) ->
wxSizer:add(TopSizer, FPanel0, [{flag, ?wxEXPAND}, {proportion, 1}]),
wxSizer:add(TopSizer, FPanel1, [{flag, ?wxEXPAND}, {proportion, 1}]),
BorderFlags = ?wxLEFT bor ?wxRIGHT,
- MemoryInfo = create_mem_info(Panel, AllocInfo),
+ {MemPanel, MemoryInfo} = create_mem_info(Panel, AllocInfo),
wxSizer:add(Sizer, TopSizer, [{flag, ?wxEXPAND bor BorderFlags bor ?wxTOP},
{proportion, 0}, {border, 5}]),
- wxSizer:add(Sizer, MemoryInfo, [{flag, ?wxEXPAND bor BorderFlags bor ?wxBOTTOM},
+ wxSizer:add(Sizer, MemPanel, [{flag, ?wxEXPAND bor BorderFlags bor ?wxBOTTOM},
{proportion, 1}, {border, 5}]),
wxPanel:setSizer(Panel, Sizer),
Timer = observer_lib:start_timer(10),
@@ -86,7 +86,9 @@ update_syspage(#sys_wx_state{node = Node, fields=Fields, sizer=Sizer, alloc=Allo
update_alloc(AllocCtrl, AllocInfo),
wxSizer:layout(Sizer).
-create_mem_info(Panel, Fields) ->
+create_mem_info(Parent, Fields) ->
+ Panel = wxPanel:new(Parent),
+ wxWindow:setBackgroundColour(Panel, {255,255,255}),
Style = ?wxLC_REPORT bor ?wxLC_SINGLE_SEL bor ?wxLC_HRULES bor ?wxLC_VRULES,
Grid = wxListCtrl:new(Panel, [{style, Style}]),
Li = wxListItem:new(),
@@ -103,7 +105,12 @@ create_mem_info(Panel, Fields) ->
lists:foldl(AddListEntry, 0, ListItems),
wxListItem:destroy(Li),
update_alloc(Grid, Fields),
- Grid.
+
+ Sizer = wxBoxSizer:new(?wxVERTICAL),
+ wxSizer:add(Sizer, Grid, [{flag, ?wxEXPAND bor ?wxLEFT bor ?wxRIGHT},
+ {border, 5}, {proportion, 1}]),
+ wxWindow:setSizerAndFit(Panel, Sizer),
+ {Panel, Grid}.
update_alloc(Grid, AllocInfo) ->
Fields = alloc_info(AllocInfo, [], 0, 0, true),