mirror of
https://github.com/Aminark/legado-ios.git
synced 2026-10-23 20:31:22 +08:00
fix(appearance): 完善深色模式和阅读页面对比度
- 区分按钮填充与图标颜色,统一书架、书源、搜索和阅读设置的选中态 - 调整编辑器语法高亮、键盘工具栏及统计卡片的浅深色显示 - 适配 RSS 正文和登录网页背景,保留书源自定义样式和页面状态 - 补充外观切换、页面对比度和管理页面的回归测试
This commit is contained in:
@@ -492,7 +492,7 @@ struct ReaderView: View {
|
||||
.accessibilityIdentifier("reader.failureChangeSource")
|
||||
}
|
||||
}
|
||||
.buttonStyle(.bordered)
|
||||
.readingSecondaryButtonStyle()
|
||||
}
|
||||
|
||||
private func openSourceSwitch() {
|
||||
@@ -1118,7 +1118,7 @@ struct ReaderView: View {
|
||||
Image(systemName: "textformat.size.smaller")
|
||||
.frame(width: 38, height: 32)
|
||||
}
|
||||
.buttonStyle(.bordered)
|
||||
.readingSecondaryButtonStyle()
|
||||
|
||||
VStack(spacing: 2) {
|
||||
Text("字号")
|
||||
@@ -1135,7 +1135,7 @@ struct ReaderView: View {
|
||||
Image(systemName: "textformat.size.larger")
|
||||
.frame(width: 38, height: 32)
|
||||
}
|
||||
.buttonStyle(.bordered)
|
||||
.readingSecondaryButtonStyle()
|
||||
}
|
||||
|
||||
HStack(spacing: 8) {
|
||||
@@ -1285,14 +1285,19 @@ struct ReaderView: View {
|
||||
Text(choice.title)
|
||||
.font(.caption2)
|
||||
}
|
||||
.foregroundStyle(pageAnimation == choice.value ? Color.white : Color.primary)
|
||||
.foregroundStyle(pageAnimation == choice.value ? ReadingTheme.onAccent : Color.primary)
|
||||
.frame(width: 58, height: 54)
|
||||
.background(
|
||||
pageAnimation == choice.value ? ReadingTheme.accent : Color.secondary.opacity(0.1),
|
||||
pageAnimation == choice.value ? ReadingTheme.accentFill : Color.secondary.opacity(0.1),
|
||||
in: RoundedRectangle(cornerRadius: 12, style: .continuous)
|
||||
)
|
||||
.overlay {
|
||||
RoundedRectangle(cornerRadius: 12, style: .continuous)
|
||||
.strokeBorder(pageAnimation == choice.value ? ReadingTheme.selectionBorder : .clear, lineWidth: 1)
|
||||
}
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
.accessibilityAddTraits(pageAnimation == choice.value ? .isSelected : [])
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1392,12 +1397,16 @@ struct ReaderView: View {
|
||||
Button(action: action) {
|
||||
Text(title)
|
||||
.font(.caption.weight(.medium))
|
||||
.foregroundStyle(selected ? Color.white : Color.primary)
|
||||
.foregroundStyle(selected ? ReadingTheme.onAccent : Color.primary)
|
||||
.padding(.horizontal, 12)
|
||||
.padding(.vertical, 7)
|
||||
.background(selected ? ReadingTheme.accent : Color.secondary.opacity(0.1), in: Capsule())
|
||||
.background(selected ? ReadingTheme.accentFill : Color.secondary.opacity(0.1), in: Capsule())
|
||||
.overlay {
|
||||
Capsule().strokeBorder(selected ? ReadingTheme.selectionBorder : .clear, lineWidth: 1)
|
||||
}
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
.accessibilityAddTraits(selected ? .isSelected : [])
|
||||
}
|
||||
|
||||
private func valueSlider(
|
||||
|
||||
Reference in New Issue
Block a user