Add wxArtProvider::Get[Native]DIPSizeHint()
Also add "wxWindow* win = NULL" argument to the existing functions to convert from DIPs using the given window instead of the default DPI scaling factor. Closes #22022.
This commit is contained in:
parent
506f292be2
commit
108108e54e
7 changed files with 74 additions and 30 deletions
|
|
@ -363,9 +363,9 @@ MyFrame::~MyFrame()
|
|||
|
||||
void MyFrame::InitImageList()
|
||||
{
|
||||
wxSize iconSize = wxArtProvider::GetSizeHint(wxART_LIST);
|
||||
wxSize iconSize = wxArtProvider::GetSizeHint(wxART_LIST, this);
|
||||
if ( iconSize == wxDefaultSize )
|
||||
iconSize = wxSize(16, 16);
|
||||
iconSize = FromDIP(wxSize(16, 16));
|
||||
|
||||
m_imageList = new wxImageList(iconSize.x, iconSize.y);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue