]> git.saurik.com Git - wxWidgets.git/blobdiff - src/ribbon/art_msw.cpp
No changes, just don't initialize the variable twice.
[wxWidgets.git] / src / ribbon / art_msw.cpp
index 65b7870d5aa585d3f21dc5fab848044ffea34cc6..3d4dcaeaa69a1c38412a299cafa2b30049d60a3d 100644 (file)
@@ -2468,6 +2468,11 @@ void wxRibbonMSWArtProvider::DrawButtonBarButtonForeground(
                         const wxBitmap& bitmap_large,
                         const wxBitmap& bitmap_small)
 {
                         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:
     switch(state & wxRIBBON_BUTTONBAR_BUTTON_SIZE_MASK)
     {
     case wxRIBBON_BUTTONBAR_BUTTON_LARGE:
@@ -2487,7 +2492,7 @@ void wxRibbonMSWArtProvider::DrawButtonBarButtonForeground(
                 {
                     DrawDropdownArrow(dc, rect.x + rect.width / 2,
                         ypos + (label_h * 3) / 2,
                 {
                     DrawDropdownArrow(dc, rect.x + rect.width / 2,
                         ypos + (label_h * 3) / 2,
-                        m_button_bar_label_colour);
+                        arrowColour);
                 }
             }
             else
                 }
             }
             else
@@ -2515,7 +2520,7 @@ void wxRibbonMSWArtProvider::DrawButtonBarButtonForeground(
                                 DrawDropdownArrow(dc,
                                     iX + 2 +label_w - arrow_width,
                                     ypos + label_h / 2 + 1,
                                 DrawDropdownArrow(dc,
                                     iX + 2 +label_w - arrow_width,
                                     ypos + label_h / 2 + 1,
-                                    m_button_bar_label_colour);
+                                    arrowColour);
                             }
                             break;
                         }
                             }
                             break;
                         }
@@ -2537,8 +2542,7 @@ void wxRibbonMSWArtProvider::DrawButtonBarButtonForeground(
             x_cursor += label_w + 3;
             if(kind != wxRIBBON_BUTTON_NORMAL)
             {
             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;
         }
             }
             break;
         }