tauri-apps / tauri

Build smaller, faster, and more secure desktop and mobile applications with a web frontend.
https://tauri.app
Apache License 2.0
85.38k stars 2.58k forks source link

[feat] Keep the App's function buttons and customize the toolbar #11672

Closed wangxg422 closed 1 week ago

wangxg422 commented 1 week ago

Describe the problem

How to make the function buttons (maximize, minimize, close) on the toolbar keep the characteristics of their respective operating systems (windows on the right, macos on the left), while being able to customize the toolbar. Because when developing an APP, the layout of the APP sometimes has a menu bar on the left and display content on the right, without a toolbar, but the three buttons in the toolbar (maximize, minimize, close) need to be retained.

Describe the solution you'd like

Refine the setting of "decorations: false". When it is currently set to false, the toolbar and function buttons disappear at the same time. It is expected to add a reserved operation button PixPin_2024-11-13_17-46-33

Alternatives considered

No response

Additional context

No response

FabianLars commented 1 week ago

On macOS you can use the titlebarStyle window config and for Windows we're waiting on an update from WebView2 tracked here https://github.com/tauri-apps/tauri/issues/4531 / https://github.com/MicrosoftEdge/WebView2Feedback/issues/4532

These configs will keep just the control buttons while removing the titlebar (so you can create your own if needed)