fix(desktop): restore Windows top border
This commit is contained in:
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);
|
||||
|
||||
@@ -11,6 +11,10 @@ export function shouldShowWindowControls(isMac: boolean, isDesktop = true): bool
|
||||
return isDesktop && !isMac;
|
||||
}
|
||||
|
||||
export function shouldDrawDesktopWindowFrame(isMac: boolean, isDesktop = true): boolean {
|
||||
return isDesktop && !isMac;
|
||||
}
|
||||
|
||||
export function useWindowControls() {
|
||||
const isMaximized = ref(false);
|
||||
const isFullscreen = ref(false);
|
||||
|
||||
Reference in new issue
Block a user