mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 00:02:03 +02:00
LCL/SpeedButton: Fix position of caption when no glyph is present.
This commit is contained in:
parent
df99227b6b
commit
11b92b26c8
@ -720,11 +720,11 @@ begin
|
||||
OffsetGlyph.X:= M;
|
||||
OffsetGlyph.Y:= (ClientSize.cy - GlyphHeight) div 2;
|
||||
if (Margin >= 0) and (Spacing >= 0) then
|
||||
OffsetCap.X := OffsetGlyph.X + GlyphWidth + Spacing
|
||||
OffsetCap.X := OffsetGlyph.X + GlyphWidth + S
|
||||
else
|
||||
begin
|
||||
if Spacing >= 0 then
|
||||
OffsetCap.X := OffsetGlyph.X + GlyphWidth + Spacing
|
||||
OffsetCap.X := OffsetGlyph.X + GlyphWidth + S
|
||||
else
|
||||
OffsetCap.X := (OffsetGlyph.X + ClientSize.CX - TextSize.CX) div 2;
|
||||
end;
|
||||
@ -739,7 +739,7 @@ begin
|
||||
else
|
||||
begin
|
||||
if Spacing >= 0 then
|
||||
OffsetCap.X := OffsetGlyph.X - Spacing - TextSize.CX
|
||||
OffsetCap.X := OffsetGlyph.X - S - TextSize.CX
|
||||
else
|
||||
OffsetCap.X := (OffsetGlyph.X - TextSize.CX) div 2;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user