Skip to content

Commit

Permalink
swift-format
Browse files Browse the repository at this point in the history
  • Loading branch information
mtgto committed Apr 9, 2022
1 parent 6fba7ab commit 3cb0af6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Fomalhaut2/SpreadPageViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Shared

struct LoadedImage {
let preload: Bool
let firstPageIndex: Int // page index of first page in images
let firstPageIndex: Int // page index of first page in images
let images: [NSImage]
}

Expand Down Expand Up @@ -37,14 +37,14 @@ class SpreadPageViewController: NSViewController {
@IBOutlet weak var secondImageView: BookImageView!
@IBOutlet weak var leftPageNumberButton: NSButton!
@IBOutlet weak var rightPageNumberButton: NSButton!

override func viewDidLoad() {
super.viewDidLoad()
// TODO: Use NSStackView#setViews instead of use userInterfaceLayoutDirection for page order?
self.imageStackView.userInterfaceLayoutDirection = .rightToLeft
self.firstImageView.notificationName = firstImageViewMouseUpNotificationName
self.secondImageView.notificationName = secondImageViewMouseUpNotificationName

self.leftPageNumberButton.wantsLayer = true
self.leftPageNumberButton.layer?.backgroundColor = CGColor(gray: 0.5, alpha: 0.4)
self.leftPageNumberButton.layer?.cornerRadius = 10
Expand Down Expand Up @@ -265,7 +265,7 @@ class SpreadPageViewController: NSViewController {
return NSSize(width: width, height: height)
}
}

@IBAction func toggleShowPageNumber(_ sender: Any) {
UserDefaults.standard.set(!self.showPageNumber.value, forKey: SpreadPageViewController.showPageNumberKey)
self.showPageNumber.accept(!self.showPageNumber.value)
Expand Down

0 comments on commit 3cb0af6

Please sign in to comment.