Hi, For the first point I think it is a good idea.
However the second point seems to be already taken care of. As far as i know, the current API for obtaining such icons is QStyle::standardIcon(), looking at its implementation in QCommonStyle, it calls QPlatformTheme::standardPixmap() for multiple hardcoded sizes (16x16 and 32x32 at this moment). So the returned QIcon already provides various resolutions. It might be improved by calling QPlatformTheme::standardPixmap() for sizes matching SHGSI_LARGEICON, SHGSI_SMALLICON, SHGSI_SHELLICONSIZE. Regards, Benjamin 2015-11-14 14:03 GMT+01:00 Frank Richter <frank.rich...@gmail.com>: > Hello everybody, > I made some (non-trivial) changes to the Windows stock icon implementation. > The goals were > 1. Use public/"modern" APIs as much as possible to obtain the icons. > 2. Make the various different resolutions stock icons are provided in > available to Qt. > > For the first goal I changed to code to use SHGetStockIconInfo as much as > possible and shell item icons for some other icons; hardcoded resource IDs > and the legacy IDI_ icons are only used as a last resort. (It's worth > mentioning that the IDI_ icons will only return "Windows 7" style icons; for > the new Windows 8 icons you need to use SHGetStockIconInfo. > > For the second goal I added an icon engine that looks at some raw icon > resource data to load all available sizes. To expose all those sizes I added > a platform theme method to return an icon engine for a stock icon. > > Of course I'd very much like to see this make it; however, I think that > before starting to submit individual patches for review maybe a bit of > "approach review" might be a good idea. > * Are these changes desireable? > * What do you think of returning icon engines from the platform theme? > * And what about the more bare-metal icon loading? > > For the time being I uploaded the changes (in order of evolving > implementation) to github: > https://github.com/res2k/qtbase/commits/dev > > Looking forward to your feedback, > - Frank > > > _______________________________________________ > Development mailing list > Development@qt-project.org > http://lists.qt-project.org/mailman/listinfo/development > _______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development