wxRIBBON_ART_TOOL_ACTIVE_BACKGROUND_TOP_COLOUR,
wxRIBBON_ART_TOOL_ACTIVE_BACKGROUND_TOP_GRADIENT_COLOUR,
wxRIBBON_ART_TOOL_ACTIVE_BACKGROUND_COLOUR,
- wxRIBBON_ART_TOOL_ACTIVE_BACKGROUND_GRADIENT_COLOUR
+ wxRIBBON_ART_TOOL_ACTIVE_BACKGROUND_GRADIENT_COLOUR,
+ wxRIBBON_ART_BUTTON_BAR_LABEL_DISABLED_COLOUR
};
enum wxRibbonScrollButtonStyle
wxColour m_tertiary_scheme_colour;
wxColour m_button_bar_label_colour;
+ wxColour m_button_bar_label_disabled_colour;
wxColour m_tab_label_colour;
wxColour m_tab_separator_colour;
wxColour m_tab_separator_gradient_colour;
wxRIBBON_ART_BUTTON_BAR_LABEL_FONT,
wxRIBBON_ART_TAB_LABEL_FONT,
wxRIBBON_ART_BUTTON_BAR_LABEL_COLOUR,
+ /// @since 2.9.5
+ wxRIBBON_ART_BUTTON_BAR_LABEL_DISABLED_COLOUR,
wxRIBBON_ART_BUTTON_BAR_HOVER_BORDER_COLOUR,
wxRIBBON_ART_BUTTON_BAR_HOVER_BACKGROUND_TOP_COLOUR,
wxRIBBON_ART_BUTTON_BAR_HOVER_BACKGROUND_TOP_GRADIENT_COLOUR,
bar->AddButton(ID_CHANGE_TEXT1, wxT("One"), ribbon_xpm);
bar->AddButton(ID_CHANGE_TEXT2, wxT("Two"), ribbon_xpm);
bar->AddButton(ID_UI_CHANGE_TEXT_UPDATED, wxT("Zero"), ribbon_xpm);
+
+ //Also set the general disabled text colour:
+ wxRibbonArtProvider* artProvider = m_ribbon->GetArtProvider();
+ wxColour tColour = artProvider->GetColor(wxRIBBON_ART_BUTTON_BAR_LABEL_COLOUR);
+ artProvider->SetColor(wxRIBBON_ART_BUTTON_BAR_LABEL_DISABLED_COLOUR, tColour.MakeDisabled());
}
new wxRibbonPage(m_ribbon, wxID_ANY, wxT("Empty Page"), empty_xpm);
{
m_button_bar_hover_background_brush = LikeSecondary(1.7);
m_button_bar_active_background_brush = LikeSecondary(1.4);
m_button_bar_label_colour = m_tab_label_colour;
+ m_button_bar_label_disabled_colour = m_tab_label_colour;
m_gallery_border_pen = m_tab_border_pen;
m_gallery_item_border_pen = m_button_bar_hover_border_pen;
m_gallery_hover_background_brush = LikePrimary(1.2);
}
dc.SetFont(m_button_bar_label_font);
- dc.SetTextForeground(m_button_bar_label_colour);
+ dc.SetTextForeground(state & wxRIBBON_BUTTONBAR_BUTTON_DISABLED
+ ? m_button_bar_label_disabled_colour
+ : m_button_bar_label_colour);
DrawButtonBarButtonForeground(dc, rect, kind, state, label, bitmap_large,
bitmap_small);
}
m_gallery_button_active_background_top_brush = LikeSecondary(-9.0, 0.15, -0.08);
m_button_bar_label_colour = m_tab_label_colour;
+ m_button_bar_label_disabled_colour = m_tab_label_colour;
+
m_button_bar_hover_border_pen = LikeSecondary(-6.2, -0.47, -0.14);
m_button_bar_hover_background_gradient_colour = LikeSecondary(-0.6, 0.16, 0.04);
m_button_bar_hover_background_colour = LikeSecondary(-0.2, 0.16, -0.10);
copy->m_page_toggle_hover_face_colour = m_page_toggle_hover_face_colour;
copy->m_button_bar_label_colour = m_button_bar_label_colour;
+ copy->m_button_bar_label_disabled_colour = m_button_bar_label_disabled_colour;
copy->m_tab_label_colour = m_tab_label_colour;
copy->m_tab_separator_colour = m_tab_separator_colour;
copy->m_tab_separator_gradient_colour = m_tab_separator_gradient_colour;
{
case wxRIBBON_ART_BUTTON_BAR_LABEL_COLOUR:
return m_button_bar_label_colour;
+ case wxRIBBON_ART_BUTTON_BAR_LABEL_DISABLED_COLOUR:
+ return m_button_bar_label_disabled_colour;
case wxRIBBON_ART_BUTTON_BAR_HOVER_BORDER_COLOUR:
return m_button_bar_hover_border_pen.GetColour();
case wxRIBBON_ART_BUTTON_BAR_HOVER_BACKGROUND_TOP_COLOUR:
case wxRIBBON_ART_BUTTON_BAR_LABEL_COLOUR:
m_button_bar_label_colour = colour;
break;
+ case wxRIBBON_ART_BUTTON_BAR_LABEL_DISABLED_COLOUR:
+ m_button_bar_label_disabled_colour = colour;
+ break;
case wxRIBBON_ART_BUTTON_BAR_HOVER_BORDER_COLOUR:
m_button_bar_hover_border_pen.SetColour(colour);
break;
}
dc.SetFont(m_button_bar_label_font);
- dc.SetTextForeground(m_button_bar_label_colour);
+ dc.SetTextForeground(state & wxRIBBON_BUTTONBAR_BUTTON_DISABLED
+ ? m_button_bar_label_disabled_colour
+ : m_button_bar_label_colour);
DrawButtonBarButtonForeground(dc, rect, kind, state, label, bitmap_large,
bitmap_small);
}