mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 11:58:12 +02:00
VirtualTreeView: Fix header paint issue in gtk2.
(cherry picked from commit 8b9b6cd85d
)
This commit is contained in:
parent
9f04270439
commit
ee864d978f
components/virtualtreeview
examples/virtualtreeview/vst_advanced
@ -294,6 +294,12 @@ var // Clipboard format IDs used in OLE drag'n drop and clipboard transfers.
|
||||
|
||||
UtilityImageSize: Integer = cUtilityImageSize;
|
||||
|
||||
{$ifdef gtk}
|
||||
// Workaround LCL bug 8553
|
||||
var
|
||||
pf32bit: TPixelFormat = pfDevice;
|
||||
{$endif}
|
||||
|
||||
type
|
||||
// The exception used by the trees.
|
||||
EVirtualTreeError = class(Exception);
|
||||
|
@ -7,8 +7,8 @@ object DrawTreeForm: TDrawTreeForm
|
||||
Caption = 'DrawTreeForm'
|
||||
ClientHeight = 453
|
||||
ClientWidth = 710
|
||||
LCLVersion = '4.99.0.0'
|
||||
OnCreate = FormCreate
|
||||
LCLVersion = '2.1.0.0'
|
||||
object Label7: TLabel
|
||||
Left = 8
|
||||
Height = 30
|
||||
@ -53,6 +53,7 @@ object DrawTreeForm: TDrawTreeForm
|
||||
AnchorSideBottom.Control = TrackBar1
|
||||
Left = 8
|
||||
Height = 361
|
||||
Hint = '(dummy)'
|
||||
Top = 46
|
||||
Width = 694
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
@ -111,6 +112,8 @@ object DrawTreeForm: TDrawTreeForm
|
||||
OnDrawHint = VDT1DrawHint
|
||||
OnDrawNode = VDT1DrawNode
|
||||
OnFreeNode = VDT1FreeNode
|
||||
OnGetHint = VDT1GetHint
|
||||
OnGetHintKind = VDT1GetHintKind
|
||||
OnGetHintSize = VDT1GetHintSize
|
||||
OnGetImageIndex = VDT1GetImageIndex
|
||||
OnGetNodeWidth = VDT1GetNodeWidth
|
||||
@ -129,9 +132,9 @@ object DrawTreeForm: TDrawTreeForm
|
||||
Top = 415
|
||||
Width = 197
|
||||
Max = 100
|
||||
OnChange = TrackBar1Change
|
||||
Position = 50
|
||||
TickStyle = tsNone
|
||||
OnChange = TrackBar1Change
|
||||
Anchors = [akLeft, akBottom]
|
||||
BorderSpacing.Left = 7
|
||||
TabOrder = 1
|
||||
|
@ -379,8 +379,9 @@ begin
|
||||
Data.Properties := Data.Properties + ', 64K colors';
|
||||
pf24bit:
|
||||
Data.Properties := Data.Properties + ', 16M colors';
|
||||
pf32bit:
|
||||
Data.Properties := Data.Properties + ', 16M+ colors';
|
||||
else
|
||||
if Picture.Bitmap.PixelFormat = pf32bit then
|
||||
Data.Properties := Data.Properties + ', 16M+ colors';
|
||||
end;
|
||||
if Cardinal(Data.Image.Height) + 4 > TLazVirtualDrawTree(Sender).DefaultNodeHeight then
|
||||
Sender.NodeHeight[Node] := Data.Image.Height + 4;
|
||||
|
Loading…
Reference in New Issue
Block a user