usage

usage 0.22.7

工具與目錄
在這頁

修正 1 項

01

切換不同主題面板時不再閃爍,而且瞬間出現

在切換不同的面板主題時,畫面變得非常滑順。以前每次換面板,系統都會把整個視窗關掉重開、而且會先露出底下的深色背景閃一下;現在系統會把你開過的面板(最多記 6 個)悄悄藏在背後,切換時只負責把最新的數字填進去再端出來。所以只要是開過的面板,切換過去就是瞬間出現,沒有任何閃爍,連視窗都不用關閉重開。就像換佈景,以前是把整個舞台布幕拉下來拆掉重裝,現在是舞台底下早就準備好多個旋轉舞台,轉過來就能直接演。

官方原文

**Switching panels no longer flickers**: every switch tore down the WKWebView and reloaded its HTML, exposing the dark backing layer until the load finished — a visible flicker, plus the popover closed and reopened. usage now caches each panel's web view (lazily, capped at 6 with LRU eviction) inside a container view and switches by toggling visibility and re-injecting the latest state, so a previously-opened panel reappears instantly with no reload. The first build of a panel fades in from a same-color overlay that is removed on the first successful paint (or after a 1.5s safety timeout). The popover no longer closes and reopens on switch.