VirtualTreeView: Fix header paint issue in gtk2.

This commit is contained in:
wp_xyz 2024-10-08 13:38:30 +02:00
parent 7e274a48e7
commit 8b9b6cd85d
3 changed files with 10 additions and 3 deletions

View File

@ -294,6 +294,12 @@ var // Clipboard format IDs used in OLE drag'n drop and clipboard transfers.
UtilityImageSize: Integer = cUtilityImageSize; UtilityImageSize: Integer = cUtilityImageSize;
{$ifdef gtk}
// Workaround LCL bug 8553
var
pf32bit: TPixelFormat = pfDevice;
{$endif}
type type
// The exception used by the trees. // The exception used by the trees.
EVirtualTreeError = class(Exception); EVirtualTreeError = class(Exception);

View File

@ -7,7 +7,7 @@ object DrawTreeForm: TDrawTreeForm
Caption = 'DrawTreeForm' Caption = 'DrawTreeForm'
ClientHeight = 453 ClientHeight = 453
ClientWidth = 710 ClientWidth = 710
LCLVersion = '3.99.0.0' LCLVersion = '4.99.0.0'
OnCreate = FormCreate OnCreate = FormCreate
object Label7: TLabel object Label7: TLabel
Left = 8 Left = 8

View File

@ -387,8 +387,9 @@ begin
Data.Properties := Data.Properties + ', 64K colors'; Data.Properties := Data.Properties + ', 64K colors';
pf24bit: pf24bit:
Data.Properties := Data.Properties + ', 16M colors'; Data.Properties := Data.Properties + ', 16M colors';
pf32bit: else
Data.Properties := Data.Properties + ', 16M+ colors'; if Picture.Bitmap.PixelFormat = pf32bit then
Data.Properties := Data.Properties + ', 16M+ colors';
end; end;
if Cardinal(Data.Image.Height) + 4 > TLazVirtualDrawTree(Sender).DefaultNodeHeight then if Cardinal(Data.Image.Height) + 4 > TLazVirtualDrawTree(Sender).DefaultNodeHeight then
Sender.NodeHeight[Node] := Data.Image.Height + 4; Sender.NodeHeight[Node] := Data.Image.Height + 4;