From 5d71c6a2ab7ba22d05e56c178794604f7b76548c Mon Sep 17 00:00:00 2001 From: AskaEth Date: Tue, 8 Sep 2026 21:34:10 +0800 Subject: [PATCH] =?UTF-8?q?fix(ui):=20=E7=A7=BB=E9=99=A4=E8=81=8A=E5=A4=A9?= =?UTF-8?q?=E9=A1=B5=E9=A1=B6=E6=A0=8F=E7=99=BB=E5=87=BA=E6=8C=89=E9=92=AE?= =?UTF-8?q?=EF=BC=9B=E6=8A=BD=E5=B1=89=E5=86=85=E5=AE=B9=E9=81=BF=E5=BC=80?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E6=A0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 登出已收进侧边栏;抽屉面板保留全高背景,内容用 systemBars inset 避开状态栏/导航栏。 --- app/src/main/kotlin/top/yeij/cyrene/ui/chat/ChatScreen.kt | 4 ---- .../main/kotlin/top/yeij/cyrene/ui/common/MiuixDrawer.kt | 7 ++++++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/src/main/kotlin/top/yeij/cyrene/ui/chat/ChatScreen.kt b/app/src/main/kotlin/top/yeij/cyrene/ui/chat/ChatScreen.kt index cd7f516..ad68f3c 100644 --- a/app/src/main/kotlin/top/yeij/cyrene/ui/chat/ChatScreen.kt +++ b/app/src/main/kotlin/top/yeij/cyrene/ui/chat/ChatScreen.kt @@ -37,7 +37,6 @@ import top.yukonga.miuix.kmp.basic.IconButton import top.yukonga.miuix.kmp.basic.Scaffold import top.yukonga.miuix.kmp.basic.SmallTopAppBar import top.yukonga.miuix.kmp.basic.Text -import top.yukonga.miuix.kmp.basic.TextButton import top.yukonga.miuix.kmp.basic.TextField import top.yukonga.miuix.kmp.icon.MiuixIcons import top.yukonga.miuix.kmp.icon.basic.Sidebar @@ -103,9 +102,6 @@ fun ChatScreen( Icon(imageVector = MiuixIcons.Basic.Sidebar, contentDescription = "菜单") } }, - actions = { - TextButton("登出", onClick = onLogout) - }, ) }, bottomBar = { diff --git a/app/src/main/kotlin/top/yeij/cyrene/ui/common/MiuixDrawer.kt b/app/src/main/kotlin/top/yeij/cyrene/ui/common/MiuixDrawer.kt index 708f184..0aad6de 100644 --- a/app/src/main/kotlin/top/yeij/cyrene/ui/common/MiuixDrawer.kt +++ b/app/src/main/kotlin/top/yeij/cyrene/ui/common/MiuixDrawer.kt @@ -12,10 +12,13 @@ import androidx.compose.foundation.gestures.rememberDraggableState import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.ColumnScope +import androidx.compose.foundation.layout.WindowInsets import androidx.compose.foundation.layout.fillMaxHeight import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.offset +import androidx.compose.foundation.layout.systemBars import androidx.compose.foundation.layout.width +import androidx.compose.foundation.layout.windowInsetsPadding import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.derivedStateOf @@ -198,7 +201,9 @@ fun MiuixDrawer( y = 0, ) } - .background(MiuixTheme.colorScheme.surface), + .background(MiuixTheme.colorScheme.surface) + // 面板铺满全高(背景仍到底),内容再避开状态栏 / 导航栏 + .windowInsetsPadding(WindowInsets.systemBars), ) { drawerContent() }