Skip to content
Permalink
Browse files

Use PlayerSliderCell for MiniPlayer

Ref: #2477
  • Loading branch information...
alejx committed Jun 1, 2019
1 parent b07dd94 commit 797516616c0bed72d9ca001185d1954371cd9413
Showing with 9 additions and 5 deletions.
  1. +4 −4 iina/Base.lproj/MiniPlayerWindowController.xib
  2. +5 −1 iina/PlaySliderCell.swift
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14460.31"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14490.70"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@@ -45,7 +45,7 @@
<windowCollectionBehavior key="collectionBehavior" fullScreenNone="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="196" y="240" width="300" height="72"/>
<rect key="screenRect" x="0.0" y="0.0" width="2560" height="1057"/>
<rect key="screenRect" x="0.0" y="0.0" width="3840" height="1057"/>
<value key="minSize" type="size" width="300" height="72"/>
<view key="contentView" id="se5-gp-TjO">
<rect key="frame" x="0.0" y="0.0" width="300" height="72"/>
@@ -101,7 +101,7 @@
</textField>
<slider verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="e3M-Ma-JJM">
<rect key="frame" x="44" y="8" width="212" height="15"/>
<sliderCell key="cell" controlSize="small" continuous="YES" refusesFirstResponder="YES" state="on" alignment="left" maxValue="100" doubleValue="50" tickMarkPosition="above" sliderType="linear" id="Y51-2C-Qcg"/>
<sliderCell key="cell" controlSize="small" continuous="YES" refusesFirstResponder="YES" state="on" alignment="left" maxValue="100" doubleValue="50" tickMarkPosition="above" sliderType="linear" id="Y51-2C-Qcg" customClass="PlaySliderCell" customModule="IINA" customModuleProvider="target"/>
<connections>
<action selector="playSliderChanges:" target="-2" id="qdw-Jb-iyq"/>
</connections>
@@ -24,7 +24,11 @@ fileprivate extension NSColor {
class PlaySliderCell: NSSliderCell {

lazy var playerCore: PlayerCore = {
return (self.controlView!.window!.windowController as! MainWindowController).player
let windowController = self.controlView!.window!.windowController
if let mainWindowController = windowController as? MainWindowController {
return mainWindowController.player
}
return (windowController as! MiniPlayerWindowController).player
}()

override var knobThickness: CGFloat {

0 comments on commit 7975166

Please sign in to comment.
You can’t perform that action at this time.