From: Vadim Zeitlin Date: Sat, 1 Dec 2012 00:14:54 +0000 (+0000) Subject: Use disabled colour for the dropdown arrow of disabled ribbon. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/c4c87bf22b2c6d2e58cde34772a1e1e239dcb3c0?ds=inline Use disabled colour for the dropdown arrow of disabled ribbon. Previously the normal colour was used for the arrow in MSW art provider even if the ribbon was disabled. Closes #14864. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73086 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/ribbon/art_msw.cpp b/src/ribbon/art_msw.cpp index 65b7870d5a..3d4dcaeaa6 100644 --- a/src/ribbon/art_msw.cpp +++ b/src/ribbon/art_msw.cpp @@ -2468,6 +2468,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 +2492,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 +2520,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 +2542,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; }