From 8caede16416375d030892281b7b954db763a7de6 Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Thu, 25 Oct 2012 23:06:14 -0700 Subject: [PATCH] Fix assert in Simple Preferences: use window foreground color for CTransparentStaticLine if skin does not specify --- checkin_notes | 6 ++++-- clientgui/sg_CustomControls.cpp | 3 ++- clientgui/sg_CustomControls.h | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/checkin_notes b/checkin_notes index f32c102ec9..3dad5ca480 100644 --- a/checkin_notes +++ b/checkin_notes @@ -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 . + clientgui/ BOINCGUIApp.cpp DlgEventLog.cpp mac/ MacBitmapComboBox.cpp,.h sg_CustomControls.cpp,.h - sg_DlgPreferences.cpp \ No newline at end of file + sg_DlgPreferences.cpp diff --git a/clientgui/sg_CustomControls.cpp b/clientgui/sg_CustomControls.cpp index 9074efa36d..b62ca5ed8f 100644 --- a/clientgui/sg_CustomControls.cpp +++ b/clientgui/sg_CustomControls.cpp @@ -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); diff --git a/clientgui/sg_CustomControls.h b/clientgui/sg_CustomControls.h index c1da829983..9e8a167e27 100644 --- a/clientgui/sg_CustomControls.h +++ b/clientgui/sg_CustomControls.h @@ -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; };