diff --git a/applications/fpvviewer/fpvv_mainform.lfm b/applications/fpvviewer/fpvv_mainform.lfm index 842cee6ce..e13b1a418 100644 --- a/applications/fpvviewer/fpvv_mainform.lfm +++ b/applications/fpvviewer/fpvv_mainform.lfm @@ -8,7 +8,7 @@ object frmFPVViewer: TfrmFPVViewer ClientWidth = 485 OnCreate = FormCreate OnDestroy = FormDestroy - LCLVersion = '1.3' + LCLVersion = '1.5' object notebook: TNotebook Left = 0 Height = 424 @@ -104,7 +104,7 @@ object frmFPVViewer: TfrmFPVViewer end object spinScale: TFloatSpinEdit Left = 72 - Height = 23 + Height = 16 Top = 97 Width = 168 DecimalPlaces = 6 @@ -117,9 +117,9 @@ object frmFPVViewer: TfrmFPVViewer end object Label1: TLabel Left = 8 - Height = 15 + Height = 16 Top = 97 - Width = 46 + Width = 55 Caption = 'Scale by:' ParentColor = False end @@ -161,15 +161,15 @@ object frmFPVViewer: TfrmFPVViewer end object Label2: TLabel Left = 8 - Height = 15 + Height = 16 Top = 72 - Width = 73 + Width = 88 Caption = 'Y adjustment:' ParentColor = False end object spinAdjustY: TSpinEdit Left = 80 - Height = 23 + Height = 16 Top = 72 Width = 72 Increment = 100 @@ -180,7 +180,7 @@ object frmFPVViewer: TfrmFPVViewer end object spinAdjustX: TSpinEdit Left = 232 - Height = 23 + Height = 16 Top = 72 Width = 72 Increment = 50 @@ -191,9 +191,9 @@ object frmFPVViewer: TfrmFPVViewer end object Label3: TLabel Left = 160 - Height = 15 + Height = 16 Top = 72 - Width = 73 + Width = 88 Caption = 'X adjustment:' ParentColor = False end @@ -208,18 +208,18 @@ object frmFPVViewer: TfrmFPVViewer end object Label4: TLabel Left = 9 - Height = 15 + Height = 16 Top = 126 - Width = 128 + Width = 153 Caption = 'Force encoding on read:' ParentColor = False end object comboEncoding: TComboBox Left = 144 - Height = 23 + Height = 20 Top = 126 Width = 128 - ItemHeight = 15 + ItemHeight = 0 ItemIndex = 0 Items.Strings = ( 'Read from the file' @@ -255,17 +255,17 @@ object frmFPVViewer: TfrmFPVViewer end object labelFileEncoding: TLabel Left = 278 - Height = 15 + Height = 16 Top = 130 - Width = 74 + Width = 88 Caption = 'File encoding:' ParentColor = False end object checkForceWhiteBackground: TCheckBox Left = 9 - Height = 19 + Height = 18 Top = 152 - Width = 153 + Width = 177 Caption = 'Force white background?' TabOrder = 11 end @@ -298,9 +298,9 @@ object frmFPVViewer: TfrmFPVViewer end object checkShowPage: TCheckBox Left = 216 - Height = 19 + Height = 18 Top = 152 - Width = 78 + Width = 90 Caption = 'Show Page' TabOrder = 15 end diff --git a/applications/fpvviewer/fpvv_mainform.pas b/applications/fpvviewer/fpvv_mainform.pas index 61c5b900e..36d8b9132 100644 --- a/applications/fpvviewer/fpvv_mainform.pas +++ b/applications/fpvviewer/fpvv_mainform.pas @@ -109,13 +109,16 @@ begin Vec := TvVectorialDocument.Create; try + // some formats like HTML need an input of control size to render themselves + Vec.Width := Drawer.Width; + Vec.Height := Drawer.Height; + // If we desire, force a encoding for the read operation if comboEncoding.ItemIndex > 0 then Vec.ForcedEncodingOnRead := comboEncoding.Text else Vec.ForcedEncodingOnRead := ''; Vec.ReadFromFile(editFileName.FileName); - // Show document properties labelFileEncoding.Caption := 'File encoding: ' + Vec.Encoding; @@ -157,6 +160,10 @@ begin spinScale.Value, -1 * spinScale.Value); Drawer.Invalidate; + + // Show debug tokens + TokensTreeView.Items.Clear; + Vec.GenerateDebugTree(@FPVDebugAddItemProc); finally Vec.Free; end; @@ -326,8 +333,13 @@ begin notebook.PageIndex := 1; - Vec := TvVectorialDocument.Create; + {Vec := TvVectorialDocument.Create; try + // some formats like HTML need an input of control size to render themselves + Vec.Width := Drawer.Width; + Vec.Height := Drawer.Height; + + // read Vec.ReadFromFile(editFileName.FileName); // Generate the positioning info @@ -341,7 +353,7 @@ begin Vec.GenerateDebugTree(@FPVDebugAddItemProc); finally Vec.Free; - end; + end; } end; procedure TfrmFPVViewer.buttonAdjustClick(Sender: TObject); diff --git a/applications/fpvviewer/fpvviewer.lpi b/applications/fpvviewer/fpvviewer.lpi index 0383bf6ed..ebac3e7e3 100644 --- a/applications/fpvviewer/fpvviewer.lpi +++ b/applications/fpvviewer/fpvviewer.lpi @@ -14,7 +14,7 @@ - + @@ -26,12 +26,6 @@ - - - - - - @@ -55,16 +49,33 @@ - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + @@ -96,7 +107,6 @@ - @@ -109,17 +119,14 @@ - - - @@ -139,12 +146,6 @@ - - - - - -