Commit Graph

8 Commits

Author SHA1 Message Date
Zoë Peterson
14fdb7e6f9 Removed DimPercent/DimColor calculation. The existing grayscale calculation doesn't change the icon if it's already grayscale, and that was a remnant from an earlier patch that simulated the alpha that ddesDarken does. 2024-06-12 22:54:32 +00:00
Zoë Peterson
b8bb9527ef Switched documentation from an inline comment in graphtype.pp to the fpdoc graphtype.xml 2024-06-12 22:54:32 +00:00
Zoë Peterson
1ec73247e5 Added a new global variable, DisabledDrawEffectStyle, that controls how TRawImage.PerformEffect(gdeDisabled) works to improve the appearance on colored backgrounds and in dark mode apps.
There are three possible values:
- ddesGrayscale
    This is the default and matches the existing behavior of just converting the pixels to gray.
- ddesDarken
    Convert the image to fully black pixels with alpha transparency.  This roughly matches ddesGrayscale on traditional gray backgrounds but lets colored backgrounds through.
- ddesLighten
    Convert the image to fully white pixels with alpha transparency.  This is the dark mode equivalent of ddesDarken.

Existing alpha transparency is factored into the conversion.  The constants used for the visibility calculation roughly match what other macOS apps use.
2024-06-12 22:54:32 +00:00
mattias
c423a794b5 lazutils: added TPointArray to graphtype, added EllipsePolygon to GraphMath 2023-07-10 23:19:21 +02:00
Sven Barth
53fe133e43 * for FPC 3.2.3 and newer alias GraphType.TGraphicsColor to System.UITypes.TColor, Graphics.PColor to System.UITypes.PColor and LCLType.COLORREF to System.UITypes.TColorRef to avoid type conflicts when both System.UITypes and the LCL units are used
Merge request freepascal.org/lazarus/lazarus!46 with minor change (enabled aliasing for FPC 3.2.3 too).
2021-11-16 00:27:36 +03:00
juha
9219ea531d Move unit GraphMath from LCL to LazUtils. It has no dependencies to GUI.
git-svn-id: trunk@64303 -
2020-12-29 22:56:40 +00:00
mattias
1f64e2b29d lazutils: deprecated ConvertLineEndings in favor of LineBreaksToSystemLineBreaks
git-svn-id: trunk@59144 -
2018-09-23 10:33:52 +00:00
juha
962ded835b Remove LCL dependency from unit GraphType and move it to LazUtils package.
git-svn-id: trunk@58241 -
2018-06-13 08:33:10 +00:00