Add a setting for the disabled text colour to wxRibbon art.

Allow specifying the text for the labels of the disabled items separately.

Closes #14721.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72619 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2012-10-04 23:23:41 +00:00
parent 893d540e53
commit 94f39d8181
5 changed files with 25 additions and 3 deletions

View File

@@ -405,6 +405,11 @@ MyFrame::MyFrame()
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);
{