fix(desktop): restore Windows top border

This commit is contained in:
zipg authored and GitHub committed 2026-07-08 22:51:33 +08:00
1 parent 1b13d2176b
commit 08067320f8
4 files changed
+32 -2

No files matched your search

@@ -1,5 +1,5 @@
import { describe, expect, it } from "vitest";
import { shouldReserveMacTrafficLightInset, shouldShowWindowControls } from "@/composables/useWindowControls";
import { shouldDrawDesktopWindowFrame, shouldReserveMacTrafficLightInset, shouldShowWindowControls } from "@/composables/useWindowControls";
describe("window controls", () => {
it("shows custom controls for non-macOS desktop windows", () => {
@@ -14,6 +14,12 @@ describe("window controls", () => {
expect(shouldShowWindowControls(false, false)).toBe(false);
});
it("draws an app frame only for self-decorated desktop windows", () => {
expect(shouldDrawDesktopWindowFrame(false, true)).toBe(true);
expect(shouldDrawDesktopWindowFrame(true, true)).toBe(false);
expect(shouldDrawDesktopWindowFrame(false, false)).toBe(false);
});
it("reserves traffic light inset only for non-fullscreen macOS desktop windows", () => {
expect(shouldReserveMacTrafficLightInset(true, false, true)).toBe(true);
expect(shouldReserveMacTrafficLightInset(true, true, true)).toBe(false);