From 0ef3a22138b88fc0747ae25990fe5122d0949ece Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Thu, 30 Aug 2018 15:40:32 +0000 Subject: [PATCH] spready: Adapt to recent Align changes of child controls in TToolbar git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6628 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- applications/spready/smain.lfm | 94 ++++++++++++++++---------------- applications/spready/smain.pas | 13 +++-- applications/spready/spready.lpi | 1 + 3 files changed, 56 insertions(+), 52 deletions(-) diff --git a/applications/spready/smain.lfm b/applications/spready/smain.lfm index 04d5d0268..240b92cb8 100644 --- a/applications/spready/smain.lfm +++ b/applications/spready/smain.lfm @@ -16,8 +16,8 @@ object MainForm: TMainForm LCLVersion = '1.9.0.0' object WorkbookTabControl: TsWorkbookTabControl Left = 0 - Height = 606 - Top = 83 + Height = 609 + Top = 80 Width = 792 TabIndex = 0 Tabs.Strings = ( @@ -28,11 +28,12 @@ object MainForm: TMainForm WorkbookSource = WorkbookSource object WorksheetGrid: TsWorksheetGrid Left = 2 - Height = 581 + Height = 584 Top = 23 Width = 788 AutoCalc = True EditorLineMode = elmMultiLine + FixedColWidth = 57 FrozenCols = 0 FrozenRows = 0 ReadFormulas = True @@ -59,8 +60,8 @@ object MainForm: TMainForm end object InspectorTabControl: TTabControl Left = 797 - Height = 606 - Top = 83 + Height = 609 + Top = 80 Width = 323 MultiLine = True OnChange = InspectorTabControlChange @@ -78,7 +79,7 @@ object MainForm: TMainForm Visible = False object Inspector: TsSpreadsheetInspector Left = 2 - Height = 561 + Height = 564 Top = 43 Width = 319 Align = alClient @@ -98,11 +99,11 @@ object MainForm: TMainForm 'Options=boAutoCalc, boCalcBeforeSaving, boReadFormulas' '(-) FormatSettings=' ' ThousandSeparator=.' - ' DecimalSeparator=,' + ' DecimalSeparator=.' ' ListSeparator=;' ' DateSeparator=.' ' TimeSeparator=:' - ' ShortDateFormat=dd.MM.yyyy' + ' ShortDateFormat=MM.yy' ' LongDateFormat=dddd, d. MMMM yyyy' ' ShortTimeFormat=hh:nn' ' LongTimeFormat=hh:nn:ss' @@ -146,8 +147,8 @@ object MainForm: TMainForm end object InspectorSplitter: TSplitter Left = 792 - Height = 606 - Top = 83 + Height = 609 + Top = 80 Width = 5 Align = alRight ResizeAnchor = akRight @@ -602,65 +603,64 @@ object MainForm: TMainForm Action = AcFileNew end end - object ToolBar3: TToolBar + object Splitter3: TSplitter + Cursor = crVSplit Left = 0 - Height = 28 + Height = 5 + Top = 75 + Width = 1120 + Align = alTop + ResizeAnchor = akTop + end + object Panel3: TPanel + Left = 0 + Height = 25 Top = 50 Width = 1120 - AutoSize = True - Caption = 'ToolBar3' - Constraints.MinHeight = 28 - EdgeBorders = [ebBottom] - TabOrder = 5 - OnResize = ToolBar3Resize + Align = alTop + BevelOuter = bvNone + ClientHeight = 25 + ClientWidth = 1120 + TabOrder = 6 object Panel2: TPanel - Left = 1 - Height = 26 + Left = 2 + Height = 25 Top = 0 - Width = 138 + Width = 150 Align = alLeft + BorderSpacing.Left = 2 BevelOuter = bvNone - ClientHeight = 26 - ClientWidth = 138 + ClientHeight = 25 + ClientWidth = 150 TabOrder = 0 object CellIndicator: TsCellIndicator Left = 0 Height = 23 Top = 0 - Width = 138 + Width = 150 WorkbookSource = WorkbookSource Align = alTop TabOrder = 0 Text = 'A1' end end - object CellEdit: TsCellEdit - AnchorSideRight.Side = asrBottom - Left = 144 - Height = 23 - Top = 0 - Width = 852 - Align = alClient - BorderSpacing.Right = 2 - BorderSpacing.Bottom = 3 - TabOrder = 1 - WorkbookSource = WorkbookSource - end object Splitter2: TSplitter - Left = 139 - Height = 26 + Left = 152 + Height = 25 Top = 0 Width = 5 end - end - object Splitter3: TSplitter - Cursor = crVSplit - Left = 0 - Height = 5 - Top = 78 - Width = 1120 - Align = alTop - ResizeAnchor = akTop + object CellEdit: TsCellEdit + AnchorSideRight.Side = asrBottom + Left = 157 + Height = 23 + Top = 0 + Width = 963 + Align = alClient + BorderSpacing.Bottom = 2 + TabOrder = 2 + WorkbookSource = WorkbookSource + end end object WorkbookSource: TsWorkbookSource AutoDetectFormat = False diff --git a/applications/spready/smain.pas b/applications/spready/smain.pas index 72c4eb9b3..8eabc7a6c 100644 --- a/applications/spready/smain.pas +++ b/applications/spready/smain.pas @@ -6,9 +6,9 @@ interface uses Classes, SysUtils, FileUtil, mrumanager, Forms, Controls, Graphics, Dialogs, - ExtCtrls, ComCtrls, ActnList, Menus, StdActns, Buttons, Grids, types, - fpstypes, fpspreadsheet, fpspreadsheetctrls, fpspreadsheetgrid, fpsActions, - fpsAllFormats, fpsSYLK, xlsxml, xlsxooxml_crypto; + ExtCtrls, ComCtrls, ActnList, Menus, StdActns, Buttons, Grids, StdCtrls, + types, fpstypes, fpspreadsheet, fpspreadsheetctrls, fpspreadsheetgrid, + fpsActions, fpsAllFormats, fpsSYLK, xlsxml, xlsxooxml_crypto; // NOTE: // In order to use the decrypting xlsx reader put xlsxooxlm_cryto after // xlsxooxml or fpsAllforamts. @@ -282,6 +282,7 @@ type AcNumFormatCurrency: TsNumberFormatAction; AcNumFormatCurrencyRed: TsNumberFormatAction; Panel2: TPanel; + Panel3: TPanel; PuCellProtection: TPopupMenu; PuRecentFiles: TPopupMenu; PuPaste: TPopupMenu; @@ -363,7 +364,6 @@ type AcZoom500: TsWorksheetZoomAction; AcZoomMore: TsWorksheetZoomAction; ToolBar2: TToolBar; - ToolBar3: TToolBar; ToolButton1: TToolButton; ToolButton11: TToolButton; ToolButton12: TToolButton; @@ -1112,6 +1112,9 @@ begin AcFileSaveAs.Dialog.Filter := GetFileFormatFilter('|', ';', faWrite, priorityFormats); FSaveFormats := GetSpreadFormats(faWrite, priorityFormats); + Panel2.Height := CellIndicator.Height + 2; + Panel3.Constraints.MinHeight := CellIndicator.Height + 2; + {$IFDEF WINDOWS} if Win32MajorVersion >= 10 then begin // avoid the ugly themed grid of Win10... @@ -1173,7 +1176,7 @@ end; procedure TMainForm.ToolBar3Resize(Sender: TObject); begin - CellEdit.Width := ToolBar3.ClientWidth - CellEdit.Left - 4; + // CellEdit.Width := ToolBar3.ClientWidth - CellEdit.Left - 4; end; procedure TMainForm.LoadFile(const AFileName: String); diff --git a/applications/spready/spready.lpi b/applications/spready/spready.lpi index d7674ccd4..6103b8846 100644 --- a/applications/spready/spready.lpi +++ b/applications/spready/spready.lpi @@ -175,6 +175,7 @@ +