Fix assert in Simple Preferences: use window foreground color for CTransparentStaticLine if skin does not specify <static_line_color>

This commit is contained in:
Charlie Fenton 2012-10-25 23:06:14 -07:00 committed by Oliver Bock
parent 6f3899e14e
commit 8caede1641
3 changed files with 7 additions and 4 deletions

View File

@ -6222,11 +6222,13 @@ Charlie 25 Oct 2012
- Mac: Eliminate some unnecessary code.
- Mac: Fix Quit command in Simple View and a crash bug with Quit AppleEvent.
- Fix a bad FlexGridSizer in Simple Preferences dialog which caused assert.
- Fix assert in Simple Preferences: use window foreground color for
CTransparentStaticLine if skin does not specify <static_line_color>.
clientgui/
BOINCGUIApp.cpp
DlgEventLog.cpp
mac/
MacBitmapComboBox.cpp,.h
sg_CustomControls.cpp,.h
sg_DlgPreferences.cpp
sg_DlgPreferences.cpp

View File

@ -43,13 +43,14 @@ bool CTransparentStaticLine::Create(wxWindow* parent, wxWindowID id, const wxPoi
SetBackgroundColour(parent->GetBackgroundColour());
SetBackgroundStyle(wxBG_STYLE_COLOUR);
SetForegroundColour(parent->GetForegroundColour());
SetLineColor(GetForegroundColour());
return bRetVal;
}
void CTransparentStaticLine::OnPaint(wxPaintEvent& /*event*/) {
wxPaintDC dc(this);
wxPaintDC dc(this);
wxPen pen = wxPen(GetLineColor(), 1);
dc.SetPen(pen);
dc.DrawLine(0, 0, GetSize().GetWidth(), 0);

View File

@ -48,7 +48,7 @@ public:
);
wxColour GetLineColor() const { return m_LineColor ; }
void SetLineColor(wxColour value) { m_LineColor = value ; }
void SetLineColor(wxColour value) { if (value != wxNullColour) m_LineColor = value ; }
virtual bool HasTransparentBackground() { return true; };