You've already forked lazarus-ccr
jvcllaz: Make TJvGroupHeader high-dpi aware.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7295 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -74,13 +74,15 @@ type
|
|||||||
procedure SetBevelSpace(Value: Integer);
|
procedure SetBevelSpace(Value: Integer);
|
||||||
// procedure SetLabelOptions(Value: TJvGroupHeaderOptions);
|
// procedure SetLabelOptions(Value: TJvGroupHeaderOptions);
|
||||||
protected
|
protected
|
||||||
procedure StyleChanged(Sender: TObject); virtual;
|
|
||||||
procedure BevelLine(C: TColor; X, Y, AWidth: Integer); virtual;
|
procedure BevelLine(C: TColor; X, Y, AWidth: Integer); virtual;
|
||||||
|
procedure DoAutoAdjustLayout(const AMode: TLayoutAdjustmentPolicy;
|
||||||
|
const AXProportion, AYProportion: Double); override;
|
||||||
procedure DoDrawText(var Rect: TRect; Flags: Longint); virtual;
|
procedure DoDrawText(var Rect: TRect; Flags: Longint); virtual;
|
||||||
|
procedure FontChanged; override;
|
||||||
function GetLabelText: string; virtual;
|
function GetLabelText: string; virtual;
|
||||||
procedure Paint; override;
|
procedure Paint; override;
|
||||||
|
procedure StyleChanged(Sender: TObject); virtual;
|
||||||
procedure TextChanged; override;
|
procedure TextChanged; override;
|
||||||
procedure FontChanged; override;
|
|
||||||
public
|
public
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
@ -256,6 +258,18 @@ begin
|
|||||||
inherited Destroy;
|
inherited Destroy;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TJvGroupHeader.DoAutoAdjustLayout(
|
||||||
|
const AMode: TLayoutAdjustmentPolicy;
|
||||||
|
const AXProportion, AYProportion: Double);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
if AMode in [lapAutoAdjustWithoutHorizontalScrolling, lapAutoAdjustForDPI] then
|
||||||
|
begin
|
||||||
|
FBevelSpace := round(FBevelSpace * AXProportion);
|
||||||
|
FPositionOffset := round(FPositionOffset * AXProportion);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
function TJvGroupHeader.GetLabelText: string;
|
function TJvGroupHeader.GetLabelText: string;
|
||||||
begin
|
begin
|
||||||
Result := Caption;
|
Result := Caption;
|
||||||
|
Reference in New Issue
Block a user