From 9388360353e0d1e77f602c3402e5b1e9f7d5c9b5 Mon Sep 17 00:00:00 2001 From: Eran Ifrah Date: Sun, 24 Nov 2024 08:47:48 +0200 Subject: [PATCH] Do not manipulate the line number margin colours, use them as they entered by the user Signed-off-by: Eran Ifrah --- CodeLiteIDE-MSW.workspace | 2 +- Plugin/ThemeImporters/ThemeImporterBase.cpp | 2 +- Plugin/lexer_configuration.cpp | 7 +++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/CodeLiteIDE-MSW.workspace b/CodeLiteIDE-MSW.workspace index 0cfdfb36ce..4d005f0f00 100644 --- a/CodeLiteIDE-MSW.workspace +++ b/CodeLiteIDE-MSW.workspace @@ -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"]], diff --git a/Plugin/ThemeImporters/ThemeImporterBase.cpp b/Plugin/ThemeImporters/ThemeImporterBase.cpp index f2d1a09766..62eb8f5bd1 100644 --- a/Plugin/ThemeImporters/ThemeImporterBase.cpp +++ b/Plugin/ThemeImporters/ThemeImporterBase.cpp @@ -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) diff --git a/Plugin/lexer_configuration.cpp b/Plugin/lexer_configuration.cpp index 5ae1f6d7e4..054ab10440 100644 --- a/Plugin/lexer_configuration.cpp +++ b/Plugin/lexer_configuration.cpp @@ -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