DioxusLabs / dioxus

Fullstack GUI library for web, desktop, mobile, and more.
https://dioxuslabs.com
Apache License 2.0
18.5k stars 704 forks source link

Add ability to configure "always on/pin to top" option for the Dioxus Desktop #2354

Open Andrew15-5 opened 1 week ago

Andrew15-5 commented 1 week ago

Feature Request

The "always on top" feature is blocking the file choose window (<input type="file">), which is supposed to be a part of the app. So not only it blocks other dev windows (editor, dx and tailwind commands), but also itself. And when moving to the virtual desktop with that window and an editor, it will always refocus on that window, instead of the previously focused editor, which is just not a great DX, to put it mildly.

Implement Suggestion

Probably a toggle either in the Dioxus.toml file or in the dioxus::desktop::Config::new().

SophieSilver commented 1 week ago

You can pass a WindowBuilder to the config using Config::with_window().

The WindowBuilder lets you configure whether you want the window to always be on top (https://docs.rs/tao/latest/tao/window/struct.WindowBuilder.html#method.with_always_on_top).

DogeDark commented 1 week ago

They mean for the CLI. It had a new feature that keeps the desktop window always on top while running in dev mode.

Andrew15-5 commented 1 week ago

I think it's a new version of Dioxus and not dx.

The WindowBuilder method can serve as a workaround.