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;
{ 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 );

View File

@ -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)

View File

@ -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}

View File

@ -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;

View File

@ -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;

View File

@ -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));

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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;