Johann ELSASS 1 рік тому
батько
коміт
744b24cfbb
3 змінених файлів з 421 додано та 284 видалено
  1. 373 251
      lazpaint/dialog/uprint.lfm
  2. 5 3
      lazpaint/dialog/uprint.lrj
  3. 43 30
      lazpaint/dialog/uprint.pas

+ 373 - 251
lazpaint/dialog/uprint.lfm

@@ -1,278 +1,400 @@
 object FPrint: TFPrint
-  Left = 345
-  Height = 399
-  Top = 163
-  Width = 599
+  Left = 344
+  Height = 473
+  Top = 162
+  Width = 641
   BorderIcons = [biSystemMenu, biMaximize]
   Caption = 'Print'
-  ClientHeight = 399
-  ClientWidth = 599
+  ClientHeight = 473
+  ClientWidth = 641
   Constraints.MinHeight = 399
   Constraints.MinWidth = 450
   OnCreate = FormCreate
   OnShow = FormShow
   Position = poMainFormCenter
   ShowInTaskBar = stAlways
-  LCLVersion = '2.2.0.1'
-  object Label_PrinterAndPaper: TLabel
-    Left = 9
-    Height = 25
-    Top = 6
-    Width = 127
-    AutoSize = False
-    Caption = 'Printer and paper:'
-    Layout = tlCenter
-  end
-  object Label_SelectedPrinterAndPaper: TLabel
-    Cursor = crHandPoint
-    Left = 141
-    Height = 25
-    Top = 6
-    Width = 346
-    Anchors = [akTop, akLeft, akRight]
-    AutoSize = False
-    Color = clWindow
-    Font.Color = clWindowText
-    Layout = tlCenter
-    ParentFont = False
-    Transparent = False
-    OnClick = Label_SelectedPrinterAndPaperClick
-  end
-  object Button_ConfigurePrinter: TButton
-    Left = 490
-    Height = 25
-    Top = 6
-    Width = 103
-    Anchors = [akTop, akRight]
-    Caption = 'Configure...'
-    OnClick = Button_ConfigurePrinterClick
+  LCLVersion = '3.0.0.3'
+  object Panel1: TPanel
+    Left = 0
+    Height = 36
+    Top = 0
+    Width = 641
+    Align = alTop
+    AutoSize = True
+    BevelOuter = bvNone
+    BorderWidth = 8
+    ClientHeight = 36
+    ClientWidth = 641
     TabOrder = 0
-  end
-  object Label_Orientation: TLabel
-    Left = 9
-    Height = 15
-    Top = 37
-    Width = 63
-    Caption = 'Orientation:'
-  end
-  object ComboBox_Orientation: TComboBox
-    Left = 9
-    Height = 23
-    Top = 53
-    Width = 175
-    ItemHeight = 15
-    OnChange = ComboBox_OrientationChange
-    Style = csDropDownList
-    TabOrder = 1
-  end
-  object GroupBox_Margins: TGroupBox
-    Left = 8
-    Height = 119
-    Top = 79
-    Width = 178
-    Caption = 'Margins'
-    ClientHeight = 99
-    ClientWidth = 174
-    TabOrder = 2
-    object Label_Left: TLabel
-      Left = 7
-      Height = 15
-      Top = 27
-      Width = 23
-      Caption = 'Left:'
-    end
-    object Label_Top: TLabel
-      Left = 2
-      Height = 16
-      Top = 7
-      Width = 56
-      Alignment = taRightJustify
-      AutoSize = False
-      Caption = 'Top:'
+    object Label_PrinterAndPaper: TLabel
+      Left = 8
+      Height = 20
+      Top = 8
+      Width = 109
+      Align = alLeft
+      Caption = 'Printer and paper:'
+      Layout = tlCenter
     end
-    object Label_Right: TLabel
-      Left = 110
-      Height = 15
-      Top = 27
-      Width = 31
-      Caption = 'Right:'
-    end
-    object Label_Bottom: TLabel
-      Left = 2
-      Height = 16
-      Top = 76
-      Width = 56
-      Alignment = taRightJustify
-      AutoSize = False
-      Caption = 'Bottom:'
-    end
-    object SpinEdit_Top: TSpinEdit
-      Left = 66
-      Height = 23
-      Top = 4
-      Width = 56
-      OnChange = SpinEdit_Change
-      TabOrder = 0
-      Value = 10
-    end
-    object SpinEdit_Bottom: TSpinEdit
-      Left = 66
-      Height = 23
-      Top = 73
-      Width = 56
-      OnChange = SpinEdit_Change
+    object Panel10: TPanel
+      Left = 117
+      Height = 20
+      Top = 8
+      Width = 423
+      Align = alClient
+      AutoSize = True
+      BevelOuter = bvNone
+      ChildSizing.LeftRightSpacing = 6
+      ChildSizing.EnlargeHorizontal = crsScaleChilds
+      ChildSizing.EnlargeVertical = crsScaleChilds
+      ChildSizing.Layout = cclLeftToRightThenTopToBottom
+      ChildSizing.ControlsPerLine = 1
+      ClientHeight = 20
+      ClientWidth = 423
       TabOrder = 1
-      Value = 10
-    end
-    object SpinEdit_Left: TSpinEdit
-      Left = 7
-      Height = 23
-      Top = 43
-      Width = 56
-      OnChange = SpinEdit_Change
-      TabOrder = 2
-      Value = 10
+      object Label_SelectedPrinterAndPaper: TLabel
+        Cursor = crHandPoint
+        Left = 6
+        Height = 20
+        Top = 0
+        Width = 411
+        Caption = '.'
+        Color = clWindow
+        Font.Color = clWindowText
+        Layout = tlCenter
+        ParentColor = False
+        ParentFont = False
+        Transparent = False
+        OnClick = Label_SelectedPrinterAndPaperClick
+      end
     end
-    object SpinEdit_Right: TSpinEdit
-      Left = 110
-      Height = 23
-      Top = 43
-      Width = 56
-      OnChange = SpinEdit_Change
-      TabOrder = 3
-      Value = 10
+    object Button_ConfigurePrinter: TButton
+      Left = 540
+      Height = 20
+      Top = 8
+      Width = 93
+      Align = alRight
+      AutoSize = True
+      Caption = 'Configure...'
+      TabOrder = 0
+      OnClick = Button_ConfigurePrinterClick
     end
   end
-  object BGRAVirtualScreen1: TBGRAVirtualScreen
-    Left = 192
-    Height = 351
-    Top = 40
-    Width = 400
-    OnRedraw = BGRAVirtualScreen1Redraw
-    Alignment = taLeftJustify
-    Anchors = [akTop, akLeft, akRight, akBottom]
-    Color = clBtnFace
-    ParentColor = False
-    TabOrder = 3
-    OnMouseDown = BGRAVirtualScreen1MouseDown
-    OnMouseMove = BGRAVirtualScreen1MouseMove
-    OnMouseUp = BGRAVirtualScreen1MouseUp
-    OnResize = BGRAVirtualScreen1Resize
-  end
-  object GroupBox_ImageSize: TGroupBox
-    Left = 8
-    Height = 157
-    Top = 202
-    Width = 179
-    Caption = 'Image size'
-    ClientHeight = 137
-    ClientWidth = 175
-    TabOrder = 4
-    object SpinEdit_DpiX: TSpinEdit
-      Left = 7
-      Height = 23
-      Top = 38
-      Width = 56
-      Increment = 16
-      MaxValue = 99999
-      MinValue = 1
-      OnChange = SpinEdit_DPIChange
-      TabOrder = 0
-      Value = 96
+  object Panel2: TPanel
+    Left = 0
+    Height = 437
+    Top = 36
+    Width = 192
+    Align = alLeft
+    BevelOuter = bvNone
+    ChildSizing.LeftRightSpacing = 8
+    ChildSizing.VerticalSpacing = 6
+    ChildSizing.EnlargeHorizontal = crsScaleChilds
+    ChildSizing.Layout = cclLeftToRightThenTopToBottom
+    ChildSizing.ControlsPerLine = 1
+    ClientHeight = 437
+    ClientWidth = 192
+    TabOrder = 1
+    object Label_Orientation: TLabel
+      Left = 8
+      Height = 16
+      Top = 0
+      Width = 176
+      Caption = 'Orientation:'
     end
-    object Label_DpiX: TLabel
-      Left = 7
-      Height = 15
+    object ComboBox_Orientation: TComboBox
+      Left = 8
+      Height = 20
       Top = 22
-      Width = 3
-      Caption = '.'
-    end
-    object Label_Width: TLabel
-      Left = 7
-      Height = 15
-      Top = 63
-      Width = 35
-      Caption = 'Width:'
+      Width = 176
+      ItemHeight = 26
+      Style = csDropDownList
+      TabOrder = 0
+      Text = '0'
+      OnChange = ComboBox_OrientationChange
     end
-    object SpinEdit_Width: TSpinEdit
-      Left = 7
-      Height = 23
-      Top = 79
-      Width = 72
-      MaxValue = 99999
-      MinValue = 1
-      OnChange = SpinEdit_SizeChange
+    object GroupBox_Margins: TGroupBox
+      Left = 8
+      Height = 122
+      Top = 48
+      Width = 176
+      Caption = 'Margins'
+      ChildSizing.TopBottomSpacing = 2
+      ChildSizing.VerticalSpacing = 6
+      ChildSizing.EnlargeHorizontal = crsHomogenousSpaceResize
+      ChildSizing.Layout = cclLeftToRightThenTopToBottom
+      ClientHeight = 95
+      ClientWidth = 166
       TabOrder = 1
-      Value = 10
-    end
-    object Label_Height: TLabel
-      Left = 94
-      Height = 15
-      Top = 63
-      Width = 39
-      Caption = 'Height:'
+      object Panel3: TPanel
+        Left = 13
+        Height = 21
+        Top = 2
+        Width = 140
+        AutoSize = True
+        BevelOuter = bvNone
+        ChildSizing.HorizontalSpacing = 2
+        ChildSizing.EnlargeHorizontal = crsHomogenousSpaceResize
+        ChildSizing.Layout = cclTopToBottomThenLeftToRight
+        ChildSizing.ControlsPerLine = 1
+        ClientHeight = 21
+        ClientWidth = 140
+        TabOrder = 0
+        object Label_Top: TLabel
+          Left = 10
+          Height = 21
+          Top = 0
+          Width = 26
+          Alignment = taRightJustify
+          AutoSize = False
+          Caption = 'Top:'
+          Layout = tlCenter
+        end
+        object SpinEdit_Top: TSpinEdit
+          Left = 46
+          Height = 21
+          Top = 0
+          Width = 50
+          OnChange = SpinEdit_Change
+          TabOrder = 0
+          Value = 10
+        end
+        object Panel8: TPanel
+          Left = 106
+          Height = 21
+          Top = 0
+          Width = 30
+          BevelOuter = bvNone
+          Constraints.MinHeight = 8
+          Constraints.MinWidth = 30
+          TabOrder = 1
+        end
+      end
+      object Panel4: TPanel
+        Left = 13
+        Height = 37
+        Top = 29
+        Width = 140
+        AutoSize = True
+        BevelOuter = bvNone
+        ChildSizing.HorizontalSpacing = 40
+        ChildSizing.Layout = cclTopToBottomThenLeftToRight
+        ChildSizing.ControlsPerLine = 2
+        ClientHeight = 37
+        ClientWidth = 140
+        TabOrder = 1
+        object Label_Left: TLabel
+          Left = 0
+          Height = 16
+          Top = 0
+          Width = 50
+          Caption = 'Left:'
+        end
+        object SpinEdit_Left: TSpinEdit
+          Left = 0
+          Height = 21
+          Top = 16
+          Width = 50
+          OnChange = SpinEdit_Change
+          TabOrder = 1
+          Value = 10
+        end
+        object Label_Right: TLabel
+          Left = 90
+          Height = 16
+          Top = 0
+          Width = 50
+          Caption = 'Right:'
+        end
+        object SpinEdit_Right: TSpinEdit
+          Left = 90
+          Height = 21
+          Top = 16
+          Width = 50
+          OnChange = SpinEdit_Change
+          TabOrder = 0
+          Value = 10
+        end
+      end
+      object Panel5: TPanel
+        Left = 13
+        Height = 21
+        Top = 72
+        Width = 140
+        AutoSize = True
+        BevelOuter = bvNone
+        ChildSizing.HorizontalSpacing = 2
+        ChildSizing.EnlargeHorizontal = crsHomogenousSpaceResize
+        ChildSizing.Layout = cclTopToBottomThenLeftToRight
+        ChildSizing.ControlsPerLine = 1
+        ClientHeight = 21
+        ClientWidth = 140
+        TabOrder = 2
+        object Label_Bottom: TLabel
+          Left = 4
+          Height = 21
+          Top = 0
+          Width = 48
+          Alignment = taRightJustify
+          AutoSize = False
+          Caption = 'Bottom:'
+          Layout = tlCenter
+        end
+        object SpinEdit_Bottom: TSpinEdit
+          Left = 56
+          Height = 21
+          Top = 0
+          Width = 50
+          OnChange = SpinEdit_Change
+          TabOrder = 0
+          Value = 10
+        end
+        object Panel7: TPanel
+          Left = 110
+          Height = 21
+          Top = 0
+          Width = 30
+          BevelOuter = bvNone
+          Constraints.MinHeight = 8
+          Constraints.MinWidth = 30
+          TabOrder = 1
+        end
+      end
     end
-    object SpinEdit_Height: TSpinEdit
-      Left = 94
-      Height = 23
-      Top = 79
-      Width = 72
-      MaxValue = 99999
-      MinValue = 1
-      OnChange = SpinEdit_SizeChange
+    object GroupBox_ImageSize: TGroupBox
+      Left = 8
+      Height = 165
+      Top = 176
+      Width = 176
+      Caption = 'Image size'
+      ChildSizing.TopBottomSpacing = 2
+      ChildSizing.VerticalSpacing = 8
+      ChildSizing.EnlargeHorizontal = crsScaleChilds
+      ChildSizing.Layout = cclLeftToRightThenTopToBottom
+      ClientHeight = 138
+      ClientWidth = 166
       TabOrder = 2
-      Value = 10
-    end
-    object Label_DpiY: TLabel
-      Left = 94
-      Height = 15
-      Top = 22
-      Width = 3
-      Caption = '.'
-      Visible = False
+      object CheckBox_Ratio: TCheckBox
+        Left = 0
+        Height = 18
+        Top = 2
+        Width = 166
+        Caption = 'Keep aspect ratio'
+        Checked = True
+        State = cbChecked
+        TabOrder = 0
+        OnChange = CheckBox_RatioChange
+      end
+      object Panel6: TPanel
+        Left = 0
+        Height = 80
+        Top = 28
+        Width = 166
+        AutoSize = True
+        BevelOuter = bvNone
+        ChildSizing.HorizontalSpacing = 20
+        ChildSizing.VerticalSpacing = 2
+        ChildSizing.EnlargeHorizontal = crsScaleChilds
+        ChildSizing.Layout = cclLeftToRightThenTopToBottom
+        ChildSizing.ControlsPerLine = 2
+        ClientHeight = 80
+        ClientWidth = 166
+        TabOrder = 2
+        object Label_DpiX: TLabel
+          Left = 0
+          Height = 16
+          Top = 0
+          Width = 73
+          Caption = '.'
+        end
+        object Label_DpiY: TLabel
+          Left = 93
+          Height = 16
+          Top = 0
+          Width = 73
+          Caption = '.'
+          Visible = False
+        end
+        object SpinEdit_DpiX: TSpinEdit
+          Left = 0
+          Height = 21
+          Top = 18
+          Width = 73
+          Increment = 16
+          MaxValue = 99999
+          MinValue = 1
+          OnChange = SpinEdit_DPIChange
+          TabOrder = 0
+          Value = 96
+        end
+        object SpinEdit_DpiY: TSpinEdit
+          Left = 93
+          Height = 21
+          Top = 18
+          Width = 73
+          Increment = 16
+          MaxValue = 99999
+          MinValue = 1
+          OnChange = SpinEdit_DPIChange
+          TabOrder = 1
+          Value = 96
+          Visible = False
+        end
+        object Label_Width: TLabel
+          Left = 0
+          Height = 16
+          Top = 41
+          Width = 73
+          Caption = 'Width:'
+        end
+        object Label_Height: TLabel
+          Left = 93
+          Height = 16
+          Top = 41
+          Width = 73
+          Caption = 'Height:'
+        end
+        object SpinEdit_Width: TSpinEdit
+          Left = 0
+          Height = 21
+          Top = 59
+          Width = 73
+          MaxValue = 99999
+          MinValue = 1
+          OnChange = SpinEdit_SizeChange
+          TabOrder = 2
+          Value = 10
+        end
+        object SpinEdit_Height: TSpinEdit
+          Left = 93
+          Height = 21
+          Top = 59
+          Width = 73
+          MaxValue = 99999
+          MinValue = 1
+          OnChange = SpinEdit_SizeChange
+          TabOrder = 3
+          Value = 10
+        end
+      end
+      object Button_ZoomFit: TButton
+        Left = 0
+        Height = 20
+        Top = 116
+        Width = 166
+        Caption = 'Zoom fit'
+        TabOrder = 1
+        OnClick = Button_ZoomFitClick
+      end
     end
-    object SpinEdit_DpiY: TSpinEdit
-      Left = 94
-      Height = 23
-      Top = 38
-      Width = 56
-      Increment = 16
-      MaxValue = 99999
-      MinValue = 1
-      OnChange = SpinEdit_DPIChange
+    object Button_Print: TButton
+      Left = 8
+      Height = 20
+      Top = 347
+      Width = 176
+      Caption = 'Print!'
       TabOrder = 3
-      Value = 96
-      Visible = False
+      OnClick = Button_PrintClick
     end
-    object CheckBox_Ratio: TCheckBox
-      Left = 7
-      Height = 19
-      Top = 3
-      Width = 110
-      Caption = 'Keep aspect ratio'
-      Checked = True
-      OnChange = CheckBox_RatioChange
-      State = cbChecked
-      TabOrder = 4
-    end
-    object Button_ZoomFit: TButton
-      Left = 7
-      Height = 25
-      Top = 110
-      Width = 161
-      Caption = 'Zoom fit'
-      OnClick = Button_ZoomFitClick
-      TabOrder = 5
-    end
-  end
-  object Button_Print: TButton
-    Left = 46
-    Height = 25
-    Top = 368
-    Width = 103
-    Caption = 'Print!'
-    OnClick = Button_PrintClick
-    TabOrder = 5
   end
   object PrinterSetupDialog1: TPrinterSetupDialog
     Left = 288

+ 5 - 3
lazpaint/dialog/uprint.lrj

@@ -1,19 +1,21 @@
 {"version":1,"strings":[
 {"hash":5738580,"name":"tfprint.caption","sourcebytes":[80,114,105,110,116],"value":"Print"},
 {"hash":240643482,"name":"tfprint.label_printerandpaper.caption","sourcebytes":[80,114,105,110,116,101,114,32,97,110,100,32,112,97,112,101,114,58],"value":"Printer and paper:"},
+{"hash":46,"name":"tfprint.label_selectedprinterandpaper.caption","sourcebytes":[46],"value":"."},
 {"hash":175001086,"name":"tfprint.button_configureprinter.caption","sourcebytes":[67,111,110,102,105,103,117,114,101,46,46,46],"value":"Configure..."},
 {"hash":266476106,"name":"tfprint.label_orientation.caption","sourcebytes":[79,114,105,101,110,116,97,116,105,111,110,58],"value":"Orientation:"},
+{"hash":48,"name":"tfprint.combobox_orientation.text","sourcebytes":[48],"value":"0"},
 {"hash":59301891,"name":"tfprint.groupbox_margins.caption","sourcebytes":[77,97,114,103,105,110,115],"value":"Margins"},
-{"hash":5422458,"name":"tfprint.label_left.caption","sourcebytes":[76,101,102,116,58],"value":"Left:"},
 {"hash":374330,"name":"tfprint.label_top.caption","sourcebytes":[84,111,112,58],"value":"Top:"},
+{"hash":5422458,"name":"tfprint.label_left.caption","sourcebytes":[76,101,102,116,58],"value":"Left:"},
 {"hash":93314938,"name":"tfprint.label_right.caption","sourcebytes":[82,105,103,104,116,58],"value":"Right:"},
 {"hash":158053962,"name":"tfprint.label_bottom.caption","sourcebytes":[66,111,116,116,111,109,58],"value":"Bottom:"},
 {"hash":225617013,"name":"tfprint.groupbox_imagesize.caption","sourcebytes":[73,109,97,103,101,32,115,105,122,101],"value":"Image size"},
+{"hash":10706303,"name":"tfprint.checkbox_ratio.caption","sourcebytes":[75,101,101,112,32,97,115,112,101,99,116,32,114,97,116,105,111],"value":"Keep aspect ratio"},
 {"hash":46,"name":"tfprint.label_dpix.caption","sourcebytes":[46],"value":"."},
+{"hash":46,"name":"tfprint.label_dpiy.caption","sourcebytes":[46],"value":"."},
 {"hash":98548410,"name":"tfprint.label_width.caption","sourcebytes":[87,105,100,116,104,58],"value":"Width:"},
 {"hash":247455546,"name":"tfprint.label_height.caption","sourcebytes":[72,101,105,103,104,116,58],"value":"Height:"},
-{"hash":46,"name":"tfprint.label_dpiy.caption","sourcebytes":[46],"value":"."},
-{"hash":10706303,"name":"tfprint.checkbox_ratio.caption","sourcebytes":[75,101,101,112,32,97,115,112,101,99,116,32,114,97,116,105,111],"value":"Keep aspect ratio"},
 {"hash":106916628,"name":"tfprint.button_zoomfit.caption","sourcebytes":[90,111,111,109,32,102,105,116],"value":"Zoom fit"},
 {"hash":91817313,"name":"tfprint.button_print.caption","sourcebytes":[80,114,105,110,116,33],"value":"Print!"}
 ]}

+ 43 - 30
lazpaint/dialog/uprint.pas

@@ -8,41 +8,49 @@ interface
 uses
   Classes, SysUtils, FileUtil, PrintersDlgs, LResources, Forms, Controls,
   Graphics, Dialogs, StdCtrls, Spin, BGRAVirtualScreen, BGRABitmap,
-  BGRABitmapTypes, LazPaintType, BGRATransform;
+  BGRABitmapTypes, LazPaintType, BGRATransform, ExtCtrls;
 
 type
 
   { TFPrint }
 
   TFPrint = class(TForm)
-    BGRAVirtualScreen1: TBGRAVirtualScreen;
-    Button_ZoomFit: TButton;
+    Label_SelectedPrinterAndPaper: TLabel;
+    Panel1: TPanel;
+    Label_PrinterAndPaper: TLabel;
     Button_ConfigurePrinter: TButton;
-    Button_Print: TButton;
-    CheckBox_Ratio: TCheckBox;
+    Panel10: TPanel;
+    Panel2: TPanel;
+    Label_Orientation: TLabel;
     ComboBox_Orientation: TComboBox;
-    GroupBox_ImageSize: TGroupBox;
     GroupBox_Margins: TGroupBox;
-    Label_DpiX: TLabel;
-    Label_DpiY: TLabel;
-    Label_Left: TLabel;
-    Label_Width: TLabel;
-    Label_Height: TLabel;
+    Panel3: TPanel;
     Label_Top: TLabel;
+    SpinEdit_Top: TSpinEdit;
+    Panel8: TPanel;
+    Panel4: TPanel;
+    Label_Left: TLabel;
+    SpinEdit_Left: TSpinEdit;
     Label_Right: TLabel;
+    SpinEdit_Right: TSpinEdit;
+    Panel5: TPanel;
     Label_Bottom: TLabel;
-    Label_Orientation: TLabel;
-    Label_SelectedPrinterAndPaper: TLabel;
-    Label_PrinterAndPaper: TLabel;
-    PrinterSetupDialog1: TPrinterSetupDialog;
+    SpinEdit_Bottom: TSpinEdit;
+    Panel7: TPanel;
+    GroupBox_ImageSize: TGroupBox;
+    CheckBox_Ratio: TCheckBox;
+    Panel6: TPanel;
+    Label_DpiX: TLabel;
+    Label_DpiY: TLabel;
     SpinEdit_DpiX: TSpinEdit;
     SpinEdit_DpiY: TSpinEdit;
+    Label_Width: TLabel;
+    Label_Height: TLabel;
     SpinEdit_Width: TSpinEdit;
     SpinEdit_Height: TSpinEdit;
-    SpinEdit_Top: TSpinEdit;
-    SpinEdit_Bottom: TSpinEdit;
-    SpinEdit_Left: TSpinEdit;
-    SpinEdit_Right: TSpinEdit;
+    Button_ZoomFit: TButton;
+    Button_Print: TButton;
+    PrinterSetupDialog1: TPrinterSetupDialog;
     procedure BGRAVirtualScreen1MouseDown(Sender: TObject;
       Button: TMouseButton; {%H-}Shift: TShiftState; {%H-}X, {%H-}Y: Integer);
     procedure BGRAVirtualScreen1MouseMove(Sender: TObject; {%H-}Shift: TShiftState;
@@ -89,6 +97,7 @@ type
     property DpiY: single read GetDpiY;
   public
     Instance: TLazPaintCustomInstance;
+    BGRAVirtualScreen1: TBGRAVirtualScreen;
     { public declarations }
     procedure UpdatePrinterConfig;
     procedure UpdatePrintMargins;
@@ -203,14 +212,8 @@ end;
 { TFPrint }
 
 procedure TFPrint.FormShow(Sender: TObject);
-var gap: integer;
 begin
   FInitializing:= true;
-  gap := Label_SelectedPrinterAndPaper.Left-(Label_PrinterAndPaper.Left + Label_PrinterAndPaper.Width);
-  Label_PrinterAndPaper.AutoSize := true;
-  Label_PrinterAndPaper.Top := Label_SelectedPrinterAndPaper.Top+(Label_SelectedPrinterAndPaper.Height-Label_PrinterAndPaper.Height) div 2;
-  Label_SelectedPrinterAndPaper.Left := Label_PrinterAndPaper.Left + Label_PrinterAndPaper.Width+gap;
-  Label_SelectedPrinterAndPaper.Width := Button_ConfigurePrinter.Left - Label_SelectedPrinterAndPaper.Left - gap;
 
   ComboBox_Orientation.Items.Clear;
   ComboBox_Orientation.Items.Add(rsPortait);
@@ -398,14 +401,10 @@ begin
   if FLabelCount = nil then
   begin
     FLabelCount := TLabel.Create(self);
-    FLabelCount.Left := Button_Print.Left + Button_Print.Width;
-    FLabelCount.Top := Button_Print.Top;
     FLabelCount.AutoSize := false;
-    FLabelCount.Height := Button_Print.Height;
-    FLabelCount.Width := BGRAVirtualScreen1.Left - FLabelCount.Left;
     FLabelCount.Layout := tlCenter;
     FLabelCount.Alignment := taCenter;
-    InsertControl(FLabelCount);
+    Panel2.InsertControl(FLabelCount);
   end;
 
   FLabelCount.Caption:= '...';
@@ -568,7 +567,11 @@ procedure TFPrint.BGRAVirtualScreen1MouseMove(Sender: TObject;
   Shift: TShiftState; X, Y: Integer);
 var
   imgTopLeft,imgBottomRight: TPointF;
+  factor: double;
 begin
+  factor := GetCanvasScaleFactor;
+  X := Round(X*Factor);
+  Y := Round(Y*Factor);
   if FMovingImage then
   begin
     FWantedImagePos += PointF((x-FPrevMousePos.x)*invZoom.x,(y-FPrevMousePos.y)*invZoom.y);
@@ -626,8 +629,16 @@ end;
 procedure TFPrint.FormCreate(Sender: TObject);
 begin
   ScaleControl(Self,OriginalDPI);
+  BGRAVirtualScreen1 := TBGRAVirtualScreen.Create(self);
+  BGRAVirtualScreen1.Align := alClient;
   BGRAVirtualScreen1.BitmapAutoScale:= false;
   BGRAVirtualScreen1.Color := clDkGray;
+  BGRAVirtualScreen1.OnMouseDown := @BGRAVirtualScreen1MouseDown;
+  BGRAVirtualScreen1.OnMouseMove := @BGRAVirtualScreen1MouseMove;
+  BGRAVirtualScreen1.OnMouseUp := @BGRAVirtualScreen1MouseUp;
+  BGRAVirtualScreen1.OnRedraw := @BGRAVirtualScreen1Redraw;
+  BGRAVirtualScreen1.OnResize := @BGRAVirtualScreen1Resize;
+  InsertControl(BGRAVirtualScreen1);
 
   CheckSpinEdit(SpinEdit_DpiY);
   CheckSpinEdit(SpinEdit_DpiX);
@@ -638,6 +649,8 @@ begin
   CheckSpinEdit(SpinEdit_Width);
   CheckSpinEdit(SpinEdit_Height);
 
+  Panel8.Constraints.MinWidth := Label_Top.Width;
+  Panel7.Constraints.MinWidth := Label_Bottom.Width;
 end;
 
 {$R *.lfm}