mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 04:59:08 +02:00
VirtualTreeView: Fix LCL scaling of non-default fonts.
git-svn-id: trunk@63830 -
This commit is contained in:
parent
d62e55102b
commit
e0c036e091
@ -1376,10 +1376,13 @@ type
|
|||||||
function AllowFocus(ColumnIndex: TColumnIndex): Boolean;
|
function AllowFocus(ColumnIndex: TColumnIndex): Boolean;
|
||||||
procedure Assign(Source: TPersistent); override;
|
procedure Assign(Source: TPersistent); override;
|
||||||
{$IF LCL_FullVersion >= 1080000}
|
{$IF LCL_FullVersion >= 1080000}
|
||||||
procedure AutoAdjustLayout(const AXProportion, AYProportion: Double);
|
procedure AutoAdjustLayout(const AXProportion, AYProportion: Double); virtual;
|
||||||
{$IFEND}
|
{$IFEND}
|
||||||
procedure AutoFitColumns(Animated: Boolean = True; SmartAutoFitType: TSmartAutoFitType = smaUseColumnOption;
|
procedure AutoFitColumns(Animated: Boolean = True; SmartAutoFitType: TSmartAutoFitType = smaUseColumnOption;
|
||||||
RangeStartCol: Integer = NoColumn; RangeEndCol: Integer = NoColumn); virtual;
|
RangeStartCol: Integer = NoColumn; RangeEndCol: Integer = NoColumn); virtual;
|
||||||
|
{$IF LCL_FullVersion >= 2010000}
|
||||||
|
procedure FixDesignFontsPPI(const ADesignTimePPI: Integer); virtual;
|
||||||
|
{$IFEND}
|
||||||
function InHeader(const P: TPoint): Boolean; virtual;
|
function InHeader(const P: TPoint): Boolean; virtual;
|
||||||
function InHeaderSplitterArea(P: TPoint): Boolean; virtual;
|
function InHeaderSplitterArea(P: TPoint): Boolean; virtual;
|
||||||
procedure Invalidate(Column: TVirtualTreeColumn; ExpandToBorder: Boolean = False);
|
procedure Invalidate(Column: TVirtualTreeColumn; ExpandToBorder: Boolean = False);
|
||||||
@ -2773,6 +2776,9 @@ type
|
|||||||
procedure EnsureNodeFocused(); virtual;
|
procedure EnsureNodeFocused(); virtual;
|
||||||
function FindNodeInSelection(P: PVirtualNode; var Index: Integer; LowBound, HighBound: Integer): Boolean; virtual;
|
function FindNodeInSelection(P: PVirtualNode; var Index: Integer; LowBound, HighBound: Integer): Boolean; virtual;
|
||||||
procedure FinishChunkHeader(Stream: TStream; StartPos, EndPos: Integer); virtual;
|
procedure FinishChunkHeader(Stream: TStream; StartPos, EndPos: Integer); virtual;
|
||||||
|
{$IF LCL_FullVersion >= 2010000}
|
||||||
|
procedure FixDesignFontsPPI(const ADesignTimePPI: Integer); virtual;
|
||||||
|
{$IFEND}
|
||||||
procedure FontChanged(AFont: TObject); virtual; reintroduce;
|
procedure FontChanged(AFont: TObject); virtual; reintroduce;
|
||||||
function GetBorderDimensions: TSize; virtual;
|
function GetBorderDimensions: TSize; virtual;
|
||||||
function GetCheckImage(Node: PVirtualNode; ImgCheckType: TCheckType = ctNone;
|
function GetCheckImage(Node: PVirtualNode; ImgCheckType: TCheckType = ctNone;
|
||||||
@ -11590,6 +11596,15 @@ end;
|
|||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
{$IF LCL_FullVersion >= 2010000}
|
||||||
|
procedure TVTHeader.FixDesignFontsPPI(const ADesignTimePPI: Integer);
|
||||||
|
begin
|
||||||
|
TreeView.DoFixDesignFontPPI(Font, ADesignTimePPI);
|
||||||
|
end;
|
||||||
|
{$IFEND}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
function TVTHeader.InHeader(const P: TPoint): Boolean;
|
function TVTHeader.InHeader(const P: TPoint): Boolean;
|
||||||
|
|
||||||
// Determines whether the given point (client coordinates!) is within the header rectangle (non-client coordinates).
|
// Determines whether the given point (client coordinates!) is within the header rectangle (non-client coordinates).
|
||||||
@ -21844,6 +21859,16 @@ end;
|
|||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
{$IF LCL_FullVersion >= 2010000}
|
||||||
|
procedure TBaseVirtualTree.FixDesignFontsPPI(const ADesignTimePPI: Integer);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
FHeader.FixDesignFontsPPI(ADesignTimePPI);
|
||||||
|
end;
|
||||||
|
{$IFEND}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
procedure TBaseVirtualTree.FontChanged(AFont: TObject);
|
procedure TBaseVirtualTree.FontChanged(AFont: TObject);
|
||||||
|
|
||||||
// Little helper function for font changes (as they are not tracked in TBitmap/TCanvas.OnChange).
|
// Little helper function for font changes (as they are not tracked in TBitmap/TCanvas.OnChange).
|
||||||
|
Loading…
Reference in New Issue
Block a user