mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-26 22:09:21 +02:00
Changes the lapDefault resolution into Application.Initialize
git-svn-id: trunk@34289 -
This commit is contained in:
parent
7bd5c4360f
commit
217b6bb45b
@ -880,7 +880,14 @@ type
|
||||
chtOnKeyDown
|
||||
);
|
||||
|
||||
TLayoutAdjustmentPolicy = InterfaceBase.TLayoutAdjustmentPolicy;
|
||||
TLayoutAdjustmentPolicy = (
|
||||
lapDefault, // widgetset dependent
|
||||
lapFixedLayout, // A fixed absolute layout in all platforms
|
||||
lapAutoAdjustWithoutHorizontalScrolling, // Smartphone platforms use this one,
|
||||
// the x axis is stretched to fill the screen and
|
||||
// the y is scaled to fit the DPI
|
||||
lapAutoAdjustForDPI // For desktops using High DPI, scale x and y to fit the DPI
|
||||
);
|
||||
|
||||
{* Note on TControl.Caption
|
||||
* The VCL implementation relies on the virtual Get/SetTextBuf to
|
||||
|
@ -3451,7 +3451,7 @@ var
|
||||
begin
|
||||
// First resolve ladDefault
|
||||
lMode := AMode;
|
||||
if lMode = lapDefault then Widgetset.ResolveDefaultLayoutAdjustmentPolicy(lMode);
|
||||
if lMode = lapDefault then lMode := Application.LayoutAdjustmentPolicy;
|
||||
|
||||
// X-axis adjustment proportion
|
||||
if lMode = lapAutoAdjustWithoutHorizontalScrolling then
|
||||
|
@ -1215,11 +1215,6 @@ begin
|
||||
Result := (Shift = []) and (Key = VK_F1);
|
||||
end;
|
||||
|
||||
procedure TWidgetSet.ResolveDefaultLayoutAdjustmentPolicy(var AMode: TLayoutAdjustmentPolicy);
|
||||
begin
|
||||
AMode := lapFixedLayout;
|
||||
end;
|
||||
|
||||
procedure TWidgetSet.InitializeCriticalSection(var CritSection: TCriticalSection);
|
||||
begin
|
||||
DebugLn('TWidgetSet.InitializeCriticalSection Not implemented yet');
|
||||
|
@ -37,16 +37,6 @@ uses
|
||||
GraphType, GraphMath, Themes;
|
||||
|
||||
type
|
||||
// Needs to be here to avoid circular unit references
|
||||
TLayoutAdjustmentPolicy = (
|
||||
lapDefault, // widgetset dependent
|
||||
lapFixedLayout, // A fixed absolute layout in all platforms
|
||||
lapAutoAdjustWithoutHorizontalScrolling, // Smartphone platforms use this one,
|
||||
// the x axis is stretched to fill the screen and
|
||||
// the y is scaled to fit the DPI
|
||||
lapAutoAdjustForDPI // For desktops using High DPI, scale x and y to fit the DPI
|
||||
);
|
||||
|
||||
PEventHandler = type Pointer;
|
||||
PProcessEventHandler = type Pointer;
|
||||
PPipeEventHandler = type Pointer;
|
||||
@ -181,8 +171,6 @@ type
|
||||
function InitStockFont(AFont: TObject; AStockFont: TStockFont): Boolean; virtual;
|
||||
function IsHelpKey(Key: Word; Shift: TShiftState): Boolean; virtual;
|
||||
|
||||
procedure ResolveDefaultLayoutAdjustmentPolicy(var AMode: TLayoutAdjustmentPolicy); virtual;
|
||||
|
||||
// create and destroy
|
||||
function CreateTimer(Interval: integer; TimerProc: TWSTimerProc): THandle; virtual; abstract;
|
||||
function DestroyTimer(TimerHandle: THandle): boolean; virtual; abstract;
|
||||
|
@ -209,8 +209,6 @@ type
|
||||
procedure DCSetAntialiasing(CanvasHandle: HDC; AEnabled: Boolean); override;
|
||||
procedure SetDesigning(AComponent: TComponent); override;
|
||||
|
||||
procedure ResolveDefaultLayoutAdjustmentPolicy(var AMode: TLayoutAdjustmentPolicy); virtual;
|
||||
|
||||
// create and destroy
|
||||
function CreateTimer(Interval: integer; TimerFunc: TWSTimerProc): THandle; override;
|
||||
function DestroyTimer(TimerHandle: THandle): boolean; override;
|
||||
|
@ -560,6 +560,9 @@ begin
|
||||
{$endif}
|
||||
|
||||
Forms.MessageBoxFunction := @CDMessageBoxFunction;
|
||||
|
||||
if Application.LayoutAdjustmentPolicy = lapDefault then
|
||||
Application.LayoutAdjustmentPolicy := lapAutoAdjustWithoutHorizontalScrolling;
|
||||
end;
|
||||
|
||||
procedure TCDWidgetSet.AppRun(const ALoop: TApplicationMainLoop);
|
||||
@ -765,11 +768,6 @@ procedure TCDWidgetSet.AppSetMainFormOnTaskBar(const DoSet: Boolean);
|
||||
begin
|
||||
end;
|
||||
|
||||
procedure TCDWidgetSet.ResolveDefaultLayoutAdjustmentPolicy(var AMode: TLayoutAdjustmentPolicy);
|
||||
begin
|
||||
AMode := lapAutoAdjustWithoutHorizontalScrolling;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
function: CreateTimer
|
||||
Params: Interval:
|
||||
|
@ -90,6 +90,9 @@ begin
|
||||
// DebugLn('TCDWidgetSet.AppInit');
|
||||
{$endif}
|
||||
|
||||
if Application.LayoutAdjustmentPolicy = lapDefault then
|
||||
Application.LayoutAdjustmentPolicy := lapFixedLayout;
|
||||
|
||||
// Maybe it was passed as a -display parameter. Lets check first!
|
||||
if FDisplayName = '' then
|
||||
FDisplayName := XDisplayName(nil);
|
||||
@ -439,11 +442,6 @@ procedure TCDWidgetSet.AppSetMainFormOnTaskBar(const DoSet: Boolean);
|
||||
begin
|
||||
end;
|
||||
|
||||
procedure TCDWidgetSet.ResolveDefaultLayoutAdjustmentPolicy(var AMode: TLayoutAdjustmentPolicy);
|
||||
begin
|
||||
AMode := lapFixedLayout;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
function: CreateTimer
|
||||
Params: Interval:
|
||||
|
Loading…
Reference in New Issue
Block a user