Skip to content

Commit

Permalink
Do not manipulate the line number margin colours, use them as they en…
Browse files Browse the repository at this point in the history
…tered by the user

Signed-off-by: Eran Ifrah <[email protected]>
  • Loading branch information
eranif committed Nov 24, 2024
1 parent 16219e6 commit 9388360
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CodeLiteIDE-MSW.workspace
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"file_extensions": "*.cpp;*.c;*.txt;*.json;*.hpp;*.cc;*.cxx;*.xml;*.h;*.wxcp;*.py;*.php;*.rb;*.html;*.js;*.ts;*.rs;*.iss;*.md;*.bat",
"excludeFilesPattern": "*.o;*.pyc;*.obj;*.workspace;*.o.d;*.exe;*.dll;*.project",
"excludePaths": "",
"debugger": "lldb-vscode"
"debugger": ""
}, {
"name": "Release",
"targets": [["build", "cd $(WorkspacePath)\\build-release && mingw32-make -j24 install"], ["clean", "cd $(WorkspacePath)\\build-release && mingw32-make -j24 clean && rm -fr install"]],
Expand Down
2 changes: 1 addition & 1 deletion Plugin/ThemeImporters/ThemeImporterBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ void ThemeImporterBase::AddCommonProperties(LexerConf::Ptr_t lexer)
AddProperty(lexer, "-3", "Caret Colour", m_caret);
AddProperty(lexer, "-4", "Whitespace", whitespaceColour, m_editor.bg_colour);
AddProperty(lexer, "38", "Calltip", m_editor);
AddProperty(lexer, "33", "Line Numbers", m_lineNumber);
AddProperty(lexer, "33", "Line Numbers", m_lineNumber.fg_colour, m_editor.bg_colour);
}

void ThemeImporterBase::DoSetKeywords(wxString& wordset, const wxString& words)
Expand Down
7 changes: 3 additions & 4 deletions Plugin/lexer_configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,11 +258,10 @@ void LexerConf::Apply(wxStyledTextCtrl* ctrl, bool applyKeywords)
wxColour line_number_bg_colour = lineNumberProp.GetBgColour();
if (!line_number_text_colour.IsOk() || !line_number_bg_colour.IsOk()) {
clSYSTEM() << "Invalid colour!" << endl;
} else {
ctrl->StyleSetBackground(wxSTC_STYLE_LINENUMBER, line_number_bg_colour);
ctrl->StyleSetForeground(wxSTC_STYLE_LINENUMBER, line_number_text_colour);
}

wxColour bg = line_number_bg_colour.ChangeLightness(95);
ctrl->StyleSetBackground(wxSTC_STYLE_LINENUMBER, bg);
ctrl->StyleSetForeground(wxSTC_STYLE_LINENUMBER, line_number_text_colour);
}

// set the calltip font
Expand Down

0 comments on commit 9388360

Please sign in to comment.