Correct spelling errors for "Width" in various units. Issue #39402, patch by Don Siders.

This commit is contained in:
Juha 2021-09-26 21:40:16 +03:00
parent 45a590ed0b
commit ce6715ed78
10 changed files with 25 additions and 28 deletions

View File

@ -170,7 +170,7 @@ begin
end; end;
{ WIDHT_ } { WIDTH_ }
procedure conv_stroke.width_; procedure conv_stroke.width_;
begin begin
vcgen_stroke_ptr(generator ).width_(w ); vcgen_stroke_ptr(generator ).width_(w );
@ -307,7 +307,7 @@ begin
end; end;
{ WIDHT_ } { WIDTH_ }
procedure conv_stroke_math.width_; procedure conv_stroke_math.width_;
begin begin
vcgen_stroke_math_ptr(generator ).width_(w ); vcgen_stroke_math_ptr(generator ).width_(w );

View File

@ -672,7 +672,7 @@ begin
// TextMetric may fail, because: // TextMetric may fail, because:
// tmMaxCharWidth may be the width of a single Width (Latin) char, like "M" // tmMaxCharWidth may be the width of a single Width (Latin) char, like "M"
// or a double Width (Chinese) char // 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"). // widest Latin char ("M").
// Even Monospace fonts, may have a smaller tmAveCharWidth (seen with Japanese) // Even Monospace fonts, may have a smaller tmAveCharWidth (seen with Japanese)

View File

@ -475,22 +475,22 @@ begin
// May change in future. overwrite only one char // May change in future. overwrite only one char
InsertFlag := True; InsertFlag := True;
CaretPEol := False; 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 width - 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 width - 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 - EOL', 4, 1, 'あ', 7, 1, [1,'abcあ'], '吾',10,1, [1,'abcあ吾']);
CaretPEol := True; 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 width - 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 - Past', 6, 1, 'あ', 9, 1, [1,'abc あ'], '吾',12,1, [1,'abc あ吾']);
InsertFlag := False; InsertFlag := False;
CaretPEol := 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 width - 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 width - 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 width - 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 - EOL', 4, 1, 'あ', 7, 1, [1,'abcあ'], '吾',10,1, [1,'abcあ吾']);
CaretPEol := True; 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 width - 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 - Past', 6, 1, 'あ', 9, 1, [1,'abc あ'], '吾',12,1, [1,'abc あ吾']);
{%endregion} {%endregion}
{%endregion} {%endregion}

View File

@ -263,7 +263,7 @@ begin
OnClick := @Button6Click; OnClick := @Button6Click;
Width := 150; Width := 150;
Height := 23; Height := 23;
left := (250 {Parent.Widht} - Width) div 2; left := (250 {Parent.Width} - Width) div 2;
top := 190; top := 190;
Caption := 'Set Tab Position'; Caption := 'Set Tab Position';
Show; Show;

View File

@ -3569,7 +3569,7 @@ begin
Result:=Rect(0,0,0,0); Result:=Rect(0,0,0,0);
end; 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 // Col/Row Count, So it Should be called inmediately after changing
// those properties. // those properties.
function TCustomGrid.GetVisibleGrid: TRect; function TCustomGrid.GetVisibleGrid: TRect;

View File

@ -3193,7 +3193,7 @@ begin
To complicate matters, if Handle is correct and MinItemsWidth = 0, then upon success To complicate matters, if Handle is correct and MinItemsWidth = 0, then upon success
the result will also be 0. the result will also be 0.
This means that inside this function, a result value of 0 can be valid or invalid, and when 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. 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)); Result := Result and ((LR <> CB_ERR) and ((LR <> 0)) xor (MinItemsWidth = 0));

View File

@ -312,7 +312,7 @@ var
lvc: TLvColumn; lvc: TLvColumn;
begin begin
Result := -1; Result := -1;
// this implementation uses columnwidht = 0 for invisible // this implementation uses columnwidth = 0 for invisible
// so fallback to default (= AColumn.FWidth) // so fallback to default (= AColumn.FWidth)
// Don't return AColumn.Width, this will cause a loop // Don't return AColumn.Width, this will cause a loop
if not AColumn.Visible then Exit; if not AColumn.Visible then Exit;

View File

@ -86,7 +86,7 @@ var
lvc: TLvColumn; lvc: TLvColumn;
begin begin
Result := -1; Result := -1;
// this implementation uses columnwidht = 0 for invisible // this implementation uses columnwidth = 0 for invisible
// so fallback to default (= AColumn.FWidth) // so fallback to default (= AColumn.FWidth)
// Don't return AColumn.Width, this will cause a loop // Don't return AColumn.Width, this will cause a loop
if not AColumn.Visible then Exit; if not AColumn.Visible then Exit;

View File

@ -184,14 +184,13 @@ object GLazResForm: TGLazResForm
OnClose = FormClose OnClose = FormClose
OnCreate = FormCreate OnCreate = FormCreate
OnShow = FormShow OnShow = FormShow
LCLVersion = '1.7' LCLVersion = '2.3.0.0'
object LrsLabel: TLabel object LrsLabel: TLabel
Left = 16 Left = 16
Height = 17 Height = 17
Top = 14 Top = 14
Width = 154 Width = 154
Caption = 'Lazarus Resource Filename' Caption = 'Lazarus Resource Filename'
ParentColor = False
end end
object AddAnyBtn: TBitBtn object AddAnyBtn: TBitBtn
Left = 16 Left = 16
@ -267,7 +266,6 @@ object GLazResForm: TGLazResForm
Top = 64 Top = 64
Width = 86 Width = 86
Caption = 'Files to include' Caption = 'Files to include'
ParentColor = False
end end
object DeleteBtn: TBitBtn object DeleteBtn: TBitBtn
Left = 216 Left = 216
@ -392,7 +390,6 @@ object GLazResForm: TGLazResForm
Top = 304 Top = 304
Width = 56 Width = 56
Caption = 'Messages' Caption = 'Messages'
ParentColor = False
end end
object AddImgBtn: TBitBtn object AddImgBtn: TBitBtn
Left = 112 Left = 112
@ -443,12 +440,12 @@ object GLazResForm: TGLazResForm
end end
object OpenDialog: TOpenDialog object OpenDialog: TOpenDialog
Options = [ofAllowMultiSelect, ofEnableSizing, ofViewDetail] Options = [ofAllowMultiSelect, ofEnableSizing, ofViewDetail]
left = 64 Left = 64
top = 400 Top = 400
end end
object OpenPictureDialog: TOpenPictureDialog object OpenPictureDialog: TOpenPictureDialog
Options = [ofAllowMultiSelect, ofPathMustExist, ofFileMustExist, ofEnableSizing, ofViewDetail] Options = [ofAllowMultiSelect, ofPathMustExist, ofFileMustExist, ofEnableSizing, ofViewDetail]
left = 232 Left = 232
top = 400 Top = 400
end end
end end

View File

@ -161,7 +161,7 @@ begin
MaybeEnableButtons; MaybeEnableButtons;
OnResize := @FormResize; OnResize := @FormResize;
//Using QueueAsyncCall delays the layout until the form is shown, //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); Application.QueueAsyncCall(@ResizeControls,0);
end; end;