refactor: fix hardcoded values, remove println, remove doubles

This commit is contained in:
2026-08-26 15:16:09 +05:00
parent 4ff48bad0f
commit 03d4be8444
10 changed files with 513 additions and 415 deletions
+3 -4
View File
@@ -6,10 +6,9 @@ use i_slint_backend_winit::winit::window::Window;
pub fn center_window(window: &slint::Window) {
if window.has_winit_window() {
window.with_winit_window(|window: &Window| {
match window.current_monitor() {
Some(monitor) => set_centered(window, &monitor),
None => (),
};
if let Some(monitor) = window.current_monitor() {
set_centered(window, &monitor);
}
None as Option<()>
});