完善阅读器主题与批注界面
This commit is contained in:
@@ -3,6 +3,7 @@ import UIKit
|
||||
final class RDEPUBNotePopupViewController: UIViewController {
|
||||
|
||||
private let note: RDEPUBResolvedNote
|
||||
private let theme: RDEPUBReaderTheme
|
||||
private let onReturnToSource: (() -> Void)?
|
||||
private let onOpenNoteLocation: (() -> Void)?
|
||||
|
||||
@@ -11,10 +12,12 @@ final class RDEPUBNotePopupViewController: UIViewController {
|
||||
|
||||
init(
|
||||
note: RDEPUBResolvedNote,
|
||||
theme: RDEPUBReaderTheme,
|
||||
onReturnToSource: (() -> Void)? = nil,
|
||||
onOpenNoteLocation: (() -> Void)? = nil
|
||||
) {
|
||||
self.note = note
|
||||
self.theme = theme
|
||||
self.onReturnToSource = onReturnToSource
|
||||
self.onOpenNoteLocation = onOpenNoteLocation
|
||||
super.init(nibName: nil, bundle: nil)
|
||||
@@ -28,7 +31,7 @@ final class RDEPUBNotePopupViewController: UIViewController {
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
view.backgroundColor = .systemBackground
|
||||
view.backgroundColor = theme.toolBackgroundColor
|
||||
navigationItem.rightBarButtonItem = UIBarButtonItem(
|
||||
barButtonSystemItem: .done,
|
||||
target: self,
|
||||
@@ -83,8 +86,8 @@ final class RDEPUBNotePopupViewController: UIViewController {
|
||||
var configuration = UIButton.Configuration.filled()
|
||||
configuration.cornerStyle = .medium
|
||||
configuration.title = title
|
||||
configuration.baseBackgroundColor = .secondarySystemBackground
|
||||
configuration.baseForegroundColor = .label
|
||||
configuration.baseBackgroundColor = theme.toolControlTextColor.withAlphaComponent(0.10)
|
||||
configuration.baseForegroundColor = theme.toolControlTextColor
|
||||
button.configuration = configuration
|
||||
if title == "返回原文" {
|
||||
button.accessibilityIdentifier = "epub.reader.note.return"
|
||||
@@ -103,7 +106,7 @@ final class RDEPUBNotePopupViewController: UIViewController {
|
||||
<style>
|
||||
body {
|
||||
font: -apple-system-body;
|
||||
color: #1f1f1f;
|
||||
color: \(theme.themeTextColorCSS);
|
||||
line-height: 1.55;
|
||||
}
|
||||
a { color: #3b6ea8; }
|
||||
|
||||
Reference in New Issue
Block a user