even controls with transparent background should draw it if they have an explicitly set background colour, so handle this at wxWindowUniv level instead of adding hacks to individual controls, such as wxStaticText, to deal with this (replaces patch 1700004)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45446 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
b5a3a81b9c
commit
3b6c95eb5f
@ -160,6 +160,7 @@ wxGTK:
|
||||
wxUniv:
|
||||
|
||||
- Fix wxTextCtrl::SetSelection(-1, -1) to behave as documented (Anders Larsen)
|
||||
- Fix setting background colour for controls with transparent background
|
||||
|
||||
|
||||
2.8.3
|
||||
|
@ -83,14 +83,6 @@ wxSize wxStaticText::DoGetBestClientSize() const
|
||||
|
||||
void wxStaticText::DoDraw(wxControlRenderer *renderer)
|
||||
{
|
||||
if ( UseBgCol() )
|
||||
{
|
||||
wxDC& dc = renderer->GetDC();
|
||||
dc.SetBrush(GetBackgroundColour());
|
||||
dc.SetPen(*wxTRANSPARENT_PEN);
|
||||
dc.DrawRectangle(renderer->GetRect());
|
||||
}
|
||||
|
||||
renderer->DrawLabel();
|
||||
}
|
||||
|
||||
|
@ -359,7 +359,7 @@ bool wxWindow::DoDrawBackground(wxDC& dc)
|
||||
rect.height = size.y;
|
||||
|
||||
wxWindow * const parent = GetParent();
|
||||
if ( HasTransparentBackground() && parent )
|
||||
if ( HasTransparentBackground() && !UseBgCol() && parent )
|
||||
{
|
||||
wxASSERT( !IsTopLevel() );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user