]> git.saurik.com Git - wxWidgets.git/blobdiff - src/ribbon/art_msw.cpp
No real changes, just make wxWindow::CanScroll() virtual.
[wxWidgets.git] / src / ribbon / art_msw.cpp
index 65b7870d5aa585d3f21dc5fab848044ffea34cc6..425474922f844d0624b165c5f60b69690ba46fe1 100644 (file)
@@ -4,7 +4,6 @@
 // Author:      Peter Cawley
 // Modified by:
 // Created:     2009-05-25
-// RCS-ID:      $Id$
 // Copyright:   (C) Peter Cawley
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -1457,7 +1456,7 @@ void wxRibbonMSWArtProvider::DrawPartialPageBackground(wxDC& dc,
         page->AdjustRectToIncludeScrollButtons(&background);
         background.height -= 2;
     }
-    // Page background isn't dependant upon the width of the page
+    // Page background isn't dependent upon the width of the page
     // (at least not the part of it intended to be painted by this
     // function). Set to wider than the page itself for when externally
     // expanded panels need a background - the expanded panel can be wider
@@ -2468,6 +2467,11 @@ void wxRibbonMSWArtProvider::DrawButtonBarButtonForeground(
                         const wxBitmap& bitmap_large,
                         const wxBitmap& bitmap_small)
 {
+    const wxColour
+        arrowColour(state & wxRIBBON_BUTTONBAR_BUTTON_DISABLED
+                        ? m_button_bar_label_disabled_colour
+                        : m_button_bar_label_colour);
+
     switch(state & wxRIBBON_BUTTONBAR_BUTTON_SIZE_MASK)
     {
     case wxRIBBON_BUTTONBAR_BUTTON_LARGE:
@@ -2487,7 +2491,7 @@ void wxRibbonMSWArtProvider::DrawButtonBarButtonForeground(
                 {
                     DrawDropdownArrow(dc, rect.x + rect.width / 2,
                         ypos + (label_h * 3) / 2,
-                        m_button_bar_label_colour);
+                        arrowColour);
                 }
             }
             else
@@ -2515,7 +2519,7 @@ void wxRibbonMSWArtProvider::DrawButtonBarButtonForeground(
                                 DrawDropdownArrow(dc,
                                     iX + 2 +label_w - arrow_width,
                                     ypos + label_h / 2 + 1,
-                                    m_button_bar_label_colour);
+                                    arrowColour);
                             }
                             break;
                         }
@@ -2537,8 +2541,7 @@ void wxRibbonMSWArtProvider::DrawButtonBarButtonForeground(
             x_cursor += label_w + 3;
             if(kind != wxRIBBON_BUTTON_NORMAL)
             {
-                DrawDropdownArrow(dc, x_cursor, rect.y + rect.height / 2,
-                    m_button_bar_label_colour);
+                DrawDropdownArrow(dc, x_cursor, rect.y + rect.height / 2, arrowColour);
             }
             break;
         }