Skip to content

Commit f878458

Browse files
committed
Lower shadow opacity on skip controls and remove border
1 parent 8c48f9a commit f878458

File tree

8 files changed

+13
-20
lines changed

8 files changed

+13
-20
lines changed

BookPlayer/Extensions/UIView+BookPlayer.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,14 @@ extension UIView {
2929
self.layer.anchorPoint = anchorPoint
3030
}
3131

32-
func addLayerMask(_ name: String, backgroundColor: UIColor) {
32+
func addLayerMask(_ name: String, backgroundColor: UIColor, opacity: Float = 1.0) {
3333
guard let image = UIImage(named: name),
3434
let maskImage = image.cgImage else { return }
3535

3636
let layer = CALayer()
3737
layer.frame = self.bounds
3838
layer.backgroundColor = backgroundColor.cgColor
39+
layer.opacity = opacity
3940

4041
let mask = CALayer(layer: maskImage)
4142
mask.frame = self.bounds

BookPlayer/Info.plist

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
<array/>
2626
<key>CFBundleTypeName</key>
2727
<string>Audiobook Archive</string>
28+
<key>LSHandlerRank</key>
29+
<string>Default</string>
2830
<key>LSItemContentTypes</key>
2931
<array>
3032
<string>com.pkware.zip-archive</string>
@@ -187,7 +189,7 @@
187189
</dict>
188190
</array>
189191
<key>CFBundleVersion</key>
190-
<string>1</string>
192+
<string>3</string>
191193
<key>LSRequiresIPhoneOS</key>
192194
<true/>
193195
<key>LSSupportsOpeningDocumentsInPlace</key>

BookPlayer/Player/Containers/PlayerControlsViewController.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,6 @@ extension PlayerControlsViewController: Themeable {
283283
self.progressSlider.maximumTrackTintColor = theme.lightHighlightColor
284284

285285
self.artworkControl.iconColor = .white
286-
self.artworkControl.borderColor = theme.highlightColor
287286

288287
self.currentTimeLabel.textColor = theme.primaryColor
289288
self.maxTimeButton.setTitleColor(theme.primaryColor, for: .normal)

BookPlayer/Player/Views/ArtworkControl.swift

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,6 @@ class ArtworkControl: UIView, UIGestureRecognizerDelegate {
4242
}
4343
}
4444

45-
var borderColor: UIColor {
46-
get {
47-
return UIColor(cgColor: self.artworkImage.layer.borderColor!)
48-
}
49-
50-
set {
51-
self.artworkImage.layer.borderColor = newValue.withAlphaComponent(0.2).cgColor
52-
}
53-
}
54-
5545
var artwork: UIImage? {
5646
get {
5747
return self.artworkImage.image
@@ -138,6 +128,7 @@ class ArtworkControl: UIView, UIGestureRecognizerDelegate {
138128
self.artworkImage.contentMode = .scaleAspectFit
139129
self.artworkImage.layer.cornerRadius = 6.0
140130
self.artworkImage.layer.masksToBounds = true
131+
self.artworkImage.layer.borderColor = UIColor.clear.cgColor
141132

142133
self.artworkOverlay.clipsToBounds = false
143134
self.artworkOverlay.contentMode = .scaleAspectFit

BookPlayer/Player/Views/PlayerJumpIcon.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class PlayerJumpIconForward: PlayerJumpIcon {
7878
override func setup() {
7979
super.setup()
8080

81-
self.backgroundImageView.addLayerMask("playerIconShadow", backgroundColor: .playerControlsShadowColor)
81+
self.backgroundImageView.addLayerMask("playerIconShadow", backgroundColor: .playerControlsShadowColor, opacity: 0.5)
8282
self.backgroundImageView.addLayerMask("playerIconForwardArrowShadow", backgroundColor: .black)
8383
self.backgroundImageView.addLayerMask("playerIconForward", backgroundColor: .white)
8484
self.title = "+\(Int(PlayerManager.shared.forwardInterval.rounded()))s"
@@ -98,7 +98,7 @@ class PlayerJumpIconRewind: PlayerJumpIcon {
9898
override func setup() {
9999
super.setup()
100100

101-
self.backgroundImageView.addLayerMask("playerIconShadow", backgroundColor: .playerControlsShadowColor)
101+
self.backgroundImageView.addLayerMask("playerIconShadow", backgroundColor: .playerControlsShadowColor, opacity: 0.5)
102102
self.backgroundImageView.addLayerMask("playerIconRewindArrowShadow", backgroundColor: .black)
103103
self.backgroundImageView.addLayerMask("playerIconRewind", backgroundColor: .white)
104104
self.title = "\(Int(PlayerManager.shared.rewindInterval.rounded()))s"

BookPlayerWatch Extension/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
<key>CFBundlePackageType</key>
1818
<string>XPC!</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>3.3.1</string>
20+
<string>3.4.0</string>
2121
<key>CFBundleVersion</key>
22-
<string>2</string>
22+
<string>3</string>
2323
<key>CLKComplicationPrincipalClass</key>
2424
<string>$(PRODUCT_MODULE_NAME).ComplicationController</string>
2525
<key>CLKComplicationSupportedFamilies</key>

BookPlayerWatch/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<key>CFBundleShortVersionString</key>
2020
<string>3.4.0</string>
2121
<key>CFBundleVersion</key>
22-
<string>1</string>
22+
<string>3</string>
2323
<key>UISupportedInterfaceOrientations</key>
2424
<array>
2525
<string>UIInterfaceOrientationPortrait</string>

BookPlayerWidget/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
<key>CFBundlePackageType</key>
1818
<string>XPC!</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>1.0</string>
20+
<string>3.4.0</string>
2121
<key>CFBundleVersion</key>
22-
<string>1</string>
22+
<string>3</string>
2323
<key>NSExtension</key>
2424
<dict>
2525
<key>NSExtensionMainStoryboard</key>

0 commit comments

Comments
 (0)