Remove white flash on desktop

I ask claude for some other suggestions for things to add here, and
I agree with 2 of them:

- Remove a white flash by setting a default collor of the window as
  black.
- Explicitly set the maximized state.
This commit is contained in:
2026-03-29 09:59:59 -06:00
parent cd1aed2b9a
commit d12b9b891b
2 changed files with 7 additions and 2 deletions
+1
View File
@@ -16,6 +16,7 @@ body {
}
#main {
visibility: visible;
height: 100vh;
display: flex;
flex-direction: column;
+6 -2
View File
@@ -5,11 +5,15 @@ pub fn main() {
Platform::init_logging();
dioxus::LaunchBuilder::new()
.with_cfg(desktop! {
dioxus::desktop::Config::new().with_window(
dioxus::desktop::Config::new()
.with_background_color((0, 0, 0, 255))
.with_custom_head("<style>html, body { background: black; } #main { visibility: hidden; }</style>".into())
.with_window(
dioxus::desktop::WindowBuilder::new()
.with_title("Mumble Web 2")
.with_min_inner_size(dioxus::desktop::LogicalSize::new(600.0, 300.0))
.with_inner_size(dioxus::desktop::LogicalSize::new(900.0, 700.0)),
.with_inner_size(dioxus::desktop::LogicalSize::new(900.0, 700.0))
.with_maximized(false),
)
})
.launch(app::app);