mirror of
http://180.163.74.83:13000/zhangzhenghao/MPVN_Android.git
synced 2025-12-12 15:24:30 +00:00
bug fix
This commit is contained in:
parent
1b2bb58c40
commit
bde499ba15
@ -654,9 +654,6 @@ fun FloatingBottomNav(
|
||||
onNavItemSelect: (Int) -> Unit = {},
|
||||
modifier: Modifier = Modifier
|
||||
) {
|
||||
// 监听语言变化以触发重组
|
||||
val currentLang by LanguageManager.currentLanguage.collectAsState()
|
||||
|
||||
val navItems = listOf(
|
||||
R.drawable.ic_dashboard,
|
||||
R.drawable.ic_scene,
|
||||
@ -667,7 +664,6 @@ fun FloatingBottomNav(
|
||||
|
||||
val itemWidth = 52.dp
|
||||
val itemSpacing = 4.dp
|
||||
val totalItemWidth = itemWidth + itemSpacing
|
||||
|
||||
// 是否正在拖动
|
||||
var isDragging by remember { mutableStateOf(false) }
|
||||
@ -709,9 +705,6 @@ fun FloatingBottomNav(
|
||||
label = "liquid_glass_offset"
|
||||
)
|
||||
|
||||
|
||||
val density = LocalDensity.current
|
||||
|
||||
// 菜单栏高度(胶囊形)
|
||||
val navBarHeight = 68.dp
|
||||
val navBarPadding = 10.dp
|
||||
@ -850,10 +843,6 @@ fun FloatingBottomNav(
|
||||
|
||||
@Composable
|
||||
fun SideNavRail(selectedNavItem: Int = 0, onNavItemSelect: (Int) -> Unit = {}) {
|
||||
val context = androidx.compose.ui.platform.LocalContext.current
|
||||
val selectedBg by com.example.smarthome.data.BackgroundManager.selectedBackground.collectAsState()
|
||||
val isDarkMode = com.example.smarthome.data.BackgroundManager.backgrounds.getOrNull(selectedBg)?.isDark ?: false
|
||||
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.width(100.dp)
|
||||
@ -862,8 +851,6 @@ fun SideNavRail(selectedNavItem: Int = 0, onNavItemSelect: (Int) -> Unit = {}) {
|
||||
verticalArrangement = Arrangement.SpaceBetween
|
||||
) {
|
||||
// 上半部分:导航项
|
||||
// 监听语言变化以触发重组
|
||||
val currentLang by LanguageManager.currentLanguage.collectAsState()
|
||||
|
||||
Column(verticalArrangement = Arrangement.spacedBy(16.dp)) {
|
||||
Spacer(modifier = Modifier.height(48.dp))
|
||||
@ -1091,8 +1078,6 @@ fun UserAvatar(
|
||||
avatarUrl: String,
|
||||
onClick: () -> Unit
|
||||
) {
|
||||
val context = androidx.compose.ui.platform.LocalContext.current
|
||||
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.size(40.dp)
|
||||
@ -2026,7 +2011,7 @@ fun ModeButtonsRow(onModeSelected: (Mode) -> Unit) {
|
||||
fun ModeButton(
|
||||
text: String,
|
||||
modifier: Modifier,
|
||||
brush: Brush,
|
||||
@Suppress("UNUSED_PARAMETER") brush: Brush,
|
||||
selected: Boolean,
|
||||
onClick: () -> Unit
|
||||
) {
|
||||
@ -2058,14 +2043,6 @@ fun ModeButton(
|
||||
label = "elevation"
|
||||
)
|
||||
|
||||
val iconScale by androidx.compose.animation.core.animateFloatAsState(
|
||||
targetValue = if (selected) 1.1f else 1f,
|
||||
animationSpec = androidx.compose.animation.core.spring(
|
||||
dampingRatio = androidx.compose.animation.core.Spring.DampingRatioMediumBouncy
|
||||
),
|
||||
label = "icon_scale"
|
||||
)
|
||||
|
||||
val view = LocalView.current
|
||||
|
||||
LaunchedEffect(interaction) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user