clearlysid / tauri-plugin-decorum

Opinionated window decorations for Tauri apps
https://crates.io/crates/tauri-plugin-decorum
MIT License
160 stars 10 forks source link

Hiding/removing controls #28

Closed basharovV closed 1 month ago

basharovV commented 2 months ago

Hi, thanks for this library! I was looking to have more control over the window buttons without affecting window borders and shadows.

Is it possible to remove/hide the buttons programmatically? For my use-case: I want to be able to hide them in the mini-player.

clearlysid commented 2 months ago

Hey @basharovV I think you can just use some CSS to hide the window buttons (on Windows)...

div[data-tauri-decorum-tb] {
   display: none;
}
joakim commented 1 month ago
div[data-tauri-decorum-tb] {
   display: none;
}

@clearlysid As you alluded to, this doesn't appear to work on macOS. Any ideas how to do the same there?

clearlysid commented 1 month ago

On macOS, the controls are shown automatically depending on the isMaximazable, isMinimizable, isClosable flags that you can specifiy while creating your window. You can also just set the setDecorations to false using the WebviewWindow API from Tauri.

joakim commented 1 month ago

@clearlysid Thanks for the tips!