From ce6715ed785eaf7c7f3915bbd5fbc92c39e9473a Mon Sep 17 00:00:00 2001 From: Juha Date: Sun, 26 Sep 2021 21:40:16 +0300 Subject: [PATCH] Correct spelling errors for "Width" in various units. Issue #39402, patch by Don Siders. --- components/aggpas/src/agg_conv_stroke.pas | 4 ++-- components/synedit/syntextdrawer.pp | 2 +- components/synedit/test/testbasicsynedit.pas | 22 +++++++++---------- examples/notebku.pp | 2 +- lcl/grids.pas | 2 +- lcl/interfaces/win32/win32winapi.inc | 2 +- .../win32/win32wscustomlistview.inc | 2 +- .../wince/wincewscustomlistview.inc | 2 +- tools/glazres/glazresmain.lfm | 13 +++++------ tools/glazres/glazresmain.pp | 2 +- 10 files changed, 25 insertions(+), 28 deletions(-) diff --git a/components/aggpas/src/agg_conv_stroke.pas b/components/aggpas/src/agg_conv_stroke.pas index 901aff2cf6..bc252170b0 100644 --- a/components/aggpas/src/agg_conv_stroke.pas +++ b/components/aggpas/src/agg_conv_stroke.pas @@ -170,7 +170,7 @@ begin end; -{ WIDHT_ } +{ WIDTH_ } procedure conv_stroke.width_; begin vcgen_stroke_ptr(generator ).width_(w ); @@ -307,7 +307,7 @@ begin end; -{ WIDHT_ } +{ WIDTH_ } procedure conv_stroke_math.width_; begin vcgen_stroke_math_ptr(generator ).width_(w ); diff --git a/components/synedit/syntextdrawer.pp b/components/synedit/syntextdrawer.pp index aaef893ce8..59dd535266 100644 --- a/components/synedit/syntextdrawer.pp +++ b/components/synedit/syntextdrawer.pp @@ -672,7 +672,7 @@ begin // TextMetric may fail, because: // tmMaxCharWidth may be the width of a single Width (Latin) char, like "M" // or a double Width (Chinese) char - // tmAveCharWidth is to small for proprtional fonts, as we need he witdh of the + // tmAveCharWidth is to small for proprtional fonts, as we need he width of the // widest Latin char ("M"). // Even Monospace fonts, may have a smaller tmAveCharWidth (seen with Japanese) diff --git a/components/synedit/test/testbasicsynedit.pas b/components/synedit/test/testbasicsynedit.pas index 56b96c7398..d597008ff9 100644 --- a/components/synedit/test/testbasicsynedit.pas +++ b/components/synedit/test/testbasicsynedit.pas @@ -475,22 +475,22 @@ begin // May change in future. overwrite only one char InsertFlag := True; CaretPEol := False; - DoTest('normal line - 3 byte full witdh - BOL', 1, 1, 'あ', 4, 1, [1,'あabc'], '吾', 7,1, [1,'あ吾abc']); - DoTest('normal line - 3 byte full witdh - mid', 2, 1, 'あ', 5, 1, [1,'aあbc'], '吾', 8,1, [1,'aあ吾bc']); - DoTest('normal line - 3 byte full witdh - EOL', 4, 1, 'あ', 7, 1, [1,'abcあ'], '吾',10,1, [1,'abcあ吾']); + DoTest('normal line - 3 byte full width - BOL', 1, 1, 'あ', 4, 1, [1,'あabc'], '吾', 7,1, [1,'あ吾abc']); + DoTest('normal line - 3 byte full width - mid', 2, 1, 'あ', 5, 1, [1,'aあbc'], '吾', 8,1, [1,'aあ吾bc']); + DoTest('normal line - 3 byte full width - EOL', 4, 1, 'あ', 7, 1, [1,'abcあ'], '吾',10,1, [1,'abcあ吾']); CaretPEol := True; - DoTest('normal line - 3 byte full witdh - EOL', 4, 1, 'あ', 7, 1, [1,'abcあ'], '吾',10,1, [1,'abcあ吾']); - DoTest('normal line - 3 byte full witdh - Past', 6, 1, 'あ', 9, 1, [1,'abc あ'], '吾',12,1, [1,'abc あ吾']); + DoTest('normal line - 3 byte full width - EOL', 4, 1, 'あ', 7, 1, [1,'abcあ'], '吾',10,1, [1,'abcあ吾']); + DoTest('normal line - 3 byte full width - Past', 6, 1, 'あ', 9, 1, [1,'abc あ'], '吾',12,1, [1,'abc あ吾']); InsertFlag := False; CaretPEol := False; - DoTest('normal line - 3 byte full witdh - BOL', 1, 1, 'あ', 4, 1, [1,'あbc'], '吾', 7,1, [1,'あ吾c']); - DoTest('normal line - 3 byte full witdh - mid', 2, 1, 'あ', 5, 1, [1,'aあc'], '吾', 8,1, [1,'aあ吾']); - DoTest('normal line - 3 byte full witdh - mid', 3, 1, 'あ', 6, 1, [1,'abあ'], '吾', 9,1, [1,'abあ吾']); - DoTest('normal line - 3 byte full witdh - EOL', 4, 1, 'あ', 7, 1, [1,'abcあ'], '吾',10,1, [1,'abcあ吾']); + DoTest('normal line - 3 byte full width - BOL', 1, 1, 'あ', 4, 1, [1,'あbc'], '吾', 7,1, [1,'あ吾c']); + DoTest('normal line - 3 byte full width - mid', 2, 1, 'あ', 5, 1, [1,'aあc'], '吾', 8,1, [1,'aあ吾']); + DoTest('normal line - 3 byte full width - mid', 3, 1, 'あ', 6, 1, [1,'abあ'], '吾', 9,1, [1,'abあ吾']); + DoTest('normal line - 3 byte full width - EOL', 4, 1, 'あ', 7, 1, [1,'abcあ'], '吾',10,1, [1,'abcあ吾']); CaretPEol := True; - DoTest('normal line - 3 byte full witdh - EOL', 4, 1, 'あ', 7, 1, [1,'abcあ'], '吾',10,1, [1,'abcあ吾']); - DoTest('normal line - 3 byte full witdh - Past', 6, 1, 'あ', 9, 1, [1,'abc あ'], '吾',12,1, [1,'abc あ吾']); + DoTest('normal line - 3 byte full width - EOL', 4, 1, 'あ', 7, 1, [1,'abcあ'], '吾',10,1, [1,'abcあ吾']); + DoTest('normal line - 3 byte full width - Past', 6, 1, 'あ', 9, 1, [1,'abc あ'], '吾',12,1, [1,'abc あ吾']); {%endregion} {%endregion} diff --git a/examples/notebku.pp b/examples/notebku.pp index f2536eb9ea..a89fb60395 100644 --- a/examples/notebku.pp +++ b/examples/notebku.pp @@ -263,7 +263,7 @@ begin OnClick := @Button6Click; Width := 150; Height := 23; - left := (250 {Parent.Widht} - Width) div 2; + left := (250 {Parent.Width} - Width) div 2; top := 190; Caption := 'Set Tab Position'; Show; diff --git a/lcl/grids.pas b/lcl/grids.pas index bbdf40314b..5d1901d4ab 100644 --- a/lcl/grids.pas +++ b/lcl/grids.pas @@ -3569,7 +3569,7 @@ begin Result:=Rect(0,0,0,0); end; -// The visible grid Depends on TopLeft and ClientWidht,ClientHeight, +// The visible grid Depends on TopLeft and ClientWidth,ClientHeight, // Col/Row Count, So it Should be called inmediately after changing // those properties. function TCustomGrid.GetVisibleGrid: TRect; diff --git a/lcl/interfaces/win32/win32winapi.inc b/lcl/interfaces/win32/win32winapi.inc index 98e0b7a953..00f7680e02 100644 --- a/lcl/interfaces/win32/win32winapi.inc +++ b/lcl/interfaces/win32/win32winapi.inc @@ -3193,7 +3193,7 @@ begin To complicate matters, if Handle is correct and MinItemsWidth = 0, then upon success the result will also be 0. This means that inside this function, a result value of 0 can be valid or invalid, and when - MinItemsWidht = 0, there is no way of telling (only end-user will see the result on screen). + MinItemsWidth = 0, there is no way of telling (only end-user will see the result on screen). For now we assume that a zero result is valid if MinItemsWidth = 0. } Result := Result and ((LR <> CB_ERR) and ((LR <> 0)) xor (MinItemsWidth = 0)); diff --git a/lcl/interfaces/win32/win32wscustomlistview.inc b/lcl/interfaces/win32/win32wscustomlistview.inc index a960e096f6..5611d7bcd3 100644 --- a/lcl/interfaces/win32/win32wscustomlistview.inc +++ b/lcl/interfaces/win32/win32wscustomlistview.inc @@ -312,7 +312,7 @@ var lvc: TLvColumn; begin Result := -1; - // this implementation uses columnwidht = 0 for invisible + // this implementation uses columnwidth = 0 for invisible // so fallback to default (= AColumn.FWidth) // Don't return AColumn.Width, this will cause a loop if not AColumn.Visible then Exit; diff --git a/lcl/interfaces/wince/wincewscustomlistview.inc b/lcl/interfaces/wince/wincewscustomlistview.inc index 7966d6031e..1bcbe9c567 100644 --- a/lcl/interfaces/wince/wincewscustomlistview.inc +++ b/lcl/interfaces/wince/wincewscustomlistview.inc @@ -86,7 +86,7 @@ var lvc: TLvColumn; begin Result := -1; - // this implementation uses columnwidht = 0 for invisible + // this implementation uses columnwidth = 0 for invisible // so fallback to default (= AColumn.FWidth) // Don't return AColumn.Width, this will cause a loop if not AColumn.Visible then Exit; diff --git a/tools/glazres/glazresmain.lfm b/tools/glazres/glazresmain.lfm index a2e718aca8..82d935a3dc 100644 --- a/tools/glazres/glazresmain.lfm +++ b/tools/glazres/glazresmain.lfm @@ -184,14 +184,13 @@ object GLazResForm: TGLazResForm OnClose = FormClose OnCreate = FormCreate OnShow = FormShow - LCLVersion = '1.7' + LCLVersion = '2.3.0.0' object LrsLabel: TLabel Left = 16 Height = 17 Top = 14 Width = 154 Caption = 'Lazarus Resource Filename' - ParentColor = False end object AddAnyBtn: TBitBtn Left = 16 @@ -267,7 +266,6 @@ object GLazResForm: TGLazResForm Top = 64 Width = 86 Caption = 'Files to include' - ParentColor = False end object DeleteBtn: TBitBtn Left = 216 @@ -392,7 +390,6 @@ object GLazResForm: TGLazResForm Top = 304 Width = 56 Caption = 'Messages' - ParentColor = False end object AddImgBtn: TBitBtn Left = 112 @@ -443,12 +440,12 @@ object GLazResForm: TGLazResForm end object OpenDialog: TOpenDialog Options = [ofAllowMultiSelect, ofEnableSizing, ofViewDetail] - left = 64 - top = 400 + Left = 64 + Top = 400 end object OpenPictureDialog: TOpenPictureDialog Options = [ofAllowMultiSelect, ofPathMustExist, ofFileMustExist, ofEnableSizing, ofViewDetail] - left = 232 - top = 400 + Left = 232 + Top = 400 end end diff --git a/tools/glazres/glazresmain.pp b/tools/glazres/glazresmain.pp index 7f157a6ac9..fff169db09 100644 --- a/tools/glazres/glazresmain.pp +++ b/tools/glazres/glazresmain.pp @@ -161,7 +161,7 @@ begin MaybeEnableButtons; OnResize := @FormResize; //Using QueueAsyncCall delays the layout until the form is shown, - //before that ClientWidht may have wrong value (depending on widgetset and windowmanager) + //before that ClientWidth may have wrong value (depending on widgetset and windowmanager) Application.QueueAsyncCall(@ResizeControls,0); end;