diff --git a/ChangeLog b/ChangeLog index be2c8be..b0d440d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 diff --git a/src/locationpanel.cpp b/src/locationpanel.cpp index 5c6a8c3..546eec1 100644 --- a/src/locationpanel.cpp +++ b/src/locationpanel.cpp @@ -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(); +} diff --git a/src/locationpanel.h b/src/locationpanel.h index 6155cb6..52b116e 100644 --- a/src/locationpanel.h +++ b/src/locationpanel.h @@ -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; diff --git a/src/xmlctrl.cpp b/src/xmlctrl.cpp index 185bcf2..02a0e74 100644 --- a/src/xmlctrl.cpp +++ b/src/xmlctrl.cpp @@ -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 ); }