Преглед на файлове

control center hides dock instantly

Milan Jurkulak преди 3 месеца
родител
ревизия
947b4f15d6
променени са 1 файла, в които са добавени 3 реда и са изтрити 1 реда
  1. 3 1
      shared/src/desktopMain/kotlin/org/mjdev/desktop/components/main/MainWindow.kt

+ 3 - 1
shared/src/desktopMain/kotlin/org/mjdev/desktop/components/main/MainWindow.kt

@@ -74,9 +74,11 @@ fun MainWindow() = withDesktopContext {
     }
     // When the control center opens it covers the desktop, so the dock bar and any open menu
     // step aside (this also frees focus so the control center can actually take it).
+    // The dock is dropped IMMEDIATELY (isVisible, not hide()) — hide() honours the multi-second
+    // panelHideDelay, which left the dock lingering *below* the control center for seconds.
     LaunchedEffect(controlCenterState.isVisible) {
         if (controlCenterState.isVisible) {
-            panelState.hide()
+            panelState.isVisible = false
             if (menuState.isVisible) {
                 menuState.hide()
             }