mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-05 09:18:02 +02:00
virtualtreeview: Fix "OffsetRect deprecated" message. Less hints and warnings. Fix compilation of "Advanced" demo.
This commit is contained in:
parent
11dcf15205
commit
ca2b76eaf5
@ -4160,8 +4160,7 @@ uses
|
||||
TypInfo, // for migration stuff
|
||||
ActnList,
|
||||
StdActns, // for standard action support
|
||||
GraphType,
|
||||
LCLProc
|
||||
GraphType
|
||||
{$ifdef EnableAccessible}
|
||||
,laz.VTAccessibilityFactory
|
||||
{$endif}; // accessibility helper class
|
||||
@ -5009,7 +5008,7 @@ var
|
||||
I, W: Integer;
|
||||
Buffer,
|
||||
Line: String;
|
||||
Words: array of String;
|
||||
Words: array of String = nil;
|
||||
R: TRect;
|
||||
|
||||
begin
|
||||
@ -7916,7 +7915,7 @@ procedure TVirtualTreeColumn.LoadFromStream(const Stream: TStream; Version: Inte
|
||||
|
||||
var
|
||||
Dummy: Integer;
|
||||
S: String;
|
||||
S: String = '';
|
||||
|
||||
begin
|
||||
with Stream do
|
||||
@ -9154,6 +9153,7 @@ var
|
||||
I, Counter: Integer;
|
||||
|
||||
begin
|
||||
Result := nil;
|
||||
SetLength(Result, Count);
|
||||
Counter := 0;
|
||||
|
||||
@ -11705,7 +11705,7 @@ procedure TVTHeader.LoadFromStream(const Stream: TStream);
|
||||
var
|
||||
Dummy,
|
||||
Version: Integer;
|
||||
S: AnsiString;
|
||||
S: AnsiString = '';
|
||||
OldOptions: TVTHeaderOptions;
|
||||
|
||||
begin
|
||||
@ -11808,8 +11808,8 @@ var
|
||||
Rest,
|
||||
MaxDelta,
|
||||
Difference: Integer;
|
||||
Constraints,
|
||||
Widths: array of Integer;
|
||||
Constraints: array of Integer = nil;
|
||||
Widths: array of Integer = nil;
|
||||
BonusPixel: Boolean;
|
||||
|
||||
//--------------- local functions -------------------------------------------
|
||||
@ -24761,7 +24761,7 @@ var
|
||||
var
|
||||
Theme: HTHEME;
|
||||
begin
|
||||
Theme := OpenThemeData(Application.Handle, 'Explorer::ItemsView');
|
||||
Theme := OpenThemeData(Application.{%H-}Handle, 'Explorer::ItemsView');
|
||||
if not (toFullRowSelect in FOptions.FSelectionOptions) or (toGridExtensions in FOptions.FMiscOptions) then
|
||||
DrawThemeBackground(Theme, PaintInfo.Canvas.Handle, LVP_LISTDETAIL, State, InnerRect, nil)
|
||||
else
|
||||
@ -24777,7 +24777,7 @@ begin
|
||||
{$ifdef Windows}
|
||||
if tsUseExplorerTheme in FStates then
|
||||
begin
|
||||
Theme := OpenThemeData(Application.Handle, 'Explorer::TreeView');
|
||||
Theme := OpenThemeData(Application.{%H-}Handle, 'Explorer::TreeView');
|
||||
RowRect := Rect(0, PaintInfo.CellRect.Top, FRangeX, PaintInfo.CellRect.Bottom);
|
||||
if (Header.Columns.Count = 0) and (toFullRowSelect in TreeOptions.SelectionOptions) then
|
||||
RowRect.Right := Max(ClientWidth, RowRect.Right);
|
||||
@ -29835,6 +29835,7 @@ var
|
||||
Counter: Cardinal;
|
||||
|
||||
begin
|
||||
Result := nil;
|
||||
SetLength(Result, FSelectionCount);
|
||||
if FSelectionCount > 0 then
|
||||
begin
|
||||
@ -34528,7 +34529,7 @@ var
|
||||
Alignment: TAlignment;
|
||||
PaintInfo: TVTPaintInfo;
|
||||
Dummy: TColumnIndex;
|
||||
LineImage: TLineImage;
|
||||
LineImage: TLineImage = nil;
|
||||
begin
|
||||
if Length(S) = 0 then
|
||||
S := Text[Node, Column];
|
||||
|
@ -382,7 +382,7 @@ begin
|
||||
pf32bit:
|
||||
Data.Properties := Data.Properties + ', 16M+ colors';
|
||||
end;
|
||||
if Cardinal(Data.Image.Height) + 4 > TVirtualDrawTree(Sender).DefaultNodeHeight then
|
||||
if Cardinal(Data.Image.Height) + 4 > TLazVirtualDrawTree(Sender).DefaultNodeHeight then
|
||||
Sender.NodeHeight[Node] := Data.Image.Height + 4;
|
||||
except
|
||||
Data.Image.Free;
|
||||
@ -430,7 +430,7 @@ var
|
||||
R: TRect;
|
||||
|
||||
begin
|
||||
with Sender as TVirtualDrawTree, PaintInfo do
|
||||
with Sender as TLazVirtualDrawTree, PaintInfo do
|
||||
begin
|
||||
Data := Sender.GetNodeData(Node);
|
||||
if (Column = FocusedColumn) and (Node = FocusedNode) then
|
||||
@ -494,7 +494,7 @@ var
|
||||
AMargin: Integer;
|
||||
|
||||
begin
|
||||
with Sender as TVirtualDrawTree do
|
||||
with Sender as TLazVirtualDrawTree do
|
||||
AMargin := TextMargin;
|
||||
|
||||
begin
|
||||
@ -563,7 +563,7 @@ begin
|
||||
|
||||
// finally sort node
|
||||
if ChildCount > 0 then
|
||||
Sender.Sort(Node, 0, TVirtualStringTree(Sender).Header.SortDirection, False);
|
||||
Sender.Sort(Node, 0, TLazVirtualStringTree(Sender).Header.SortDirection, False);
|
||||
finally
|
||||
FindCloseUTF8(SR);
|
||||
Screen.Cursor := crDefault;
|
||||
|
@ -40,10 +40,10 @@ type
|
||||
|
||||
TPropertyEditLink = class(TInterfacedObject, IVTEditLink)
|
||||
private
|
||||
FEdit: TWinControl; // One of the property editor classes.
|
||||
FTree: TVirtualStringTree; // A back reference to the tree calling.
|
||||
FNode: PVirtualNode; // The node being edited.
|
||||
FColumn: Integer; // The column of the node being edited.
|
||||
FEdit: TWinControl; // One of the property editor classes.
|
||||
FTree: TLazVirtualStringTree; // A back reference to the tree calling.
|
||||
FNode: PVirtualNode; // The node being edited.
|
||||
FColumn: Integer; // The column of the node being edited.
|
||||
protected
|
||||
procedure EditExit(Sender: TObject);
|
||||
procedure EditKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||
@ -216,7 +216,7 @@ begin
|
||||
end;
|
||||
|
||||
type
|
||||
TVirtualStringTreeAccess = class(TVirtualStringTree);
|
||||
TVirtualStringTreeAccess = class(TLazVirtualStringTree);
|
||||
|
||||
procedure TPropertyEditLink.EditKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||
var
|
||||
@ -411,7 +411,7 @@ var
|
||||
|
||||
begin
|
||||
Result := True;
|
||||
FTree := Tree as TVirtualStringTree;
|
||||
FTree := Tree as TLazVirtualStringTree;
|
||||
FNode := Node;
|
||||
FColumn := Column;
|
||||
|
||||
@ -593,7 +593,7 @@ var
|
||||
TempText: String;
|
||||
begin
|
||||
Result := True;
|
||||
FTree := Tree as TVirtualStringTree;
|
||||
FTree := Tree as TLazVirtualStringTree;
|
||||
FNode := Node;
|
||||
FColumn := Column;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user