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
This commit is contained in:
Vadim Zeitlin 2012-12-01 00:14:54 +00:00
parent 04783062e2
commit c4c87bf22b

View File

@ -2468,6 +2468,11 @@ void wxRibbonMSWArtProvider::DrawButtonBarButtonForeground(
const wxBitmap& bitmap_large, const wxBitmap& bitmap_large,
const wxBitmap& bitmap_small) 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) switch(state & wxRIBBON_BUTTONBAR_BUTTON_SIZE_MASK)
{ {
case wxRIBBON_BUTTONBAR_BUTTON_LARGE: case wxRIBBON_BUTTONBAR_BUTTON_LARGE:
@ -2487,7 +2492,7 @@ void wxRibbonMSWArtProvider::DrawButtonBarButtonForeground(
{ {
DrawDropdownArrow(dc, rect.x + rect.width / 2, DrawDropdownArrow(dc, rect.x + rect.width / 2,
ypos + (label_h * 3) / 2, ypos + (label_h * 3) / 2,
m_button_bar_label_colour); arrowColour);
} }
} }
else else
@ -2515,7 +2520,7 @@ void wxRibbonMSWArtProvider::DrawButtonBarButtonForeground(
DrawDropdownArrow(dc, DrawDropdownArrow(dc,
iX + 2 +label_w - arrow_width, iX + 2 +label_w - arrow_width,
ypos + label_h / 2 + 1, 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; x_cursor += label_w + 3;
if(kind != wxRIBBON_BUTTON_NORMAL) if(kind != wxRIBBON_BUTTON_NORMAL)
{ {
DrawDropdownArrow(dc, x_cursor, rect.y + rect.height / 2, DrawDropdownArrow(dc, x_cursor, rect.y + rect.height / 2, arrowColour);
m_button_bar_label_colour);
} }
break; break;
} }