feat(ui): 主题切换 + 语言持久化 + About 对话框
- 新增 light/dark 主题调色板与 Windows 注册表系统主题探测 - 偏好设置对话框:主题三选一 + 语言下拉(en/zh-CN/de),即时生效 - 持久化 Language/Theme/AutoLockMinutes/MinimizeToTray 至 YAML 顶层 - 启动时按 config 中保存的语言初始化 i18n - About 对话框展示 version/runtime/项目地址/许可证 - 全部硬编码颜色迁移到 themePalette,为深色模式做准备
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package ui
|
||||
|
||||
import (
|
||||
"image/color"
|
||||
"time"
|
||||
|
||||
"gioui.org/layout"
|
||||
@@ -28,11 +27,11 @@ func entryProgressRing(gtx layout.Context, en *entry) layout.Dimensions {
|
||||
remaining := int64(period) - elapsed
|
||||
progress := float32(remaining) / float32(period)
|
||||
|
||||
fg := color.NRGBA{R: 0x10, G: 0x70, B: 0xff, A: 0xff}
|
||||
fg := activePalette.RingFg
|
||||
if remaining <= 5 {
|
||||
fg = color.NRGBA{R: 0xd0, G: 0x30, B: 0x30, A: 0xff}
|
||||
fg = activePalette.RingFgWarn
|
||||
}
|
||||
bg := color.NRGBA{R: 0xd8, G: 0xd8, B: 0xd8, A: 0xff}
|
||||
bg := activePalette.RingBg
|
||||
|
||||
return progressRing{
|
||||
Size: unit.Dp(ringDp),
|
||||
|
||||
Reference in New Issue
Block a user