fix(ui): harden download properties window

This commit is contained in:
NimBold
2026-08-06 07:08:29 +03:30
parent ee2448d084
commit 6f9a9e0638
15 changed files with 557 additions and 57 deletions
+8
View File
@@ -1,5 +1,6 @@
import { describe, expect, it } from 'vitest';
import {
getWindowControlRailWidth,
getWindowControlRevealOffset,
resolveWindowControlSide,
resolveWindowControlStyle,
@@ -37,6 +38,13 @@ describe('resolveWindowControlStyle', () => {
expect(getWindowControlRevealOffset('minimal')).toBe(104);
});
it('reports the shared titlebar rail width for each control style', () => {
expect(getWindowControlRailWidth('macos')).toBe(60);
expect(getWindowControlRailWidth('windows')).toBe(138);
expect(getWindowControlRailWidth('gnome')).toBe(104);
expect(getWindowControlRailWidth('minimal')).toBe(74);
});
it('resolves automatic control placement from the effective document direction', () => {
expect(resolveWindowControlSide('auto', 'ltr')).toBe('left');
expect(resolveWindowControlSide('auto', 'rtl')).toBe('right');