diff options
author | Dan Gudmundsson <[email protected]> | 2011-11-10 11:12:48 +0100 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2011-11-11 14:59:18 +0100 |
commit | 3caa688c5522b8f0f039b9375cf6377b1bd88f0e (patch) | |
tree | 3a5fb27501f1a3e729683fc29b47df9aa14d9189 /lib/observer/src/observer_lib.erl | |
parent | b7b88933672591d7f7c2a71a4c1643b6ca486f23 (diff) | |
download | otp-3caa688c5522b8f0f039b9375cf6377b1bd88f0e.tar.gz otp-3caa688c5522b8f0f039b9375cf6377b1bd88f0e.tar.bz2 otp-3caa688c5522b8f0f039b9375cf6377b1bd88f0e.zip |
[observer] Fix portability bugs
Turn on generic listctrl implementation on Mac,
the native doesn't work in wx-2.8.
Fix listctrl colours on mac
Turn on wxSystemMenu for miniFrame to get a close box on Windows.
Direct observer help to a browser.
Cleanups
Diffstat (limited to 'lib/observer/src/observer_lib.erl')
-rw-r--r-- | lib/observer/src/observer_lib.erl | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/observer/src/observer_lib.erl b/lib/observer/src/observer_lib.erl index 8bc79ffddd..b3a2dcf5ec 100644 --- a/lib/observer/src/observer_lib.erl +++ b/lib/observer/src/observer_lib.erl @@ -255,12 +255,15 @@ create_menu_item(separator, Menu, Index) -> create_attrs() -> Font = wxSystemSettings:getFont(?wxSYS_DEFAULT_GUI_FONT), - Text = wxSystemSettings:getColour(?wxSYS_COLOUR_LISTBOXTEXT), - #attrs{even = wxListItemAttr:new(Text, {255,255,255}, Font), - odd = wxListItemAttr:new(Text, {240,240,255}, Font), - deleted = wxListItemAttr:new({240,30,30}, {100,100,100}, Font), - changed = wxListItemAttr:new(Text, {255,215,0}, Font), - searched = wxListItemAttr:new(Text, {235,215,90}, Font) + Text = case wxSystemSettings:getColour(?wxSYS_COLOUR_LISTBOXTEXT) of + {255,255,255,_} -> {10,10,10}; %% Is white on Mac for some reason + Color -> Color + end, + #attrs{even = wxListItemAttr:new(Text, ?BG_EVEN, Font), + odd = wxListItemAttr:new(Text, ?BG_ODD, Font), + deleted = wxListItemAttr:new(?FG_DELETED, ?BG_DELETED, Font), + changed = wxListItemAttr:new(Text, ?BG_CHANGED, Font), + searched = wxListItemAttr:new(Text, ?BG_SEARCHED, Font) }. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |