Skip to content

Commit

Permalink
Playqueue: Adjust constraints for smaller devices
Browse files Browse the repository at this point in the history
  • Loading branch information
edrflt committed Oct 20, 2021
1 parent 70b78a3 commit 38a078c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Sources/Playback/Queue/QueueViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class QueueViewController: UIViewController {
private var topConstraint: NSLayoutConstraint?
private var topConstraintConstant: CGFloat {
if parent is VideoPlayerViewController || parent is VLCMovieViewController {
return 200
return UIDevice.hasNotch ? 75 : 50
} else {
return 0
}
Expand Down Expand Up @@ -149,7 +149,7 @@ class QueueViewController: UIViewController {
if let parent = parent as? VideoPlayerViewController {
topConstraint = nil
heightConstraint = view.heightAnchor.constraint(equalTo: parent.view.heightAnchor,
constant: -(topConstraintConstant + parent.videoPlayerControls.frame.height))
constant: -(topConstraintConstant + parent.videoPlayerControls.frame.height + parent.scrubProgressBar.frame.height))
bottomConstraint = view.bottomAnchor.constraint(equalTo: parent.view.bottomAnchor,
constant: self.view.frame.height)
} else {
Expand Down
4 changes: 2 additions & 2 deletions Sources/Playback/VideoPlayer/VideoPlayerViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class VideoPlayerViewController: UIViewController {
return optionsNavigationBar
}()

lazy var videoPlayerControls: VideoPlayerControls = {
private(set) lazy var videoPlayerControls: VideoPlayerControls = {
let videoPlayerControls = Bundle.main.loadNibNamed("VideoPlayerControls",
owner: nil,
options: nil)?.first as! VideoPlayerControls
Expand All @@ -176,7 +176,7 @@ class VideoPlayerViewController: UIViewController {
return videoPlayerControls
}()

private lazy var scrubProgressBar: MediaScrubProgressBar = {
private(set) lazy var scrubProgressBar: MediaScrubProgressBar = {
var scrubProgressBar = MediaScrubProgressBar()
scrubProgressBar.delegate = self
return scrubProgressBar
Expand Down

0 comments on commit 38a078c

Please sign in to comment.