Quick fixes for S&T #27

Merged
liamwarfield merged 3 commits from quick-fixxes-for-s&t into main 2026-03-29 18:24:16 +00:00
2 changed files with 18 additions and 1 deletions
+1
View File
@@ -16,6 +16,7 @@ body {
}
#main {
visibility: visible;
Review

Part of the way I got around the flashing was setting #main to visibility: hidden on startup. This toggles it back when the css gets loaded.

Part of the way I got around the flashing was setting #main to `visibility: hidden` on startup. This toggles it back when the css gets loaded.
height: 100vh;
display: flex;
flex-direction: column;
+17 -1
View File
@@ -1,6 +1,22 @@
use dioxus::prelude::*;
use mumble_web2_gui::{app, imp::Platform, imp::PlatformInterface as _};
pub fn main() {
Platform::init_logging();
dioxus::launch(app::app);
dioxus::LaunchBuilder::new()
.with_cfg(desktop! {
dioxus::desktop::Config::new()
// Reduce white flash on startup by setting background color and hiding main element
.with_background_color((0, 0, 0, 255))
.with_custom_head("<style>html, body { background: black; } #main { visibility: hidden; }</style>".into())
.with_disable_context_menu(cfg!(not(debug_assertions)))
.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_maximized(false),
)
})
.launch(app::app);
}