Skip to content

Commit 301a447

Browse files
doc: update the file
1 parent 13c3d74 commit 301a447

File tree

2 files changed

+19
-16
lines changed

2 files changed

+19
-16
lines changed

docs/assets/zh_CN.png

-84.9 KB
Loading

src/Page/Tabs/Lua/LuaTab.cpp

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -497,21 +497,24 @@ wxString LuaTab::GetCurrentLuaFilePath()
497497
void LuaTab::DoSetupStyledTextCtrl(wxStyledTextCtrl *textCtrl)
498498
{
499499
textCtrl->SetLexer(wxSTC_LEX_LUA);
500-
// 显示行号
501-
textCtrl->SetMarginType(0, wxSTC_MARGIN_NUMBER);
502500
textCtrl->SetKeyWords(0, "function end local if then else for while do return break");
503-
textCtrl->StyleSetForeground(wxSTC_LUA_DEFAULT, wxColour("#000000"));
504-
textCtrl->StyleSetForeground(wxSTC_LUA_COMMENT, wxColour("#008000"));
505-
textCtrl->StyleSetForeground(wxSTC_LUA_COMMENTLINE, wxColour("#008000"));
506-
textCtrl->StyleSetForeground(wxSTC_LUA_COMMENTDOC, wxColour("#808080"));
507-
textCtrl->StyleSetForeground(wxSTC_LUA_NUMBER, wxColour("#0000FF"));
508-
textCtrl->StyleSetForeground(wxSTC_LUA_STRING, wxColour("#A32121"));
509-
textCtrl->StyleSetForeground(wxSTC_LUA_CHARACTER, wxColour("#A32121"));
510-
textCtrl->StyleSetForeground(wxSTC_LUA_LITERALSTRING, wxColour("#A32121"));
511-
textCtrl->StyleSetForeground(wxSTC_LUA_PREPROCESSOR, wxColour("#800080"));
512-
textCtrl->StyleSetForeground(wxSTC_LUA_OPERATOR, wxColour("#000000"));
513-
textCtrl->StyleSetForeground(wxSTC_LUA_IDENTIFIER, wxColour("#000000"));
514-
textCtrl->StyleSetForeground(wxSTC_LUA_STRINGEOL, wxColour("#FF0000"));
515-
textCtrl->StyleSetForeground(wxSTC_LUA_WORD, wxColour("#0000FF"));
516-
textCtrl->StyleSetBold(wxSTC_LUA_WORD, true);
501+
textCtrl->StyleSetForeground(wxSTC_LUA_DEFAULT, wxColor("#000000")); // 默认文本颜色
502+
textCtrl->StyleSetForeground(wxSTC_LUA_COMMENT, wxColor("#737773ff")); // 注释颜色
503+
textCtrl->StyleSetForeground(wxSTC_LUA_COMMENTLINE, wxColor("#737773ff")); // 注释颜色
504+
textCtrl->StyleSetForeground(wxSTC_LUA_COMMENTDOC, wxColor("#737773ff")); // 注释颜色
505+
textCtrl->StyleSetForeground(wxSTC_LUA_NUMBER, wxColor("#0000FF")); // 数字颜色
506+
textCtrl->StyleSetForeground(wxSTC_LUA_WORD, wxColor("#0000FF")); // 关键字颜色
507+
textCtrl->StyleSetForeground(wxSTC_LUA_STRING, wxColor("#A31515")); // 字符串颜色
508+
textCtrl->StyleSetForeground(wxSTC_LUA_CHARACTER, wxColor("#A31515")); // 字符颜色
509+
textCtrl->StyleSetForeground(wxSTC_LUA_LITERALSTRING, wxColor("#A31515")); // 字符串颜色
510+
textCtrl->StyleSetForeground(wxSTC_LUA_PREPROCESSOR, wxColor("#FF00FF")); // 预处理器颜色
511+
textCtrl->StyleSetForeground(wxSTC_LUA_OPERATOR, wxColor("#000000")); // 操作符颜色
512+
textCtrl->StyleSetForeground(wxSTC_LUA_IDENTIFIER, wxColor("#000000")); // 标识符颜色
513+
textCtrl->StyleSetForeground(wxSTC_LUA_STRINGEOL, wxColor("#FF0000")); // 字符串未闭合颜色
514+
textCtrl->StyleSetForeground(wxSTC_LUA_LABEL, wxColor("#A31515")); // 标签颜色
515+
textCtrl->SetMarginType(0, wxSTC_MARGIN_NUMBER); // 设置行号栏类型为数字
516+
textCtrl->SetMarginWidth(0, 40); // 设置行号栏宽度
517+
textCtrl->SetTabWidth(4); // 设置Tab宽度为4个空格
518+
textCtrl->SetUseTabs(true); // 使用空格代替Tab
519+
textCtrl->SetWrapMode(wxSTC_WRAP_NONE); // 自动换行
517520
}

0 commit comments

Comments
 (0)