From: Vadim Zeitlin Date: Tue, 15 Mar 2011 11:10:42 +0000 (+0000) Subject: Use consistent sizes for all icons used in the button page of widgets sample. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/825ce0af4fcf180fe7429bb3a4f420a6249c3297 Use consistent sizes for all icons used in the button page of widgets sample. Explicitly pass wxART_BUTTON to wxArtProvider to ensure that all the icons are returned in the same size, otherwise they didn't look well and could result in an assert too, see #12909. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67200 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/samples/widgets/button.cpp b/samples/widgets/button.cpp index 99ca62a9a8..8bebe83b7f 100644 --- a/samples/widgets/button.cpp +++ b/samples/widgets/button.cpp @@ -497,17 +497,17 @@ void ButtonWidgetsPage::CreateButton() wxLEFT, wxRIGHT, wxTOP, wxBOTTOM }; - m_button->SetBitmap(wxArtProvider::GetIcon(wxART_INFORMATION), + m_button->SetBitmap(wxArtProvider::GetIcon(wxART_INFORMATION, wxART_BUTTON), positions[m_radioImagePos->GetSelection()]); if ( m_chkUsePressed->GetValue() ) - m_button->SetBitmapPressed(wxArtProvider::GetIcon(wxART_HELP)); + m_button->SetBitmapPressed(wxArtProvider::GetIcon(wxART_HELP, wxART_BUTTON)); if ( m_chkUseFocused->GetValue() ) - m_button->SetBitmapFocus(wxArtProvider::GetIcon(wxART_ERROR)); + m_button->SetBitmapFocus(wxArtProvider::GetIcon(wxART_ERROR, wxART_BUTTON)); if ( m_chkUseCurrent->GetValue() ) - m_button->SetBitmapCurrent(wxArtProvider::GetIcon(wxART_WARNING)); + m_button->SetBitmapCurrent(wxArtProvider::GetIcon(wxART_WARNING, wxART_BUTTON)); if ( m_chkUseDisabled->GetValue() ) - m_button->SetBitmapDisabled(wxArtProvider::GetIcon(wxART_MISSING_IMAGE)); + m_button->SetBitmapDisabled(wxArtProvider::GetIcon(wxART_MISSING_IMAGE, wxART_BUTTON)); } m_chkUsePressed->Enable(showsBitmap);