mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-06 18:58:12 +02:00
LCL/TSpeedButton: Layout improvements when AutoSize = false
This commit is contained in:
parent
d869f6a082
commit
8f6a59c9a2
@ -801,14 +801,23 @@ begin
|
||||
case CurLayout of
|
||||
blGlyphLeft:
|
||||
if (Margin >= 0) and (Spacing >= 0) then
|
||||
TextRect.Right := PaintRect.Right - Margin;
|
||||
begin
|
||||
TextRect.Right := PaintRect.Right;
|
||||
if Alignment = taRightJustify then dec(TextRect.Right, Margin);
|
||||
end;
|
||||
blGlyphRight:
|
||||
if (Margin >= 0) and (Spacing >= 0) then
|
||||
TextRect.Right := PaintRect.Left + OffsetGlyph.X - Spacing;
|
||||
blGlyphTop,
|
||||
blGlyphBottom:
|
||||
if Margin >= 0 then
|
||||
begin
|
||||
TextRect.Right := PaintRect.Right;
|
||||
case Alignment of
|
||||
taLeftJustify: inc(TextRect.Left, Margin);
|
||||
taRightJustify: dec(TextRect.Right, Margin);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
TextFlags := DT_TOP or cAlignment[BidiFlipAlignment(FAlignment, UseRightToLeftAlignment)]; // or DT_NOCLIP;
|
||||
|
Loading…
Reference in New Issue
Block a user