feat: survol a l'accent sur la barrette, grande fleche de retour dans l'APK
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -179,6 +179,9 @@
|
||||
besoin d'etre visible pour exister. */
|
||||
background: none; }
|
||||
.btn.ico-btn svg { width: 22px; height: 22px; }
|
||||
/* LA FLECHE DE RETOUR, EN GRAND : c'est le geste le plus frequent de
|
||||
l'app, et un caractere fleche de police restait minuscule. */
|
||||
.btn.back-btn svg { width: 30px; height: 30px; }
|
||||
/* Le retour d'appui ne peut plus venir du fond : il vient du trait. */
|
||||
.btn.ico-btn:active { opacity: .45; }
|
||||
/* Le point des modifications en attente. Sur le cadenas parce qu'il est
|
||||
@@ -551,7 +554,7 @@
|
||||
|
||||
<div class="screen" id="detail">
|
||||
<div class="head">
|
||||
<button class="btn" id="back">←</button>
|
||||
<button class="btn ico-btn back-btn" id="back"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round" aria-label="Back" role="img"><path d="M20 12H5M11 5l-7 7 7 7"/></svg></button>
|
||||
<h1 id="dtitle"></h1>
|
||||
<button class="btn ico-btn" id="kebab" aria-label="Entry menu"></button>
|
||||
</div>
|
||||
@@ -565,7 +568,7 @@
|
||||
nature differente sur l'ecran ou l'on veut surtout ouvrir son coffre. -->
|
||||
<div class="sheet" id="settings">
|
||||
<div class="head">
|
||||
<button class="btn" id="setBack">←</button>
|
||||
<button class="btn ico-btn back-btn" id="setBack"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round" aria-label="Back" role="img"><path d="M20 12H5M11 5l-7 7 7 7"/></svg></button>
|
||||
<h1>Settings</h1>
|
||||
</div>
|
||||
<div class="scroll">
|
||||
@@ -656,7 +659,7 @@
|
||||
apres qu'on a fini de les lire. -->
|
||||
<div class="sheet" id="history">
|
||||
<div class="head">
|
||||
<button class="btn" id="histBack">←</button>
|
||||
<button class="btn ico-btn back-btn" id="histBack"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round" aria-label="Back" role="img"><path d="M20 12H5M11 5l-7 7 7 7"/></svg></button>
|
||||
<h1>Previous passwords</h1>
|
||||
</div>
|
||||
<div class="scroll"><div id="histBody"></div></div>
|
||||
|
||||
@@ -485,6 +485,9 @@ const
|
||||
LAZY_LITE_DOWN = $DDE3E3; // --bg-elev-3 #e3e3dd
|
||||
LAZY_LITE_EDGE = $D7DCDC; // --border #dcdcd7
|
||||
LAZY_LITE_INK = $1F1A1A; // --text #1a1a1f
|
||||
// Survol : l'accent de l'app, comme les boutons de la fenetre principale.
|
||||
LAZY_DARK_ACCENT = $D4B606; // --accent #06b6d4
|
||||
LAZY_LITE_ACCENT = $B29108; // --accent #0891b2
|
||||
|
||||
// Dynamic WTS function pointers — wtsapi32.dll is not guaranteed on all
|
||||
// Windows SKUs (e.g. minimal Server Core without Session Services), so
|
||||
@@ -1131,6 +1134,8 @@ end;
|
||||
// a retenir.
|
||||
var
|
||||
GLazyOldBtnProc: Pointer = nil;
|
||||
// Bouton de la barrette sous la souris (0 = aucun) : il se peint a l'accent.
|
||||
GLazyHotBtn: HWND = 0;
|
||||
|
||||
/// Un appui sur un bouton de la barrette : clic, ou debut de glissement ?
|
||||
///
|
||||
@@ -1163,6 +1168,26 @@ begin
|
||||
MAKEWPARAM(GetDlgCtrlID(AWnd), BN_CLICKED), LPARAM(AWnd));
|
||||
Exit(0);
|
||||
end;
|
||||
// LE SURVOL SE VOIT. Un bouton peint a la main n'a aucun etat "survole" :
|
||||
// on le suit ici (entree par WM_MOUSEMOVE, sortie par WM_MOUSELEAVE demande a
|
||||
// TrackMouseEvent) et on redessine les deux boutons concernes.
|
||||
if (AMsg = WM_MOUSEMOVE) and (GLazyHotBtn <> AWnd) then
|
||||
begin
|
||||
if GLazyHotBtn <> 0 then InvalidateRect(GLazyHotBtn, nil, False);
|
||||
GLazyHotBtn := AWnd;
|
||||
InvalidateRect(AWnd, nil, False);
|
||||
var LTrack: TTrackMouseEvent;
|
||||
LTrack.cbSize := SizeOf(LTrack);
|
||||
LTrack.dwFlags := TME_LEAVE;
|
||||
LTrack.hwndTrack := AWnd;
|
||||
LTrack.dwHoverTime := 0;
|
||||
TrackMouseEvent(LTrack);
|
||||
end
|
||||
else if (AMsg = WM_MOUSELEAVE) and (GLazyHotBtn = AWnd) then
|
||||
begin
|
||||
GLazyHotBtn := 0;
|
||||
InvalidateRect(AWnd, nil, False);
|
||||
end;
|
||||
Result := CallWindowProc(GLazyOldBtnProc, AWnd, AMsg, AWp, ALp);
|
||||
end;
|
||||
|
||||
@@ -1187,6 +1212,18 @@ begin
|
||||
LFace := LAZY_LITE_FACE; LEdge := LAZY_LITE_EDGE; LInk := LAZY_LITE_INK;
|
||||
if (ADraw.itemState and ODS_SELECTED) <> 0 then LFace := LAZY_LITE_DOWN;
|
||||
end;
|
||||
// Survole : fond releve et encre a l'accent, cadre compris.
|
||||
if ADraw.hwndItem = GLazyHotBtn then
|
||||
begin
|
||||
if FDarkTheme then
|
||||
begin
|
||||
LFace := LAZY_DARK_DOWN; LInk := LAZY_DARK_ACCENT; LEdge := LAZY_DARK_ACCENT;
|
||||
end
|
||||
else
|
||||
begin
|
||||
LFace := LAZY_LITE_DOWN; LInk := LAZY_LITE_ACCENT; LEdge := LAZY_LITE_ACCENT;
|
||||
end;
|
||||
end;
|
||||
|
||||
LBrush := CreateSolidBrush(LFace);
|
||||
FillRect(ADraw.hDC, LRect, LBrush);
|
||||
|
||||
Reference in New Issue
Block a user