|
@@ -25,6 +25,7 @@ fun ChromeWindow(
|
|
|
enabled: Boolean = true,
|
|
enabled: Boolean = true,
|
|
|
focusable: Boolean = true,
|
|
focusable: Boolean = true,
|
|
|
alwaysOnTop: Boolean = true,
|
|
alwaysOnTop: Boolean = true,
|
|
|
|
|
+ alwaysOnBottom: Boolean = false,
|
|
|
enterAnimation: EnterTransition = fadeIn() + slideInVertically(initialOffsetY = { it }),
|
|
enterAnimation: EnterTransition = fadeIn() + slideInVertically(initialOffsetY = { it }),
|
|
|
exitAnimation: ExitTransition = slideOutVertically(targetOffsetY = { it }) + fadeOut(),
|
|
exitAnimation: ExitTransition = slideOutVertically(targetOffsetY = { it }) + fadeOut(),
|
|
|
onCloseRequest: () -> Unit = {},
|
|
onCloseRequest: () -> Unit = {},
|
|
@@ -42,6 +43,7 @@ fun ChromeWindow(
|
|
|
enabled,
|
|
enabled,
|
|
|
focusable,
|
|
focusable,
|
|
|
alwaysOnTop,
|
|
alwaysOnTop,
|
|
|
|
|
+ alwaysOnBottom,
|
|
|
enterAnimation,
|
|
enterAnimation,
|
|
|
exitAnimation,
|
|
exitAnimation,
|
|
|
onCloseRequest,
|
|
onCloseRequest,
|
|
@@ -63,6 +65,7 @@ fun ChromeWindow(
|
|
|
enabled: Boolean = true,
|
|
enabled: Boolean = true,
|
|
|
focusable: Boolean = true,
|
|
focusable: Boolean = true,
|
|
|
alwaysOnTop: Boolean = true,
|
|
alwaysOnTop: Boolean = true,
|
|
|
|
|
+ alwaysOnBottom: Boolean = false,
|
|
|
enterAnimation: EnterTransition = fadeIn() + slideInVertically(initialOffsetY = { it }),
|
|
enterAnimation: EnterTransition = fadeIn() + slideInVertically(initialOffsetY = { it }),
|
|
|
exitAnimation: ExitTransition = slideOutVertically(targetOffsetY = { it }) + fadeOut(),
|
|
exitAnimation: ExitTransition = slideOutVertically(targetOffsetY = { it }) + fadeOut(),
|
|
|
onCloseRequest: () -> Unit = {},
|
|
onCloseRequest: () -> Unit = {},
|
|
@@ -80,6 +83,7 @@ fun ChromeWindow(
|
|
|
enabled,
|
|
enabled,
|
|
|
focusable,
|
|
focusable,
|
|
|
alwaysOnTop,
|
|
alwaysOnTop,
|
|
|
|
|
+ alwaysOnBottom,
|
|
|
enterAnimation,
|
|
enterAnimation,
|
|
|
exitAnimation,
|
|
exitAnimation,
|
|
|
onCloseRequest,
|
|
onCloseRequest,
|
|
@@ -100,6 +104,7 @@ fun ChromeWindow(
|
|
|
enabled: Boolean = true,
|
|
enabled: Boolean = true,
|
|
|
focusable: Boolean = true,
|
|
focusable: Boolean = true,
|
|
|
alwaysOnTop: Boolean = true,
|
|
alwaysOnTop: Boolean = true,
|
|
|
|
|
+ alwaysOnBottom: Boolean = false,
|
|
|
enterAnimation: EnterTransition = fadeIn() + slideInVertically(initialOffsetY = { it }),
|
|
enterAnimation: EnterTransition = fadeIn() + slideInVertically(initialOffsetY = { it }),
|
|
|
exitAnimation: ExitTransition = slideOutVertically(targetOffsetY = { it }) + fadeOut(),
|
|
exitAnimation: ExitTransition = slideOutVertically(targetOffsetY = { it }) + fadeOut(),
|
|
|
onCloseRequest: () -> Unit = {},
|
|
onCloseRequest: () -> Unit = {},
|
|
@@ -113,7 +118,9 @@ fun ChromeWindow(
|
|
|
val animState = rememberAnimState(visible)
|
|
val animState = rememberAnimState(visible)
|
|
|
val wnState = rememberWnState()
|
|
val wnState = rememberWnState()
|
|
|
windowState.onOpened.add {
|
|
windowState.onOpened.add {
|
|
|
- if (focusable) {
|
|
|
|
|
|
|
+ if (alwaysOnBottom) {
|
|
|
|
|
+ windowState.window?.toBack()
|
|
|
|
|
+ } else {
|
|
|
windowState.requestFocus()
|
|
windowState.requestFocus()
|
|
|
}
|
|
}
|
|
|
windowState.updatePositionAndSize()
|
|
windowState.updatePositionAndSize()
|
|
@@ -136,6 +143,7 @@ fun ChromeWindow(
|
|
|
enabled,
|
|
enabled,
|
|
|
focusable,
|
|
focusable,
|
|
|
alwaysOnTop,
|
|
alwaysOnTop,
|
|
|
|
|
+ alwaysOnBottom,
|
|
|
onPreviewKeyEvent,
|
|
onPreviewKeyEvent,
|
|
|
onKeyEvent,
|
|
onKeyEvent,
|
|
|
stateHelper = windowState.stateHelper,
|
|
stateHelper = windowState.stateHelper,
|