Patch #2855 2009-12-02 22:22

tpetrov

Dark theme fixes
Download
2855-Dark_theme_fix.patch (1.7 KB)
Category
Application::Refinement
Status
Accepted
Close date
2012-11-07 10:01
Assigned to
mortenmacfly
Index: src/sdk/infowindow.cpp
===================================================================
--- src/sdk/infowindow.cpp    (revision 5945)
+++ src/sdk/infowindow.cpp    (working copy)
@@ -30,6 +30,8 @@
 
 const wxColour titleBackground(96,96,96); // dark grey
 const wxColour textBackground(255,255,160); // yellowish
+const wxColour textForeground(0, 0, 0); // black for the text color
+
 
 
 const char *iBitmap[] = {
@@ -165,6 +167,7 @@
 
         ForwardingTextControl *text = new ForwardingTextControl(this, -1, message, wxDefaultPosition, wxDefaultSize, 0);
         text->SetBackgroundColour(textBackground);
+        text->SetForegroundColour(textForeground);
         bs->Add(text, 0, wxALIGN_CENTER|wxALL, 12);
         SetBackgroundColour(textBackground);
         SetSizer(bs);
Index: src/sdk/loggers.cpp
===================================================================
--- src/sdk/loggers.cpp    (revision 5945)
+++ src/sdk/loggers.cpp    (working copy)
@@ -40,8 +40,6 @@
     if (!control)
         return;
 
-    control->SetBackgroundColour(*wxWHITE);
-
     int size = Manager::Get()->GetConfigManager(_T("message_manager"))->ReadInt(_T("/log_font_size"), platform::macosx ? 10 : 8);
 
     wxFont default_font(size, fixed ? wxFONTFAMILY_MODERN : wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);
@@ -63,10 +61,10 @@
 
     for(unsigned int i = 0; i < num_levels; ++i)
     {
+        style[i] = control->GetDefaultStyle();
+
         style[i].SetFont(default_font);
         style[i].SetAlignment(wxTEXT_ALIGNMENT_DEFAULT);
-        style[i].SetTextColour(*wxBLACK);
-        style[i].SetBackgroundColour(*wxWHITE);
 
         // is it necessary to do that?
         //style[i].SetFlags(...);
tpetrov 2009-12-02 22:33

Previous patch was working only for white/gray themes but not for black ones.

This one work for black themes, too.

No tested on windows :(