in hot-reload-devtools/src/main/kotlin/org/jetbrains/compose/devtools/sidecar/DtLogWindow.kt [57:86]
fun DtLogWindow(onClose: () -> Unit) {
val controller = LocalDtLogWindowController.current
Window(
onCloseRequest = { onClose() },
state = rememberWindowState(
size = DtSizes.defaultWindowSize,
position = WindowPosition.Aligned(Alignment.Center)
),
title = "${DtTitles.COMPOSE_HOT_RELOAD} Logs"
) {
LaunchedEffect(Unit) {
controller.focusRequests.collectLatest {
if (controller.isOpen.value) {
window.toFront()
window.requestFocus()
}
}
}
Column(
modifier = Modifier
.fillMaxSize()
.background(DtColors.applicationBackground)
.padding(DtPadding.medium)
) {
DtMainConsole(animateBorder = false)
}
}
}