aboutsummaryrefslogtreecommitdiffstats
path: root/lib/observer/src/observer_lib.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2016-05-12 15:00:44 +0200
committerDan Gudmundsson <[email protected]>2016-05-12 15:00:44 +0200
commit08b773e0b43534495d987dda268cf56661cf5c01 (patch)
tree4e78c9ff3c77a1249004bb9987604709f64697f1 /lib/observer/src/observer_lib.erl
parente1ad5319f0b76460d9147ef04640c469f5a180d6 (diff)
downloadotp-08b773e0b43534495d987dda268cf56661cf5c01.tar.gz
otp-08b773e0b43534495d987dda268cf56661cf5c01.tar.bz2
otp-08b773e0b43534495d987dda268cf56661cf5c01.zip
Change binary debug tuple to size and refc info
And cut the line after 80 chars
Diffstat (limited to 'lib/observer/src/observer_lib.erl')
-rw-r--r--lib/observer/src/observer_lib.erl19
1 files changed, 12 insertions, 7 deletions
diff --git a/lib/observer/src/observer_lib.erl b/lib/observer/src/observer_lib.erl
index c6a1c73c83..7c1337025f 100644
--- a/lib/observer/src/observer_lib.erl
+++ b/lib/observer/src/observer_lib.erl
@@ -128,8 +128,8 @@ display_info(Frame, Info) ->
Add = fun(BoxInfo) ->
case create_box(Panel, BoxInfo) of
{Box, InfoFs} ->
- wxSizer:add(Sizer, Box, [{flag, ?wxEXPAND bor ?wxALL},
- {border, 5}]),
+ wxSizer:add(Sizer, Box,
+ [{flag, ?wxEXPAND bor ?wxALL}, {border, 5}]),
wxSizer:addSpacer(Sizer, 5),
InfoFs;
undefined ->
@@ -453,14 +453,19 @@ create_box(Parent, Data) ->
link_entry(Panel,Value);
_ ->
Value = to_str(Value0),
- TCtrl = wxStaticText:new(Panel, ?wxID_ANY,Value),
- length(Value) > 50 andalso
- wxWindow:setToolTip(TCtrl,wxToolTip:new(Value)),
- TCtrl
+ case length(Value) > 100 of
+ true ->
+ Shown = lists:sublist(Value, 80),
+ TCtrl = wxStaticText:new(Panel, ?wxID_ANY, [Shown,"..."]),
+ wxWindow:setToolTip(TCtrl,wxToolTip:new(Value)),
+ TCtrl;
+ false ->
+ wxStaticText:new(Panel, ?wxID_ANY, Value)
+ end
end,
wxSizer:add(Line, 10, 0), % space of size 10 horisontally
wxSizer:add(Line, Field, RightProportion),
- wxSizer:add(Box, Line, [{proportion,1},{flag,?wxEXPAND}]),
+ wxSizer:add(Box, Line, [{proportion,1}]),
Field;
(undefined) ->
undefined