收口玻璃交互与界面细节
This commit is contained in:
1 parent
8f5923556d
commit
07dc93cd07
6 files changed
+14
-31
No files matched your search
@@ -157,35 +157,6 @@ private fun homeAccentColor(): Color {
|
||||
return if (value == Color.Unspecified) GlassTokens.accent else value
|
||||
}
|
||||
|
||||
/* ---- Shared home UI state ---- */
|
||||
object HomeUiState {
|
||||
var selectedLibrary by mutableStateOf<EmbyMediaFolder?>(null)
|
||||
var serverName by mutableStateOf("")
|
||||
var immersiveSurfaceIsDark by mutableStateOf(false)
|
||||
}
|
||||
|
||||
/* ---- Top Bar ---- */
|
||||
@Composable
|
||||
fun HomeTopBar(modifier: Modifier = Modifier) {
|
||||
LiquidGlassTopBar(modifier) {
|
||||
Row(
|
||||
Modifier.fillMaxWidth().padding(horizontal = 18.dp, vertical = 12.dp),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
) {
|
||||
Box(
|
||||
Modifier.size(38.dp).clip(CircleShape)
|
||||
.background(Brush.linearGradient(listOf(Color(0xFF6EA8FF), Color(0xFF9B6BFF)))),
|
||||
contentAlignment = Alignment.Center,
|
||||
) {
|
||||
LumaIconView(LumaIcon.User, contentDescription = null, tint = Color.White, modifier = Modifier.size(22.dp))
|
||||
}
|
||||
Column(Modifier.padding(start = 10.dp)) {
|
||||
Text(text = stringResource(Res.string.home_media_center), color = GlassTokens.text, fontSize = 16.sp, fontWeight = FontWeight.SemiBold)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* ---- Hero Carousel ---- */
|
||||
@Composable
|
||||
private fun HeroCarousel(
|
||||
|
||||
@@ -66,6 +66,7 @@ import androidx.compose.ui.graphics.CompositingStrategy
|
||||
import androidx.compose.ui.graphics.graphicsLayer
|
||||
import androidx.compose.ui.input.pointer.pointerInput
|
||||
import androidx.compose.ui.geometry.Rect
|
||||
import androidx.compose.ui.semantics.Role
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import com.example.myapplication.R as Res
|
||||
@@ -290,7 +291,7 @@ fun SegmentedControl(
|
||||
GlassTokens.glassBorder.copy(alpha = selectedProgress * 0.9f),
|
||||
RoundedCornerShape(16.dp),
|
||||
)
|
||||
.clickable { onSelect(index) }
|
||||
.clickable(role = Role.Button) { onSelect(index) }
|
||||
.padding(horizontal = 10.dp, vertical = 9.dp),
|
||||
contentAlignment = Alignment.Center,
|
||||
) {
|
||||
@@ -350,9 +351,10 @@ fun GlassSearchField(
|
||||
),
|
||||
modifier = Modifier.weight(1f).onFocusChanged { focused = it.isFocused },
|
||||
decorationBox = { inner ->
|
||||
Box {
|
||||
if (value.isEmpty()) {
|
||||
Text(text = placeholder, color = GlassTokens.subtext, fontSize = 15.sp)
|
||||
} else {
|
||||
}
|
||||
inner()
|
||||
}
|
||||
},
|
||||
@@ -364,6 +366,7 @@ fun GlassSearchField(
|
||||
.clickable(
|
||||
indication = null,
|
||||
interactionSource = remember { MutableInteractionSource() },
|
||||
role = Role.Button,
|
||||
onClick = { onValueChange("") },
|
||||
),
|
||||
contentAlignment = Alignment.Center,
|
||||
|
||||
@@ -27,3 +27,9 @@
|
||||
文件变更: ui/design/LumaDesignSystem.kt、ui/LiquidGlass.kt、screens/LibraryScreen.kt。
|
||||
教训: 清理前以全仓库引用结果确认目标确实未被活动页面使用。
|
||||
标签: #lumaplayer #liquid-glass #library #cleanup
|
||||
|
||||
[PROJECT:lumaplayer] 最终收口与构建验证
|
||||
结论: 修复搜索框空值焦点绘制,补充分段/搜索/资源库操作语义,清理已确认无引用的 Home 与 Library 遗留 UI;Debug、Lint、Unit 和 API35 启动回归通过。
|
||||
文件变更: screens/HomeScreen.kt、screens/LibraryScreen.kt、ui/LiquidGlass.kt、ui/design/LumaComponents.kt、ui/design/LumaDesignSystem.kt 及 memory/*。
|
||||
教训: 参考素材和本地资料保持未跟踪,不随源码提交。
|
||||
标签: #lumaplayer #cleanup #accessibility #build
|
||||
@@ -13,3 +13,4 @@
|
||||
- 最新校验:修复降级玻璃高光覆盖内容、首页滚动状态恢复与重复详情/播放器导航;Debug/Lint/Unit 和 API35 模拟器启动回归成功。
|
||||
- 最新校验:修复玻璃模式切换后的 Backdrop/source 与材质缓存刷新;设置页行组件、分组标题和子页返回栏统一;Debug/Lint/Unit 与 API35 模拟器液态↔毛玻璃切换回归成功。
|
||||
- 最新收敛:降低统一玻璃边缘高光/白边,清理 `LibraryScreen` 无引用的旧图标库 UI;资源库列表/网格切换回归无崩溃。
|
||||
- 最终收口:修复搜索输入框空值焦点绘制、补充分段与资源库操作语义,清理 Home/Library 无引用遗留 UI;源码已完成构建并准备推送。
|
||||
@@ -23,3 +23,4 @@
|
||||
- 高:用户明确要求真实液态玻璃时,不能继续保留设备/模拟器安全门;当前仅保留 API 31+ 能力判断,底栏原生 Backdrop 必须先绘制容器与选中胶囊,再绘制清晰图标/文字,避免内容被二次采样覆盖。该取舍需在实体机 GPU 上继续验证 RenderThread 稳定性。
|
||||
- 中:玻璃模式是全局 Compose 状态;涉及 `rememberLayerBackdrop` 或玻璃规格的缓存必须把 `AppTheme.glassMode` 纳入重建边界,否则设置副标题会变但材质不变。
|
||||
- 低:清理页面遗留实现前必须用全仓库引用检索确认;私有且无调用的旧 UI 可以删除,活动页面保留原数据/弹窗实现。
|
||||
- 低:`BasicTextField` 的 `decorationBox` 无论是否为空都必须调用 `inner()`;占位文案应与真实输入内容叠放,否则会破坏焦点和光标绘制。
|
||||
@@ -41,3 +41,4 @@
|
||||
- 2026-08-28:按需求取消液态玻璃设备/模拟器安全门,API 31+ 液态模式直接进入 Kyant Backdrop 原生路径;底栏改为玻璃底层、选中胶囊、清晰内容的正确绘制顺序,主图标 40dp、搜索图标 44dp、文字 8sp;补充媒体卡片加载/成功/失败三态和统一按压反馈。`assembleDebug`、`lintDebug`、`testDebugUnitTest` 及 API35 模拟器液态/毛玻璃切换回归成功,未发现 RenderThread 崩溃。
|
||||
- 2026-08-28:修复玻璃模式切换时 `LayerBackdrop` 与 `GlassSpec` 缓存未刷新问题;新增 `LumaSettingRow`、`LumaPageTopBar`、设置分组标题并补齐公共按钮语义。完整 Debug/Lint/Unit 成功,API35 模拟器切换液态→毛玻璃→液态成功且无 RenderThread 崩溃;参考素材仍未提交。
|
||||
- 2026-08-28:收敛原生/降级玻璃边缘高光与白边,清理 `LibraryScreen` 中确认无引用的旧图标库 Section/Card/DetailDialog,并为资源库主要操作补充按钮语义;Debug/Lint/Unit 成功,模拟器资源库列表/网格切换无崩溃。
|
||||
- 2026-08-28:最终收口修复 `GlassSearchField` 空值时的真实输入框绘制,补充分段控件、搜索清除和资源库操作的按钮语义,删除 Home/Library 已确认无引用的遗留 UI;完整 Debug/Lint/Unit 与 API35 启动回归通过,准备提交推送。
|
||||
Reference in new issue
Block a user