Lazarus
Programming => LCL => Topic started by: Saylo_49 on May 21, 2019, 07:50:27 pm
-
Hello
I saw that the Speedbutton on the Laz 2.0.2 does not have Restrictions on the object inspector properties
is that mean that when I will turn it "flat=true" the button aspect will be erased and show the background form color on all platforms ?
-
is that mean that when I will turn it "flat=true" the button aspect will be erased and show the background form color on all platforms ?
That's not the meaning of "Flat": it's meant to select whether the button shows with a 3-D look or a flat rectangle. But yes, since TSpeedButton is a descendant of TGraphicControl,.in theory it should apply to all widgetsets.
ETA: Note that it shows in the background color when its Transparent property is set to True, not because Flat is set to true.
-
Oh
That's strange because on Windows 10 when I set Flat to True the button aspect disappear
Is this happening on all platforms or just in windows
(The S on the picture below are speedbuttons)
-
For some reason, speed buttons are created with Transparent = True. It just happens that this is ignored when Flat is false, probably to be able to build the 3D frame more easily.
Here (attached image) is the difference between styles: Flat = True/False and, when Flat = True, Transparent = True/False
Note that speed buttons are mostly intended to show an icon/glyph, so making them transparent by default means that, when flat, the icon shows over the background by itself until you hover the pointer over it. That's probably another consideration for them to be created as transparent.
-
So
The transparent flat Speedbutton is shown like that on every platform
-
So
The transparent flat Speedbutton is shown like that on every platform
Well, I've not tested on every platform (only GTK and Win32) but yes, it should.
-
Thank you very much, you saved my project ;) ;) ;)
-
Glad to be of help :)
-
So
The transparent flat Speedbutton is shown like that on every platform
Unfortunately, there is a problem with this in MacOS Cocoa. and it is reported here in the bug tracker (https://bugs.freepascal.org/view.php?id=35555).