Closed gonzzzales closed 9 months ago
@Zeus64, please tell me what can be done about it.
@gonzzzales do you see the bug on windows or on android/ios ? with version of delphi do you use ? can you reproduce this bug in the https://github.com/MagicFoundation/Alcinoe/tree/master/Demos/ALFmxControls/_Source demo ?
This bug i see on Windows. Delphi Version is 12. In demo project this is especially noticeable, it is almost impossible to highlight the text in the edit field regardless of whether it's TEdit or TALEdit
@Zeus64, sorry to interrupt, is there any hope that the problem can be solved?
@gonzzzales can you update the Alcinoe repository, launch again the update.bat located in https://github.com/MagicFoundation/Alcinoe/blob/master/Embarcadero/Athens/Update.bat and say me if everything work fine now ?
Unfortunately, I didn't notice any changes. Am i right, you change only Athens.patch, and al othe files are the same? I can make a movie with this behavior
@gonzzzales yes i changed the Athens.patch, can you look in Alcinoe\Embarcadero\Athens\fmx\FMX.Canvas.D2D.pas if you have :
//https://quality.embarcadero.com/browse/RSP-39734
if TrailingHit then Inc(Result); // HitTestMetrics.textPosition look like zero based
//if TrailingHit then
// Result := Result + Integer(HitTestMetrics.length);
please copy this part of your Alcinoe\Embarcadero\Athens\fmx\FMX.Canvas.D2D.pas here
Hmm, i think patch not worked propertly, or i did something wrong. I have this in CanvasD2D.pas
` function TTextLayoutD2D.DoPositionAtPoint(const APoint: TPointF): Integer; var TrailingHit: BOOL; Inside: BOOL; HitTestMetrics: TDWriteHitTestMetrics; LRect: TRectF; HitTestPoint: TPointF; begin Result := -1; if FLayout = nil then Exit;
LRect := Self.TextRect; LRect.Width := Max(LRect.Width, MaxSize.X); if IsPointInRect(APoint, LRect) then begin HitTestPoint := APoint - TopLeft - TPointF.Create(Padding.Left, Padding.Top); FLayout.HitTestPoint(HitTestPoint.X, HitTestPoint.Y, TrailingHit, Inside, HitTestMetrics); Result := HitTestMetrics.textPosition; //https://quality.embarcadero.com/browse/RSP-39734 if Result >= 0 then Inc(Result); // HitTestMetrics.textPosition look like zero based //if TrailingHit then // Result := Result + Integer(HitTestMetrics.length); end else if ((APoint.X < LRect.Left) or SameValue(APoint.X, LRect.Left, TEpsilon.Position)) and ((APoint.Y > LRect.Top) or SameValue(APoint.Y, LRect.Top, TEpsilon.Position)) and ((APoint.Y < LRect.Bottom) or SameValue(APoint.Y, LRect.Bottom, TEpsilon.Position)) then Result := 0; if (Result >= 0) and (Result < Text.Length) and Text.Chars[Result].IsLowSurrogate then Inc(Result); end; `
I made your changes manually, and it work fine Thank you very much!!!!
perfect! i guess you didn't update your repository or you forgot to run update.bat located in https://github.com/MagicFoundation/Alcinoe/blob/master/Embarcadero/Athens/Update.bat. Happy that it's work now for you
Hi I found a problem with TEdit and TALEdit when using Alcinoe in D12. Make new application, then put TEdit on form. In project options write in Search Path "D:\Alcinoe-master\Embarcadero\Athens\fmx" After that it is impossible to select all the text in TEdit with mouse. First char is not selectable. Also i can not set cursor on first char. The TALEdit has the same behavior.