From b821796add33cca4de72f48882684af487936d02 Mon Sep 17 00:00:00 2001 From: Lucas Raposeiras Date: Sun, 13 Jul 2025 09:58:39 -0300 Subject: [PATCH] docs: add missing `trafficLightPosition` to `WindowOptions` (fix #13790) (#13810) * docs: add missing `trafficLightPosition` to `WindowOptions` * Change file and tweak docs --------- Co-authored-by: Tony --- .changes/traffic-light-position-type.md | 5 +++++ packages/api/src/dpi.ts | 4 ++-- packages/api/src/window.ts | 8 ++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 .changes/traffic-light-position-type.md diff --git a/.changes/traffic-light-position-type.md b/.changes/traffic-light-position-type.md new file mode 100644 index 000000000..debb0b198 --- /dev/null +++ b/.changes/traffic-light-position-type.md @@ -0,0 +1,5 @@ +--- +"@tauri-apps/api": "patch:bug" +--- + +Add missing `trafficLightPosition` TypeScript type definition diff --git a/packages/api/src/dpi.ts b/packages/api/src/dpi.ts index cf96901bc..88409726b 100644 --- a/packages/api/src/dpi.ts +++ b/packages/api/src/dpi.ts @@ -206,7 +206,7 @@ class Size { } /** - * A position represented in logical pixels. + * A position represented in logical pixels. * For an explanation of what logical pixels are, see description of {@linkcode LogicalSize}. * * @since 2.0.0 @@ -272,7 +272,7 @@ class LogicalPosition { } /** - * A position represented in physical pixels. + * A position represented in physical pixels. * * For an explanation of what physical pixels are, see description of {@linkcode PhysicalSize}. * diff --git a/packages/api/src/window.ts b/packages/api/src/window.ts index d84709f23..ab6a3280f 100644 --- a/packages/api/src/window.ts +++ b/packages/api/src/window.ts @@ -2325,6 +2325,14 @@ interface WindowOptions { * The style of the macOS title bar. */ titleBarStyle?: TitleBarStyle + /** + * The position of the window controls on macOS. + * + * Requires `titleBarStyle: 'overlay'` and `decorations: true`. + * + * @since 2.4.0 + */ + trafficLightPosition?: LogicalPosition /** * If `true`, sets the window title to be hidden on macOS. */