Add wxWithImages::SetImages() and update wxMSW wxNotebook for it

This new function will allow selecting the bitmap of the most suitable
size and automatically react to DPI scale changes (although this hasn't
been implemented yet) in all controls using image lists.

For now, only wxNotebook in wxMSW has been updated to work with it, the
other classes and ports will be updated to override OnImagesChanged()
instead of SetImageList() later.

Also update the notebook sample to use SetImages() rather than
SetImageList() -- which means that it doesn't show the icons any longer
in non-MSW ports, which haven't been updated yet.
This commit is contained in:
Vadim Zeitlin
2021-10-31 20:54:58 +01:00
parent 55819925dc
commit b0d9465921
8 changed files with 138 additions and 28 deletions

View File

@@ -131,7 +131,7 @@ private:
wxBoxSizer *m_sizerFrame;
wxImageList *m_imageList;
wxBookCtrlBase::Images m_images;
wxDECLARE_EVENT_TABLE();
};