1. I found no way to change the color of the line numbers. It still whitish.For both of these you'll have to install a darker windows theme. Unfortunately wxWidgets tries to look as native as possible.
3. How to customize Logs & others?
For both of these you'll have to install a darker windows themeThis is not entirely correct...
// 33 is the line number style
wxScintilla::StyleSetBackground(33, "RED");
wxScintilla::StyleSetForeground(33, "YELLOW");
wxScintilla::SetFoldMarginColour
wxScintilla::SetFoldMarginHiColour
Ofc, someone needs to step up and implement it ;)This is quite easy with our new colours system :)
Index: src/sdk/cbeditor.cpp
===================================================================
--- src/sdk/cbeditor.cpp (revision 9361)
+++ src/sdk/cbeditor.cpp (working copy)
@@ -1293,6 +1293,11 @@ void cbEditor::InternalSetEditorStyleBeforeFileOpen(cbStyledTextCtrl* control)
control->SetCaretLineVisible(mgr->ReadBool(_T("/highlight_caret_line"), false));
control->SetCaretLineBackground(GetOptionColour(_T("/highlight_caret_line_colour"), wxColour(0xFF, 0xFF, 0x00)));
+ control->StyleSetBackground(wxSCI_STYLE_LINENUMBER, *wxRED);
+ control->StyleSetForeground(wxSCI_STYLE_LINENUMBER, *wxBLACK);
+ control->SetFoldMarginColour(true, *wxRED);
+ control->SetFoldMarginHiColour(true, *wxBLACK);
+
// setup for "CamelCase selection"
if (mgr->ReadBool(_T("/camel_case"), false))
{
Index: src/sdk/editorcolourset.cpp
===================================================================
--- src/sdk/editorcolourset.cpp (revision 9361)
+++ src/sdk/editorcolourset.cpp (working copy)
@@ -479,6 +479,8 @@ wxString EditorColourSet::GetLanguageName(HighlightLanguage lang)
void EditorColourSet::DoApplyStyle(cbStyledTextCtrl* control, int value, OptionColour* option)
{
+ if (value==33)
+ std::terminate();
// option->value is ignored here...
// value is used instead
if (option->fore != wxNullColour)
@@ -534,10 +536,10 @@ void EditorColourSet::Apply(HighlightLanguage lang, cbStyledTextCtrl* control, b
DoApplyStyle(control, i, defaults);
}
}
- // for some strange reason, when switching styles, the line numbering changes colour
- // too, though we didn't ask it to...
- // this makes sure it stays the correct colour
- control->StyleSetForeground(wxSCI_STYLE_LINENUMBER, wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT));
+// // for some strange reason, when switching styles, the line numbering changes colour
+// // too, though we didn't ask it to...
+// // this makes sure it stays the correct colour
+// control->StyleSetForeground(wxSCI_STYLE_LINENUMBER, wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT));
for (unsigned int i = 0; i < mset.m_Colours.GetCount(); ++i)
{
Hm, it seems that setting the background for line numbers doesn't work on wxGTK.Strange, this code works for me for all majors OS (including FreeBSD)
Insert QuoteI have it working on various themes / desktops (KDE, Ubuntu, XFCE) all are behaving the same
Maybe it is something theme related
Is this screen shot from CodeLite?Yes
void EditorColourSet::Apply(HighlightLanguage lang, cbStyledTextCtrl* control, bool isC)
{
if (!control)
return;
control->StyleClearAll();
Index: src/sdk/cbeditor.cpp
===================================================================
--- src/sdk/cbeditor.cpp (revision 9363)
+++ src/sdk/cbeditor.cpp (working copy)
@@ -1288,11 +1288,17 @@ void cbEditor::InternalSetEditorStyleBeforeFileOpen(cbStyledTextCtrl* control)
control->SetCaretWidth(mgr->ReadInt(_T("/caret/width"), 1));
else
control->SetCaretWidth(1);
- control->SetCaretForeground(Manager::Get()->GetColourManager()->GetColour(wxT("editor_caret")));
+
+ ColourManager *colours = Manager::Get()->GetColourManager();
+
+ control->SetCaretForeground(colours->GetColour(wxT("editor_caret")));
control->SetCaretPeriod(mgr->ReadInt(_T("/caret/period"), 500));
control->SetCaretLineVisible(mgr->ReadBool(_T("/highlight_caret_line"), false));
control->SetCaretLineBackground(GetOptionColour(_T("/highlight_caret_line_colour"), wxColour(0xFF, 0xFF, 0x00)));
+ control->SetFoldMarginColour(true, colours->GetColour(wxT("editor_margin_chrome")));
+ control->SetFoldMarginHiColour(true, colours->GetColour(wxT("editor_margin_chrome_highlight")));
+
// setup for "CamelCase selection"
if (mgr->ReadBool(_T("/camel_case"), false))
{
Index: src/sdk/editorcolourset.cpp
===================================================================
--- src/sdk/editorcolourset.cpp (revision 9363)
+++ src/sdk/editorcolourset.cpp (working copy)
@@ -25,6 +25,7 @@
#include <wx/txtstrm.h> // wxTextInputStream
#include <wx/wfstream.h> // wxFileInputStream
+#include "cbcolourmanager.h"
#include "cbstyledtextctrl.h"
#include "editorcolourset.h"
@@ -534,10 +535,11 @@ void EditorColourSet::Apply(HighlightLanguage lang, cbStyledTextCtrl* control, b
DoApplyStyle(control, i, defaults);
}
}
- // for some strange reason, when switching styles, the line numbering changes colour
- // too, though we didn't ask it to...
- // this makes sure it stays the correct colour
- control->StyleSetForeground(wxSCI_STYLE_LINENUMBER, wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT));
+
+ // Calling StyleClearAll above clears the style for the line numbers, so we have to re-apply it.
+ ColourManager *colours = Manager::Get()->GetColourManager();
+ control->StyleSetForeground(wxSCI_STYLE_LINENUMBER, colours->GetColour(wxT("editor_linenumbers_fg")));
+ control->StyleSetBackground(wxSCI_STYLE_LINENUMBER, colours->GetColour(wxT("editor_linenumbers_bg")));
for (unsigned int i = 0; i < mset.m_Colours.GetCount(); ++i)
{
Index: src/sdk/editormanager.cpp
===================================================================
--- src/sdk/editormanager.cpp (revision 9363)
+++ src/sdk/editormanager.cpp (working copy)
@@ -166,6 +166,16 @@ EditorManager::EditorManager()
ColourManager *colours = Manager::Get()->GetColourManager();
colours->RegisterColour(_("Editor"), _("Caret"), wxT("editor_caret"), *wxBLACK);
colours->RegisterColour(_("Editor"), _("Right margin"), wxT("editor_gutter"), *wxLIGHT_GREY);
+ colours->RegisterColour(_("Editor"), _("Line numbers foreground colour"), wxT("editor_linenumbers_fg"),
+ wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT));
+ colours->RegisterColour(_("Editor"), _("Line numbers background colour"), wxT("editor_linenumbers_bg"),
+ wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE));
+
+ // These two are taken from Platform::Chrome() and Platform::ChromeHightlight()
+ colours->RegisterColour(_("Editor"), _("Margin chrome colour"), wxT("editor_margin_chrome"),
+ wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE));
+ colours->RegisterColour(_("Editor"), _("Margin chrome highlight colour"), wxT("editor_margin_chrome_highlight"),
+ wxSystemSettings::GetColour(wxSYS_COLOUR_3DHIGHLIGHT));
}
EditorManager::~EditorManager()
@eranif: Are you using a 1px wide margin for the vertical line after the line numbers in your screenshot?Yes, I am using margin of type MARGIN_FORE:
SetMarginType(SYMBOLS_MARGIN_SEP_ID, wxSTC_MARGIN_FORE);
SetMarginMask(SYMBOLS_MARGIN_SEP_ID, 0);
Please, make a color customizable version of Code::Blocks if it not difficult. Thanks.If it is not difficult and you really need it, please provide a patch.
If it is not difficult and you really need it, please provide a patch.Isn't it already done by Obf?