You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Delphi 12 FMX, with Skia enabled, there is a problem with TText when AutoSize is True and WordWrap is False.
The problem shows when multiline Text is assigned from TStringList.Text.
The Width of the TText component will not be adjusted.
This Issue has already been reported to Embarcadero as RSP-43371.
I fixed it for myself in FMX.Skia.Canvas like so:
functionTSkTextLayout.NeedHorizontalAlignment: Boolean;
var
LShouldHaveSingleLine: Boolean;
begin
LShouldHaveSingleLine := not WordWrap;
if WordWrap thenbeginif Text.Contains(#13) or Text.Contains(#10) then
LShouldHaveSingleLine := False;
end;
Result := LShouldHaveSingleLine and (Trimming = TTextTrimming.None);
end;
Trimming is None in my case. AutoSize is not available inside NeedHorizontalAlignment. Therefore: If WordWrap is true then LShouldHaveSingleLine must return True, in my special case. Thanks.
The text was updated successfully, but these errors were encountered:
@federgraph Thank you very much to report the issue!
The real cause is the same of #273 and was fixed on 7f45095 and 65df505. So, as a workaround, just add to your project the current FMX.Skia.Canvas.pas. Let's see if Embarcadero add this fix in a hotfix for RAD 12.0.
Hi,
In Delphi 12 FMX, with Skia enabled, there is a problem with TText when AutoSize is True and WordWrap is False.
The problem shows when multiline Text is assigned from TStringList.Text.
The Width of the TText component will not be adjusted.
This Issue has already been reported to Embarcadero as RSP-43371.
I fixed it for myself in FMX.Skia.Canvas like so:
Trimming is None in my case. AutoSize is not available inside NeedHorizontalAlignment. Therefore: If WordWrap is true then LShouldHaveSingleLine must return True, in my special case. Thanks.
The text was updated successfully, but these errors were encountered: