]> git.saurik.com Git - wxWidgets.git/commitdiff
respect background colour of wxStaticText in wxUniv
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 15 Dec 2006 01:32:26 +0000 (01:32 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 15 Dec 2006 01:32:26 +0000 (01:32 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43982 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/changes.txt
src/univ/stattext.cpp

index 14a5e37a965b9e14cd3afde53eb0140111b798ce..b83555f1010beeec28e968b5e95d06324ab8d266 100644 (file)
@@ -102,6 +102,10 @@ wxGTK:
 
 - Don't crash if command line is not valid UTF-8 (Unicode build only)
 
+wxUniv:
+
+- It is now possible to set background colour of wxStaticText
+
 
 2.8.0
 -----
index 509a5d6dde3b09c1313ab15180170507ab786aba..83ebf31eaf51cec685a486fd40f6a7f838eb51f7 100644 (file)
@@ -88,6 +88,14 @@ 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();
 }