Am 09.07.2017 um 07:18 schrieb Ondrej Pokorny via Lazarus:
On 09.07.2017 0:22, Werner Pamler via Lazarus wrote:
Ondrej, you implemented scaling of the images used for the toolbar and menu of the IDE. Where can I find these methods?

IDEImagesIntf.pas

Are they available for standard imagelists for non-IDE usage?

No, the current solution is Lazarus specific. (It doesn't make sense to have IDEImagesIntf.pas in LCL.) You can use a similar approach for your applications, though.

Thanks. I have the idea of writing a "TScaledImageList" which needs up to three imagelists with different resolutions. It will calculate the required image size from its BaseWidth/BaseHeight and BasePixelsPerInch settings and the current PixelsPerInch. If the requested image size matches one of the linked image lists it will copy these images to itself. If the image size does not match it will create stretchdrawn images from those with the closest size. The ScaledImageList is the imagelist linked to form components, such as TListView or TTreeView. I did not start any coding, yet, but I think it should work and should greatly facilitate using scaled images at the application level.


--
_______________________________________________
Lazarus mailing list
[email protected]
https://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to