mirror of
https://github.com/Aminark/legado-ios.git
synced 2026-10-24 04:41:23 +08:00
fix(appearance): 完善深色模式和阅读页面对比度
- 区分按钮填充与图标颜色,统一书架、书源、搜索和阅读设置的选中态 - 调整编辑器语法高亮、键盘工具栏及统计卡片的浅深色显示 - 适配 RSS 正文和登录网页背景,保留书源自定义样式和页面状态 - 补充外观切换、页面对比度和管理页面的回归测试
This commit is contained in:
@@ -81,8 +81,7 @@ struct SourceDebugView: View {
|
||||
Label(model.isRunning ? "正在调试…" : "运行完整链路", systemImage: "play.fill")
|
||||
.font(.headline).frame(maxWidth: .infinity)
|
||||
}
|
||||
.buttonStyle(.borderedProminent)
|
||||
.tint(ReadingTheme.accent)
|
||||
.readingProminentButtonStyle()
|
||||
.disabled(model.isRunning || model.keyword.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,11 +44,10 @@ struct SourceEditorView: View {
|
||||
HStack {
|
||||
ForEach(BookSourceEditorSchema.sections) { section in
|
||||
Button(section.title) { sectionID = section.id }
|
||||
.buttonStyle(.bordered)
|
||||
.tint(sectionID == section.id ? ReadingTheme.accent : .secondary)
|
||||
.readingChoiceButtonStyle(isSelected: sectionID == section.id)
|
||||
}
|
||||
Button("选项") { sectionID = "options" }.buttonStyle(.bordered)
|
||||
.tint(sectionID == "options" ? ReadingTheme.accent : .secondary)
|
||||
Button("选项") { sectionID = "options" }
|
||||
.readingChoiceButtonStyle(isSelected: sectionID == "options")
|
||||
}.padding(.horizontal)
|
||||
}.padding(.vertical, 6)
|
||||
Form {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
@preconcurrency import WebKit
|
||||
import SwiftUI
|
||||
import UIKit
|
||||
|
||||
struct SourceLoginView: View {
|
||||
let source: BookSource
|
||||
@@ -74,6 +75,9 @@ private struct SourceLoginWebView: UIViewRepresentable {
|
||||
let configuration = WKWebViewConfiguration()
|
||||
configuration.websiteDataStore = .default()
|
||||
let webView = WKWebView(frame: .zero, configuration: configuration)
|
||||
webView.isOpaque = false
|
||||
webView.backgroundColor = UIColor(ReadingTheme.canvas)
|
||||
webView.scrollView.backgroundColor = UIColor(ReadingTheme.canvas)
|
||||
webView.navigationDelegate = context.coordinator
|
||||
context.coordinator.installExistingCookies(in: webView) { webView.load(request) }
|
||||
return webView
|
||||
|
||||
@@ -61,7 +61,7 @@ struct SourceManagementView: View {
|
||||
Text("新建书源,或从文件、链接、JSON、二维码导入。")
|
||||
} actions: {
|
||||
Button("导入书源", action: presentFileImporter)
|
||||
.buttonStyle(.borderedProminent)
|
||||
.readingProminentButtonStyle()
|
||||
}
|
||||
} else {
|
||||
List {
|
||||
|
||||
Reference in New Issue
Block a user