mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 04:55:58 +02:00
TurboPower_iPro: Fix size selection of preview form.
git-svn-id: trunk@52064 -
This commit is contained in:
parent
1a9f949c1f
commit
85d12562cd
@ -2409,11 +2409,6 @@ type
|
||||
FWidth: Integer;
|
||||
FHeight: Integer;
|
||||
FZoom: Integer;
|
||||
private
|
||||
function IsLeftStored: Boolean;
|
||||
function IsHeightStored: Boolean;
|
||||
function IsTopStored: Boolean;
|
||||
function IsWidthStored: Boolean;
|
||||
public
|
||||
constructor Create;
|
||||
published
|
||||
@ -2424,13 +2419,13 @@ type
|
||||
property Maximized: Boolean
|
||||
read FMaximized write FMaximized default false;
|
||||
property Left: Integer
|
||||
read FLeft write FLeft stored IsLeftStored;
|
||||
read FLeft write FLeft;
|
||||
property Top: Integer
|
||||
read FTop write FTop stored IsTopStored;
|
||||
read FTop write FTop;
|
||||
property Width: Integer
|
||||
read FWidth write FWidth stored IsWidthStored;
|
||||
read FWidth write FWidth;
|
||||
property Height: Integer
|
||||
read FHeight write FHeight stored IsHeightStored;
|
||||
read FHeight write FHeight;
|
||||
property Zoom: integer
|
||||
read FZoom write FZoom default 100;
|
||||
end;
|
||||
@ -13503,14 +13498,14 @@ begin
|
||||
with preview do
|
||||
try
|
||||
p := HTMLPanel.PrintSettings.Preview.Position;
|
||||
if not (p in [poDefault, poDefaultSizeOnly]) then begin
|
||||
Width := HTMLPanel.PrintSettings.Preview.Width;
|
||||
Height := HTMLPanel.PrintSettings.Preview.Height;
|
||||
end;
|
||||
if (p = poDesigned) or (p = poDefaultSizeOnly) then begin
|
||||
Left := HTMLPanel.PrintSettings.Preview.Left;
|
||||
Top := HTMLPanel.PrintSettings.Preview.Top;
|
||||
end;
|
||||
if (p <> poDefault) and (p <> poDefaultSizeOnly) then begin
|
||||
Width := HTMLPanel.PrintSettings.Preview.Width;
|
||||
Height := HTMLPanel.PrintSettings.Preview.Height;
|
||||
end;
|
||||
Position := p;
|
||||
if HTMLPanel.PrintSettings.Preview.Maximized then
|
||||
WindowState := wsMaximized else
|
||||
@ -13524,12 +13519,15 @@ begin
|
||||
Zoom := HTMLPanel.PrintSettings.Preview.Zoom;
|
||||
ShowModal;
|
||||
HTMLPanel.PrintSettings.Preview.Maximized := (WindowState = wsMaximized);
|
||||
if (WindowState = wsNormal) and (p <> poDefault) and (p <> poDefaultSizeOnly)
|
||||
then begin
|
||||
HTMLPanel.PrintSettings.Preview.Left := Left;
|
||||
HTMLPanel.PrintSettings.Preview.Top := Top;
|
||||
HTMLPanel.PrintSettings.Preview.Width := Width;
|
||||
HTMLPanel.PrintSettings.Preview.Height := Height;
|
||||
if (WindowState = wsNormal) then begin
|
||||
if (p = poDesigned) or (p = poDefaultSizeOnly) then begin
|
||||
HTMLPanel.PrintSettings.Preview.Left := Left;
|
||||
HTMLPanel.PrintSettings.Preview.Top := Top;
|
||||
end;
|
||||
if not (p in [poDefault, poDefaultSizeOnly]) then begin
|
||||
HTMLPanel.PrintSettings.Preview.Width := Width;
|
||||
HTMLPanel.PrintSettings.Preview.Height := Height;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
ScaleFonts := False;
|
||||
@ -15942,30 +15940,6 @@ begin
|
||||
FTop := Screen.Height div 4;
|
||||
end;
|
||||
|
||||
function TIpHtmlPreviewSettings.IsLeftStored: Boolean;
|
||||
begin
|
||||
Result := ((FPosition = poDesigned) or (FPosition = poDefaultSizeOnly)) and
|
||||
(FLeft <> Screen.Width div 4);
|
||||
end;
|
||||
|
||||
function TIpHtmlPreviewSettings.IsHeightStored: Boolean;
|
||||
begin
|
||||
Result := ((FPosition = poDesigned) or (FPosition = poDefaultPosOnly)) and
|
||||
(FHeight <> Screen.Height * 3 div 4)
|
||||
end;
|
||||
|
||||
function TIpHtmlPreviewSettings.IsTopStored: Boolean;
|
||||
begin
|
||||
Result := ((FPosition = poDesigned) or (FPosition = poDefaultSizeOnly)) and
|
||||
(FTop <> Screen.Height div 4);
|
||||
end;
|
||||
|
||||
function TIpHtmlPreviewSettings.IsWidthStored: Boolean;
|
||||
begin
|
||||
Result := ((FPosition = poDesigned) or (FPosition = poDefaultPosOnly)) and
|
||||
(FWidth <> Screen.Width * 3 div 4)
|
||||
end;
|
||||
|
||||
{ TIpHtmlPrintSettings }
|
||||
|
||||
constructor TIpHtmlPrintSettings.Create;
|
||||
|
@ -2,10 +2,10 @@ object IpHTMLPreview: TIpHTMLPreview
|
||||
Left = 274
|
||||
Height = 498
|
||||
Top = 141
|
||||
Width = 868
|
||||
Width = 863
|
||||
Caption = 'Print preview'
|
||||
ClientHeight = 498
|
||||
ClientWidth = 868
|
||||
ClientWidth = 863
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnResize = FormResize
|
||||
@ -16,12 +16,12 @@ object IpHTMLPreview: TIpHTMLPreview
|
||||
Left = 0
|
||||
Height = 36
|
||||
Top = 0
|
||||
Width = 868
|
||||
Width = 863
|
||||
Align = alTop
|
||||
AutoSize = True
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 36
|
||||
ClientWidth = 868
|
||||
ClientWidth = 863
|
||||
TabOrder = 0
|
||||
object Label1: TLabel
|
||||
AnchorSideLeft.Control = btnPrev
|
||||
@ -261,14 +261,14 @@ object IpHTMLPreview: TIpHTMLPreview
|
||||
Left = 0
|
||||
Height = 462
|
||||
Top = 36
|
||||
Width = 868
|
||||
Width = 863
|
||||
HorzScrollBar.Page = 158
|
||||
HorzScrollBar.Tracking = True
|
||||
VertScrollBar.Page = 125
|
||||
VertScrollBar.Tracking = True
|
||||
Align = alClient
|
||||
ClientHeight = 458
|
||||
ClientWidth = 864
|
||||
ClientWidth = 859
|
||||
Color = clBtnFace
|
||||
ParentColor = False
|
||||
TabOrder = 1
|
||||
|
@ -270,7 +270,6 @@ end;
|
||||
procedure TIpHTMLPreview.FormShow(Sender: TObject);
|
||||
begin
|
||||
UpdateBtnStates;
|
||||
// SetZoom(FZoom);
|
||||
RenderPage(CurPage);
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user