Make Contract Calls Great Again #35
@@ -26,6 +26,7 @@
|
|||||||
-define(H, 255). % High
|
-define(H, 255). % High
|
||||||
-define(M, 192). % Medium
|
-define(M, 192). % Medium
|
||||||
-define(L, 128). % Low
|
-define(L, 128). % Low
|
||||||
|
-define(D, 64). % Deep-Low
|
||||||
-define(X, 32). % X-Low
|
-define(X, 32). % X-Low
|
||||||
-define(Z, 0). % Zilch
|
-define(Z, 0). % Zilch
|
||||||
|
|
||||||
@@ -46,8 +47,9 @@
|
|||||||
-define(brown, {?L, ?L, ?Z}).
|
-define(brown, {?L, ?L, ?Z}).
|
||||||
-define(magenta, {?L, ?Z, ?L}).
|
-define(magenta, {?L, ?Z, ?L}).
|
||||||
-define(cyan, {?Z, ?L, ?L}).
|
-define(cyan, {?Z, ?L, ?L}).
|
||||||
-define(not_black, {?X, ?X, ?X}).
|
|
||||||
-define(grey, {?L, ?L, ?L}).
|
-define(grey, {?L, ?L, ?L}).
|
||||||
|
-define(dark_grey, {?D, ?D, ?D}).
|
||||||
|
-define(not_black, {?X, ?X, ?X}).
|
||||||
-define(white, {?M, ?M, ?M}).
|
-define(white, {?M, ?M, ?M}).
|
||||||
|
|
||||||
styles() ->
|
styles() ->
|
||||||
@@ -67,6 +69,7 @@ palette(light) ->
|
|||||||
?STRING => ?red,
|
?STRING => ?red,
|
||||||
?NUMBER => ?magenta,
|
?NUMBER => ?magenta,
|
||||||
?OPERATOR => ?brown,
|
?OPERATOR => ?brown,
|
||||||
|
sel_back => ?grey,
|
||||||
line_num => ?brown,
|
line_num => ?brown,
|
||||||
cursor => ?black,
|
cursor => ?black,
|
||||||
bg => ?high_white};
|
bg => ?high_white};
|
||||||
@@ -78,6 +81,7 @@ palette(dark) ->
|
|||||||
?STRING => ?light_red,
|
?STRING => ?light_red,
|
||||||
?NUMBER => ?light_magenta,
|
?NUMBER => ?light_magenta,
|
||||||
?OPERATOR => ?yellow,
|
?OPERATOR => ?yellow,
|
||||||
|
sel_back => ?dark_grey,
|
||||||
line_num => ?yellow,
|
line_num => ?yellow,
|
||||||
cursor => ?white,
|
cursor => ?white,
|
||||||
bg => ?not_black}.
|
bg => ?not_black}.
|
||||||
@@ -118,7 +122,8 @@ set_text(STC, Text) ->
|
|||||||
|
|
||||||
set_colors(STC) ->
|
set_colors(STC) ->
|
||||||
ok = wxStyledTextCtrl:styleClearAll(STC),
|
ok = wxStyledTextCtrl:styleClearAll(STC),
|
||||||
Palette = #{bg := BGC, cursor := CC, line_num := LNC} = palette(color_mode()),
|
Palette = palette(color_mode()),
|
||||||
|
#{bg := BGC, cursor := CC, line_num := LNC, sel_back := SFB} = Palette,
|
||||||
Colorize =
|
Colorize =
|
||||||
fun(Style) ->
|
fun(Style) ->
|
||||||
Color = maps:get(Style, Palette),
|
Color = maps:get(Style, Palette),
|
||||||
@@ -126,6 +131,7 @@ set_colors(STC) ->
|
|||||||
ok = wxStyledTextCtrl:styleSetBackground(STC, Style, BGC)
|
ok = wxStyledTextCtrl:styleSetBackground(STC, Style, BGC)
|
||||||
end,
|
end,
|
||||||
ok = wxStyledTextCtrl:setCaretForeground(STC, CC),
|
ok = wxStyledTextCtrl:setCaretForeground(STC, CC),
|
||||||
|
ok = wxStyledTextCtrl:setSelBackground(STC, true, SFB),
|
||||||
ok = wxStyledTextCtrl:styleSetForeground(STC, ?wxSTC_STYLE_LINENUMBER, LNC),
|
ok = wxStyledTextCtrl:styleSetForeground(STC, ?wxSTC_STYLE_LINENUMBER, LNC),
|
||||||
ok = wxStyledTextCtrl:styleSetBackground(STC, ?wxSTC_STYLE_DEFAULT, BGC),
|
ok = wxStyledTextCtrl:styleSetBackground(STC, ?wxSTC_STYLE_DEFAULT, BGC),
|
||||||
lists:foreach(Colorize, styles()).
|
lists:foreach(Colorize, styles()).
|
||||||
|
|||||||
Reference in New Issue
Block a user