From 0f9f6cb8b10f9c5752bb4dcf577153a6d6907a25 Mon Sep 17 00:00:00 2001 From: wp Date: Tue, 5 Nov 2019 18:57:11 +0000 Subject: [PATCH] TAChart: AutoSize controls in printdemo, replace chart background colors by clWhite for correct printing in gtk2. git-svn-id: trunk@62202 - --- components/tachart/demo/print/Main.lfm | 45 ++++++++++++++++----- components/tachart/demo/print/printdemo.lpi | 13 +++--- components/tachart/demo/print/printdemo.lpr | 3 +- 3 files changed, 40 insertions(+), 21 deletions(-) diff --git a/components/tachart/demo/print/Main.lfm b/components/tachart/demo/print/Main.lfm index 9ec45161e6..4e9db8a986 100644 --- a/components/tachart/demo/print/Main.lfm +++ b/components/tachart/demo/print/Main.lfm @@ -6,10 +6,10 @@ object Form1: TForm1 Caption = 'Form1' ClientHeight = 310 ClientWidth = 398 - LCLVersion = '1.7' + LCLVersion = '2.1.0.0' object Chart1: TChart Left = 0 - Height = 272 + Height = 274 Top = 0 Width = 398 AxisList = < @@ -17,14 +17,19 @@ object Form1: TForm1 Marks.Distance = 10 Marks.LabelFont.Height = -13 Marks.Frame.Style = psSolid + Marks.LabelBrush.Style = bsClear Minors = <> Title.LabelFont.Orientation = 900 + Title.LabelBrush.Style = bsClear end item Alignment = calBottom Marks.LabelFont.Height = -13 + Marks.LabelBrush.Style = bsClear Minors = <> + Title.LabelBrush.Style = bsClear end> + BackColor = clWhite Foot.Brush.Color = clBtnFace Foot.Font.Color = clBlue Title.Brush.Color = clBtnFace @@ -33,42 +38,60 @@ object Form1: TForm1 'TAChart' ) Align = alClient + Color = clWhite object Chart1LineSeries1: TLineSeries Source = RandomChartSource1 end end object Panel1: TPanel Left = 0 - Height = 38 - Top = 272 + Height = 36 + Top = 274 Width = 398 Align = alBottom - ClientHeight = 38 + AutoSize = True + ClientHeight = 36 ClientWidth = 398 TabOrder = 1 object Print: TButton - Left = 8 + AnchorSideLeft.Control = Panel1 + AnchorSideTop.Control = Panel1 + AnchorSideTop.Side = asrCenter + Left = 5 Height = 25 Top = 6 - Width = 75 + Width = 51 + AutoSize = True + BorderSpacing.Around = 4 Caption = 'Print' OnClick = PrintClick TabOrder = 0 end object PrintCanvas: TButton - Left = 256 + AnchorSideLeft.Control = PrintScaledPen + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = Panel1 + AnchorSideTop.Side = asrCenter + Left = 221 Height = 25 Top = 6 - Width = 115 + Width = 110 + AutoSize = True + BorderSpacing.Left = 4 Caption = 'Print via Canvas' OnClick = PrintClick TabOrder = 1 end object PrintScaledPen: TButton - Left = 88 + AnchorSideLeft.Control = Print + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = Panel1 + AnchorSideTop.Side = asrCenter + Left = 60 Height = 25 Top = 6 - Width = 163 + Width = 157 + AutoSize = True Caption = 'Print w/ scaled penwidth' OnClick = PrintClick TabOrder = 2 diff --git a/components/tachart/demo/print/printdemo.lpi b/components/tachart/demo/print/printdemo.lpi index a16a39c372..07802cbcd3 100644 --- a/components/tachart/demo/print/printdemo.lpi +++ b/components/tachart/demo/print/printdemo.lpi @@ -1,11 +1,13 @@ - + + + + - @@ -44,7 +46,7 @@ - + @@ -56,11 +58,6 @@ - - - - - diff --git a/components/tachart/demo/print/printdemo.lpr b/components/tachart/demo/print/printdemo.lpr index be4d1ea4dd..df8f696c89 100644 --- a/components/tachart/demo/print/printdemo.lpr +++ b/components/tachart/demo/print/printdemo.lpr @@ -7,8 +7,7 @@ uses cthreads, {$ENDIF}{$ENDIF} Interfaces, // this includes the LCL widgetset - Forms, printer4lazarus, tachartlazaruspkg, Main, tachartprint, taprint - { you can add units after this }; + Forms, printer4lazarus, tachartlazaruspkg, Main, tachartprint; {$R *.res}