Make Contract Calls Great Again #35

Merged
zxq9 merged 37 commits from iface3 into master 2026-05-10 15:39:25 +09:00
Showing only changes of commit 5a745af71b - Show all commits
+7 -1
View File
@@ -67,6 +67,8 @@ palette(light) ->
?STRING => ?red, ?STRING => ?red,
?NUMBER => ?magenta, ?NUMBER => ?magenta,
?OPERATOR => ?brown, ?OPERATOR => ?brown,
line_num => ?brown,
cursor => ?black,
bg => ?high_white}; bg => ?high_white};
palette(dark) -> palette(dark) ->
#{?DEFAULT => ?white, #{?DEFAULT => ?white,
@@ -76,6 +78,8 @@ palette(dark) ->
?STRING => ?light_red, ?STRING => ?light_red,
?NUMBER => ?light_magenta, ?NUMBER => ?light_magenta,
?OPERATOR => ?yellow, ?OPERATOR => ?yellow,
line_num => ?light_cyan,
cursor => ?white,
bg => ?not_black}. bg => ?not_black}.
color_mode() -> color_mode() ->
@@ -114,13 +118,15 @@ set_text(STC, Text) ->
set_colors(STC) -> set_colors(STC) ->
ok = wxStyledTextCtrl:styleClearAll(STC), ok = wxStyledTextCtrl:styleClearAll(STC),
Palette = #{bg := BGC} = palette(color_mode()), Palette = #{bg := BGC, cursor := CC, line_num := LNC} = palette(color_mode()),
Colorize = Colorize =
fun(Style) -> fun(Style) ->
Color = maps:get(Style, Palette), Color = maps:get(Style, Palette),
ok = wxStyledTextCtrl:styleSetForeground(STC, Style, Color), ok = wxStyledTextCtrl:styleSetForeground(STC, Style, Color),
ok = wxStyledTextCtrl:styleSetBackground(STC, Style, BGC) ok = wxStyledTextCtrl:styleSetBackground(STC, Style, BGC)
end, end,
ok = wxStyledTextCtrl:setCaretForeground(STC, CC),
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()).