fix(android): the detail rows were upside down
Inside a TVertScrollBox, Align=Top children stack in creation order - the opposite of a TLayout, where the last created ends up on top. The convention that is right for the unlock screen produced an inverted form here, with the 2FA code relegated to the bottom when it is the reason you pull the phone out. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
+21
-17
@@ -602,9 +602,24 @@ begin
|
|||||||
SetLength(FRowShown, Length(FRows));
|
SetLength(FRowShown, Length(FRows));
|
||||||
SetLength(FRowCtls, Length(FRows));
|
SetLength(FRowCtls, Length(FRows));
|
||||||
|
|
||||||
// A REBOURS : des controles alignes en haut s'empilent dans l'ordre inverse
|
// Le TOTP EN PREMIER, donc en tete d'ecran : c'est ce qu'on vient chercher
|
||||||
// de leur creation, donc la derniere ligne se cree en premier.
|
// sur un telephone. Seule ligne vivante, rafraichie chaque seconde.
|
||||||
for I := High(FRows) downto 0 do
|
if FCurrent.Totp <> '' then
|
||||||
|
begin
|
||||||
|
LRow := MakeRow(FDetBody, 'Code 2FA', FTotpValue);
|
||||||
|
SetLength(FRowCtls, Length(FRowCtls) + 1);
|
||||||
|
FRowCtls[High(FRowCtls)] := LRow;
|
||||||
|
FTotpValue.TextSettings.Font.Size := 26;
|
||||||
|
AddRowButton(LRow, 'Copier', -1, OnCopyTap);
|
||||||
|
OnTotpTick(nil); // pas d'attente d'une seconde a l'ouverture
|
||||||
|
FTotpTimer.Enabled := True;
|
||||||
|
end;
|
||||||
|
|
||||||
|
// DANS L'ORDRE, ici : au sein d'un TVertScrollBox les enfants alignes en
|
||||||
|
// haut s'empilent dans l'ordre de creation - l'inverse d'un TLayout, ou le
|
||||||
|
// dernier cree se retrouve en tete. Se tromper de convention renvoie le
|
||||||
|
// formulaire a l'envers, sans rien casser d'autre.
|
||||||
|
for I := 0 to High(FRows) do
|
||||||
begin
|
begin
|
||||||
LRow := MakeRow(FDetBody, FRows[I].Caption, LValue);
|
LRow := MakeRow(FDetBody, FRows[I].Caption, LValue);
|
||||||
FRowCtls[I] := LRow;
|
FRowCtls[I] := LRow;
|
||||||
@@ -621,22 +636,11 @@ begin
|
|||||||
end;
|
end;
|
||||||
// La derniere ligne affichee touche sinon le bord du defilement, ce qui la
|
// La derniere ligne affichee touche sinon le bord du defilement, ce qui la
|
||||||
// fait passer pour tronquee alors qu'elle est juste collee.
|
// fait passer pour tronquee alors qu'elle est juste collee.
|
||||||
if Length(FRowCtls) > 0 then
|
// La derniere ligne affichee touche sinon le bord du defilement, ce qui la
|
||||||
|
// fait passer pour tronquee alors qu'elle est juste collee.
|
||||||
|
if Length(FRows) > 0 then
|
||||||
FRowCtls[High(FRows)].Margins.Bottom := 12;
|
FRowCtls[High(FRows)].Margins.Bottom := 12;
|
||||||
|
|
||||||
// Le TOTP est la seule ligne vivante : creee en dernier, donc affichee en
|
|
||||||
// tete, parce que c'est ce qu'on vient chercher sur un telephone.
|
|
||||||
if FCurrent.Totp <> '' then
|
|
||||||
begin
|
|
||||||
LRow := MakeRow(FDetBody, 'Code 2FA', FTotpValue);
|
|
||||||
SetLength(FRowCtls, Length(FRowCtls) + 1);
|
|
||||||
FRowCtls[High(FRowCtls)] := LRow;
|
|
||||||
FTotpValue.TextSettings.Font.Size := 26;
|
|
||||||
AddRowButton(LRow, 'Copier', -1, OnCopyTap);
|
|
||||||
OnTotpTick(nil); // pas d'attente d'une seconde a l'ouverture
|
|
||||||
FTotpTimer.Enabled := True;
|
|
||||||
end;
|
|
||||||
|
|
||||||
FLayList.Visible := False;
|
FLayList.Visible := False;
|
||||||
FLayDetail.Visible := True;
|
FLayDetail.Visible := True;
|
||||||
end;
|
end;
|
||||||
|
|||||||
Reference in New Issue
Block a user