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
This commit is contained in:
parent
cb7ef329e7
commit
825ce0af4f
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user