View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0022901||Lazarus||IDE||public||2012-09-16 19:52||2014-01-04 20:37|
|Reporter||Stephano||Assigned To||Zeljan Rikalo|
|Product Version||1.1 (SVN)|
|Summary||0022901: TSpeedButton color issue|
|Description||A TSpeedButton on a red form will have clBtnFace color which is OK.|
However, the same speedbutton on a red panel will show red despite its color=clBtnFace
The transparent property is by default true (shouldn't it be false?), but has no effect whatsoever.
Lazarus 1.1 r38698M FPC 2.6.1 i386-linux-gtk 2
|Tags||No tags attached.|
|Fixed in Revision||38762|
||Please test and close if ok.|
The main problem seems to be solved. However, there is still an artifact in the speedbutton's background when transparent is false (although there should be no difference as long as Flat is false). In the attached screenshot, the left buttons have color=clButtonFace, and the right ones color=clRed.
The bottom ones have a border that should not be there.
||TSpeedButton.Color will be unpublished. TSpeedButton is painted by themes , so no change of color will be possible. Red frame around is visible because of FillRect() inside TSpeedButton paint proc.|
Also, that border comes from TSpeedButton.Color.
-> fills rect with red color Canvas.FillRect(RectofbuttonWithColor);
-> theme draws button with button color from theme Themes.DrawMyButton()
||TSpeedButton.Color should be unpublished indeed if it can't be used.|
Yes, I'll do that. Note that same behaviour with clRed we have under qtlcl too.
Under LCL "transparent" for SpeedButton means almost nothing.
eg. we have Form.Color = clBlack and speedbutton on it (speedButton.Transparent = False).
SpeedButton fills it's own FillRect() with parent color (clBlack) and then it draws button (theme does that with color of button setted up in theme).
When SpeedButton.Transparent = True, then SpeedButton does not call FillRect() but theme completely draws button without filling rect (it's brush is bsClear on all ws).
True. According to the Delphi docs, Transparent should not have any effect while Flat is False. However, in the attached screenshot, the 2 buttons at the left are slightly different (despite that.their color property is left at its default). Therefore some fine tuning may be needed.
The additional thing I'd like to have preserved (or improved if possible) is the separation of background and foreground drawing so that colored TSpeedButton descendents can be easily implemented by overriding the respective painting methods.
|2012-09-16 19:52||Stephano||New Issue|
|2012-09-16 19:52||Stephano||Widgetset||=> GTK 2|
|2012-09-20 10:38||Zeljan Rikalo||Fixed in Revision||=> 38762|
|2012-09-20 10:38||Zeljan Rikalo||LazTarget||=> -|
|2012-09-20 10:38||Zeljan Rikalo||Status||new => resolved|
|2012-09-20 10:38||Zeljan Rikalo||Resolution||open => fixed|
|2012-09-20 10:38||Zeljan Rikalo||Assigned To||=> Zeljan Rikalo|
|2012-09-20 10:38||Zeljan Rikalo||Note Added: 0062514|
|2012-09-20 11:42||Stephano||Note Added: 0062516|
|2012-09-20 11:43||Stephano||File Added: SpeedButtonArtifact.jpg|
|2012-09-20 13:20||Stephano||Status||resolved => assigned|
|2012-09-20 13:20||Stephano||Resolution||fixed => reopened|
|2012-09-20 16:45||Zeljan Rikalo||Note Added: 0062525|
|2012-09-20 16:45||Zeljan Rikalo||Status||assigned => feedback|
|2012-09-20 16:54||Zeljan Rikalo||Note Added: 0062526|
|2012-09-20 18:15||Stephano||Note Added: 0062527|
|2012-09-21 06:00||Zeljan Rikalo||Note Added: 0062530|
|2012-09-21 09:02||Stephano||Note Added: 0062533|
|2014-01-04 20:37||Juha Manninen||Relationship added||related to 0025491|