mirror of https://github.com/BOINC/boinc.git
Fix transparent static text for wxWidgets 2.9.4
This commit is contained in:
parent
15008dedce
commit
4ac21f182d
|
@ -6210,3 +6210,9 @@ Charlie 24 Oct 2012
|
|||
boinc.xcodeproj/
|
||||
project.pbxproj
|
||||
buildWxMac.sh
|
||||
|
||||
Charlie 24 Oct 2012
|
||||
- Fix transparent static text for wxWidgets 2.9.4.
|
||||
|
||||
clientgui\
|
||||
sg_CustomControls.cpp,.h
|
||||
|
|
|
@ -59,9 +59,7 @@ void CTransparentStaticLine::OnPaint(wxPaintEvent& /*event*/) {
|
|||
IMPLEMENT_DYNAMIC_CLASS (CTransparentStaticText, wxStaticText)
|
||||
|
||||
BEGIN_EVENT_TABLE(CTransparentStaticText, wxStaticText)
|
||||
#ifdef __WXMAC__
|
||||
EVT_ERASE_BACKGROUND(CTransparentStaticText::OnEraseBackground)
|
||||
#endif
|
||||
EVT_PAINT(CTransparentStaticText::OnPaint)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
|
@ -78,21 +76,13 @@ bool CTransparentStaticText::Create(wxWindow* parent, wxWindowID id, const wxStr
|
|||
bool bRetVal = wxStaticText::Create(parent, id, label, pos, size, style|wxTRANSPARENT_WINDOW, name);
|
||||
|
||||
SetBackgroundColour(parent->GetBackgroundColour());
|
||||
SetBackgroundStyle(wxBG_STYLE_COLOUR);
|
||||
// SetBackgroundStyle(wxBG_STYLE_COLOUR);
|
||||
SetForegroundColour(parent->GetForegroundColour());
|
||||
|
||||
return bRetVal;
|
||||
}
|
||||
|
||||
|
||||
#ifndef __WXMAC__
|
||||
void CTransparentStaticText::SetLabel(const wxString& label) {
|
||||
wxStaticText::SetLabel(label);
|
||||
GetParent()->RefreshRect(GetRect());
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
void CTransparentStaticText::OnPaint(wxPaintEvent& /*event*/) {
|
||||
wxPaintDC dc(this);
|
||||
dc.SetFont(GetFont());
|
||||
|
|
|
@ -89,11 +89,7 @@ public:
|
|||
|
||||
virtual bool HasTransparentBackground() { return true; };
|
||||
|
||||
#ifdef __WXMAC__
|
||||
virtual void OnEraseBackground(wxEraseEvent& /*event*/) {};
|
||||
#else
|
||||
virtual void SetLabel(const wxString& label);
|
||||
#endif
|
||||
virtual void OnPaint(wxPaintEvent& event);
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
|
Loading…
Reference in New Issue