fix(fillbar): l'onglet Fill bar se met a jour quand la barrette change par clic droit ou par le tray
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -117,6 +117,7 @@ type
|
||||
FShutdownPending: Boolean;
|
||||
FOnTrayRestore: TProc;
|
||||
FOnFillBarSettings: TProc;
|
||||
FOnFillBarChanged: TProc;
|
||||
FOnLockRequest: TProc;
|
||||
FOnQuit: TProc;
|
||||
FOnQuickSearchRequest: TProc;
|
||||
@@ -301,6 +302,9 @@ type
|
||||
// Clic droit sur la barrette -> "Fill bar settings..." : la fenetre revient
|
||||
// (OnTrayRestore) puis l'hote ouvre l'onglet Fill bar des reglages.
|
||||
property OnFillBarSettings: TProc read FOnFillBarSettings write FOnFillBarSettings;
|
||||
// La barrette a change hors des reglages (clic droit, menu du tray) : l'hote
|
||||
// rafraichit l'onglet Fill bar s'il est affiche.
|
||||
property OnFillBarChanged: TProc read FOnFillBarChanged write FOnFillBarChanged;
|
||||
// Fired when the user picks "Lock vault" from the tray menu. Handler
|
||||
// should trigger the JS lockVault() (typically via ExecuteJavaScript).
|
||||
property OnLockRequest: TProc read FOnLockRequest write FOnLockRequest;
|
||||
@@ -1290,6 +1294,7 @@ begin
|
||||
FLazyAlphaPct := LCmd;
|
||||
SetPref(LAZY_ALPHA_KEY, IntToStr(FLazyAlphaPct));
|
||||
ApplyLazyAlpha(FLazyHover);
|
||||
if Assigned(FOnFillBarChanged) then FOnFillBarChanged();
|
||||
end;
|
||||
finally
|
||||
DestroyMenu(LMenu);
|
||||
@@ -1523,6 +1528,7 @@ begin
|
||||
begin
|
||||
DeallocateHWnd(FLazyWnd); // the child buttons go with their parent
|
||||
FLazyWnd := 0;
|
||||
if Assigned(FOnFillBarChanged) then FOnFillBarChanged();
|
||||
Exit;
|
||||
end;
|
||||
|
||||
@@ -1594,6 +1600,7 @@ begin
|
||||
FLazyHover := False;
|
||||
ApplyLazyAlpha(False);
|
||||
SetTimer(FLazyWnd, LAZY_TIMER_ID, LAZY_POLL_MS, nil);
|
||||
if Assigned(FOnFillBarChanged) then FOnFillBarChanged();
|
||||
end;
|
||||
|
||||
procedure TPMBridge.MsgWindowHandler(var AMsg: TMessage);
|
||||
|
||||
@@ -314,6 +314,14 @@ begin
|
||||
FFileSaveChunks := TDictionary<string, TStringBuilder>.Create;
|
||||
FBridge.OnSystemLock := BridgeSystemLock;
|
||||
FBridge.OnTrayRestore := BridgeTrayRestore;
|
||||
// Changement fait sur la barrette elle-meme : l'onglet se relit (fillbar/get).
|
||||
FBridge.OnFillBarChanged :=
|
||||
procedure
|
||||
begin
|
||||
// Pas avant l'init de WebView2 : RestoreLazyBar passe ici au demarrage.
|
||||
if FBrowserInitialized then
|
||||
WebBrowser.ExecuteJavaScript('if(window.fillBarRequest)fillBarRequest()');
|
||||
end;
|
||||
FBridge.OnFillBarSettings :=
|
||||
procedure
|
||||
begin
|
||||
|
||||
Reference in New Issue
Block a user