]> git.saurik.com Git - wxWidgets.git/commitdiff
Override DrawLabel() to avoid crossing out disabled labels in mono theme.
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 22 Sep 2009 00:23:09 +0000 (00:23 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 22 Sep 2009 00:23:09 +0000 (00:23 +0000)
DrawButtonLabel() crosses out the buttons to indicate that they are disabled
(for lack of any other options in mono renderer) but this looks really bad for
the labels, so don't do it.

Closes #11220.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62005 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/univ/themes/mono.cpp

index a534269f86da219d974de1db5c4e73f5ece0a719..13c5107e96597f69edae119a24235250c004b673 100644 (file)
@@ -54,6 +54,13 @@ class wxMonoRenderer : public wxStdRenderer
 public:
     wxMonoRenderer(const wxColourScheme *scheme);
 
+    virtual void DrawLabel(wxDC& dc,
+                           const wxString& label,
+                           const wxRect& rect,
+                           int flags = 0,
+                           int alignment = wxALIGN_LEFT | wxALIGN_TOP,
+                           int indexAccel = -1,
+                           wxRect *rectBounds = NULL);
     virtual void DrawButtonLabel(wxDC& dc,
                                  const wxString& label,
                                  const wxBitmap& image,
@@ -720,6 +727,17 @@ void wxMonoRenderer::DrawFocusRect(wxWindow* WXUNUSED(win), wxDC& dc, const wxRe
 // label
 // ----------------------------------------------------------------------------
 
+void wxMonoRenderer::DrawLabel(wxDC& dc,
+                               const wxString& label,
+                               const wxRect& rect,
+                               int WXUNUSED(flags),
+                               int alignment,
+                               int indexAccel,
+                               wxRect *rectBounds)
+{
+    dc.DrawLabel(label, wxNullBitmap, rect, alignment, indexAccel, rectBounds);
+}
+
 void wxMonoRenderer::DrawButtonLabel(wxDC& dc,
                                      const wxString& label,
                                      const wxBitmap& image,