菜单栏合并时点击弹出状态总览,可切到各项详情(#2)
- 合并模式点击图标不再直接打开主窗口,改为弹出面板:顶部标签在总览与菜单栏开启的各项之间切换 - 总览每项一行:数值、状态、走势,偏高时变色;点一行进入该项完整详情,与每项独立时的弹窗共用 PopoverDetail - 切到某一项时 openPopover 跟着切换,采样范围与单项弹窗一致;面板打开期间每秒刷新 - 合并面板最小高度减半,项目少时不留空白;设置里的弹窗区块选项在合并模式下也可用 - 电池状态文案合成 BatteryStatus.stateText;--show-panel overview 用于调试
This commit is contained in:
1 parent
7095a9022f
commit
b5c1a330c7
17 files changed
+500
-71
No files matched your search
+4
-1
@@ -135,7 +135,10 @@ pieces of read-mostly logic in `Cleaner/DiskTools.swift`, each testable without
|
||||
|
||||
`MenuBarController` owns the status items. In the *separate* layout every enabled metric gets
|
||||
its own `NSStatusItem` (created in reverse so they read left to right) and opens a 320 pt
|
||||
popover for that metric; in the *combined* layout a single item opens the main window.
|
||||
popover for that metric; in the *combined* layout a single item opens `CombinedPopoverView`: a status
|
||||
overview with one row per enabled metric, plus tabs that switch to each metric's full popover content
|
||||
(`PopoverDetail`, shared with the separate layout). While a detail tab is showing, `AppModel.openPopover`
|
||||
is set to that metric so sampling matches the standalone popover.
|
||||
|
||||
Popovers are borderless, non-activating `NSPanel`s. The SwiftUI tree is created on open and
|
||||
destroyed on close, so a hidden popover costs nothing. Height comes from measuring a flat,
|
||||
|
||||
Reference in new issue
Block a user