feat(ui): 统一实现卡片背景趋势与大数值布局
This commit is contained in:
+15
-3
@@ -61,7 +61,19 @@ CHECKS.update({
|
||||
"kymo/Features/MenuBar/PanelWindowObserver.swift", "kymo/UI/Components/IntervalControl.swift"],
|
||||
"SandboxNetworkChecks": ["kymo/Core/Services/PublicIPAddressService.swift"],
|
||||
})
|
||||
GUI = {"NativeMetricDrawingChecks", "NativeContentHostChecks", "NativeProcessTableChecks", "LanguageScopeChecks", "SettingsWindowChecks", "PanelWindowChecks", "TabPickerChecks"}
|
||||
CHECKS["ResourceCardChecks"] = [
|
||||
"kymo/UI/Components/ResourceCard.swift", "kymo/UI/Components/ResourceCardMetrics.swift",
|
||||
"kymo/UI/Components/PanelStyle.swift", "kymo/UI/Components/NativeContentHost.swift",
|
||||
"kymo/UI/Components/MetricText.swift", "kymo/UI/Components/TooltipBackground.swift",
|
||||
"kymo/UI/Charts/PanelTrendChart.swift", "kymo/UI/Charts/NativePanelCurve.swift",
|
||||
"kymo/UI/Charts/PanelCurveFrame.swift", "kymo/UI/Charts/PanelCurveGeometry.swift",
|
||||
"kymo/UI/Charts/ChartTooltipLayer.swift", "kymo/Core/Extensions/MetricFormat.swift",
|
||||
]
|
||||
|
||||
for name in ("PanelLayoutChecks", "PanelWindowChecks"):
|
||||
CHECKS[name].append("kymo/UI/Components/ResourceCardMetrics.swift")
|
||||
|
||||
GUI = {"ResourceCardChecks", "NativeMetricDrawingChecks", "NativeContentHostChecks", "NativeProcessTableChecks", "LanguageScopeChecks", "SettingsWindowChecks", "PanelWindowChecks", "TabPickerChecks"}
|
||||
NETWORK = {"SandboxNetworkChecks"}
|
||||
SERVICES = {"ReleaseServiceChecks"}
|
||||
|
||||
@@ -95,7 +107,7 @@ def test_bundle(work, name, executable, host_entitlements=None, resources=None,
|
||||
(contents / "Info.plist").write_bytes(plistlib.dumps({
|
||||
"CFBundleIdentifier": "cn.airnan.kymo.checks." + uuid.uuid4().hex,
|
||||
"CFBundleExecutable": name, "CFBundlePackageType": "APPL",
|
||||
"LSUIElement": name in {"PanelWindowChecks", "NativeMetricDrawingChecks", "NativeContentHostChecks", "NativeProcessTableChecks", "NetworkAddressChecks", "SandboxNetworkChecks", "TabPickerChecks"},
|
||||
"LSUIElement": name in {"ResourceCardChecks", "PanelWindowChecks", "NativeMetricDrawingChecks", "NativeContentHostChecks", "NativeProcessTableChecks", "NetworkAddressChecks", "SandboxNetworkChecks", "TabPickerChecks"},
|
||||
}))
|
||||
if resources:
|
||||
shutil.copytree(resources, contents / "Resources")
|
||||
@@ -176,7 +188,7 @@ def main():
|
||||
run(["swiftc", "-parse-as-library", "-module-cache-path", work / "cache", *CHECKS[name],
|
||||
f"kymoTests/{name}.swift", "-o", executable])
|
||||
if name in GUI:
|
||||
bundle = test_bundle(work, name, executable, resources=app / "Contents/Resources" if name in {"NativeProcessTableChecks", "TabPickerChecks"} else None)
|
||||
bundle = test_bundle(work, name, executable, resources=app / "Contents/Resources" if name in {"ResourceCardChecks", "NativeProcessTableChecks", "TabPickerChecks"} else None)
|
||||
# Open the complete app for native activation semantics, while collecting its output.
|
||||
output = work / (name + ".out")
|
||||
error = work / (name + ".err")
|
||||
|
||||
Reference in New Issue
Block a user