Bug #57 black on black = hard to use

This commit is contained in:
Zane U. Ji 2014-05-21 21:35:24 +08:00
parent 2adc7a133a
commit b177e06392
4 changed files with 28 additions and 7 deletions

View File

@ -3,6 +3,7 @@
+ Feature #155 XPath - functions
+ Click on the error message to jump to the error location
* Bug #99 fix desktop file (Marco Rodrigues)
* Bug #57 black on black = hard to use
1.2.1.1 2014/05/04
+ Feature #25 Fast commenting

View File

@ -21,6 +21,7 @@
#include "xmldoc.h"
BEGIN_EVENT_TABLE ( LocationPanel, wxPanel )
EVT_SYS_COLOUR_CHANGED ( LocationPanel::OnSysColourChanged )
END_EVENT_TABLE()
LocationPanel::LocationPanel ( wxWindow *parentWindowParameter, int id ) :
@ -59,6 +60,10 @@ LocationPanel::LocationPanel ( wxWindow *parentWindowParameter, int id ) :
//structureEdit->SetWrapVisualFlags ( wxSTC_WRAPVISUALFLAG_START );
structureEdit->SetTabWidth ( 2 );
structureEdit->SetIndentationGuides ( true );
structureEdit->SetLexer ( wxSTC_LEX_NULL );
wxSysColourChangedEvent event;
OnSysColourChanged ( event );
sizer->Add ( edit, 0, wxGROW | wxTOP, 0 );
sizer->Add ( structureEdit, 1, wxGROW | wxTOP, 0 );
@ -169,3 +174,12 @@ void LocationPanel::indentStructure ( wxString& structure )
}
structure = indented;
}
void LocationPanel::OnSysColourChanged ( wxSysColourChangedEvent &WXUNUSED ( event ) )
{
wxColor clrWnd = wxSystemSettings::GetColour ( wxSYS_COLOUR_WINDOW );
wxColor clrText = wxSystemSettings::GetColour ( wxSYS_COLOUR_WINDOWTEXT );
structureEdit->StyleSetForeground ( wxSTC_STYLE_DEFAULT, clrText );
structureEdit->StyleSetBackground ( wxSTC_STYLE_DEFAULT, clrWnd );
structureEdit->StyleClearAll();
}

View File

@ -33,6 +33,7 @@ class LocationPanel : public wxPanel
void update (
XmlDoc *docParameter = NULL,
const wxString& parent = wxEmptyString );
void OnSysColourChanged ( wxSysColourChangedEvent &event );
private:
void indentStructure ( wxString& structure );
MyFrame *parentWindow;

View File

@ -1209,13 +1209,15 @@ void XmlCtrl::applyProperties (
SetMarginWidth ( 2, 16 );
// define folding markers
MarkerDefine ( wxSTC_MARKNUM_FOLDEREND, wxSTC_MARK_BOXPLUSCONNECTED, *wxWHITE, *wxBLACK );
MarkerDefine ( wxSTC_MARKNUM_FOLDEROPENMID, wxSTC_MARK_BOXMINUSCONNECTED, *wxWHITE, *wxBLACK );
MarkerDefine ( wxSTC_MARKNUM_FOLDERMIDTAIL, wxSTC_MARK_TCORNER, *wxWHITE, *wxBLACK );
MarkerDefine ( wxSTC_MARKNUM_FOLDERTAIL, wxSTC_MARK_LCORNER, *wxWHITE, *wxBLACK );
MarkerDefine ( wxSTC_MARKNUM_FOLDERSUB, wxSTC_MARK_VLINE, *wxWHITE, *wxBLACK );
MarkerDefine ( wxSTC_MARKNUM_FOLDER, wxSTC_MARK_BOXPLUS, *wxWHITE, *wxBLACK );
MarkerDefine ( wxSTC_MARKNUM_FOLDEROPEN, wxSTC_MARK_BOXMINUS, *wxWHITE, *wxBLACK );
wxColor clrWnd = wxSystemSettings::GetColour ( wxSYS_COLOUR_WINDOW );
wxColor clrText = wxSystemSettings::GetColour ( wxSYS_COLOUR_WINDOWTEXT );
MarkerDefine ( wxSTC_MARKNUM_FOLDEREND, wxSTC_MARK_BOXPLUSCONNECTED, clrWnd, clrText );
MarkerDefine ( wxSTC_MARKNUM_FOLDEROPENMID, wxSTC_MARK_BOXMINUSCONNECTED, clrWnd, clrText );
MarkerDefine ( wxSTC_MARKNUM_FOLDERMIDTAIL, wxSTC_MARK_TCORNER, clrWnd, clrText );
MarkerDefine ( wxSTC_MARKNUM_FOLDERTAIL, wxSTC_MARK_LCORNER, clrWnd, clrText );
MarkerDefine ( wxSTC_MARKNUM_FOLDERSUB, wxSTC_MARK_VLINE, clrWnd, clrText );
MarkerDefine ( wxSTC_MARKNUM_FOLDER, wxSTC_MARK_BOXPLUS, clrWnd, clrText );
MarkerDefine ( wxSTC_MARKNUM_FOLDEROPEN, wxSTC_MARK_BOXMINUS, clrWnd, clrText );
}
else
{
@ -1741,6 +1743,9 @@ void XmlCtrl::setColorScheme ( int scheme )
StyleSetBold ( wxSTC_H_SGML_DEFAULT, true );
}
wxColour color = wxSystemSettings::GetColour ( wxSYS_COLOUR_WINDOWTEXT );
StyleSetForeground ( wxSTC_STYLE_LINENUMBER, color );
applyVisibilityState ( visibilityState );
}