Skip to content

Commit

Permalink
Track Info - replace tables with textView, pretty scroller improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-venugopal committed Apr 23, 2024
1 parent 2415b67 commit 6ced2ff
Show file tree
Hide file tree
Showing 15 changed files with 278 additions and 392 deletions.
12 changes: 8 additions & 4 deletions macOS/Aural-macOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,8 @@
3EE9BCB7278A896800DFFDD7 /* ColorSchemeableBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EE9BCB6278A896800DFFDD7 /* ColorSchemeableBox.swift */; };
3EEBC6EC27C14A4B00880DFD /* HorizontalSliderCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EEBC6EB27C14A4B00880DFD /* HorizontalSliderCell.swift */; };
3EEBC6EE27C16CF700880DFD /* EffectsUnitStateObserverRegistry.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EEBC6ED27C16CF700880DFD /* EffectsUnitStateObserverRegistry.swift */; };
3EEC6EC92BD8464A00BC5D32 /* TrackInfoKVListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EEC6EC82BD8464A00BC5D32 /* TrackInfoKVListViewController.swift */; };
3EEC6ECB2BD8472200BC5D32 /* TrackInfoKVList.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3EEC6ECA2BD8472200BC5D32 /* TrackInfoKVList.xib */; };
3EEFF58927DE842C002CB0FE /* PlayQueueDelegateProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EEFF58327DE842C002CB0FE /* PlayQueueDelegateProtocol.swift */; };
3EEFF58A27DE842C002CB0FE /* PlayQueueDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EEFF58427DE842C002CB0FE /* PlayQueueDelegate.swift */; };
3EEFF58B27DE842C002CB0FE /* PlayQueue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EEFF58527DE842C002CB0FE /* PlayQueue.swift */; };
Expand All @@ -611,7 +613,6 @@
3EFAA8D52B7146AC001A6682 /* ChaptersListSearchFieldCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EFAA8D42B7146AC001A6682 /* ChaptersListSearchFieldCell.swift */; };
3EFB64932772361D00D47A6B /* TimeStretchSliderCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EFB64922772361D00D47A6B /* TimeStretchSliderCell.swift */; };
3EFB64952772491C00D47A6B /* EffectsUnitTriStateCheckButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EFB64942772491C00D47A6B /* EffectsUnitTriStateCheckButton.swift */; };
3EFB9ECF26A689D800EA8440 /* MetadataTrackInfo.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3EFB9ECE26A689D800EA8440 /* MetadataTrackInfo.xib */; };
3EFB9ED326A68A2400EA8440 /* TrackInfoViewDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EFB9ED226A68A2400EA8440 /* TrackInfoViewDelegate.swift */; };
3EFB9ED626A68B1F00EA8440 /* MetadataTrackInfoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EFB9ED526A68B1F00EA8440 /* MetadataTrackInfoViewController.swift */; };
3EFE0A8C2B4B364200C9B121 /* TrackHistoryItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EFE0A8B2B4B364200C9B121 /* TrackHistoryItem.swift */; };
Expand Down Expand Up @@ -1633,6 +1634,8 @@
3EEABD432B56D47E00263797 /* Library+Build.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Library+Build.swift"; sourceTree = "<group>"; };
3EEBC6EB27C14A4B00880DFD /* HorizontalSliderCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HorizontalSliderCell.swift; sourceTree = "<group>"; };
3EEBC6ED27C16CF700880DFD /* EffectsUnitStateObserverRegistry.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EffectsUnitStateObserverRegistry.swift; sourceTree = "<group>"; };
3EEC6EC82BD8464A00BC5D32 /* TrackInfoKVListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TrackInfoKVListViewController.swift; sourceTree = "<group>"; };
3EEC6ECA2BD8472200BC5D32 /* TrackInfoKVList.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = TrackInfoKVList.xib; sourceTree = "<group>"; };
3EEFF58327DE842C002CB0FE /* PlayQueueDelegateProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PlayQueueDelegateProtocol.swift; sourceTree = "<group>"; };
3EEFF58427DE842C002CB0FE /* PlayQueueDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PlayQueueDelegate.swift; sourceTree = "<group>"; };
3EEFF58527DE842C002CB0FE /* PlayQueue.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PlayQueue.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1674,7 +1677,6 @@
3EFAA8D42B7146AC001A6682 /* ChaptersListSearchFieldCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChaptersListSearchFieldCell.swift; sourceTree = "<group>"; };
3EFB64922772361D00D47A6B /* TimeStretchSliderCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimeStretchSliderCell.swift; sourceTree = "<group>"; };
3EFB64942772491C00D47A6B /* EffectsUnitTriStateCheckButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EffectsUnitTriStateCheckButton.swift; sourceTree = "<group>"; };
3EFB9ECE26A689D800EA8440 /* MetadataTrackInfo.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MetadataTrackInfo.xib; sourceTree = "<group>"; };
3EFB9ED226A68A2400EA8440 /* TrackInfoViewDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TrackInfoViewDelegate.swift; sourceTree = "<group>"; };
3EFB9ED526A68B1F00EA8440 /* MetadataTrackInfoViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MetadataTrackInfoViewController.swift; sourceTree = "<group>"; };
3EFE0A8B2B4B364200C9B121 /* TrackHistoryItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TrackHistoryItem.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -3359,6 +3361,8 @@
3E1341272B6F008E009782B6 /* TrackInfoViewController+MenuDelegate.swift */,
3EFB9ED226A68A2400EA8440 /* TrackInfoViewDelegate.swift */,
3E36BD4D26A6AA5A00B6E28B /* TableViewRepresentations.swift */,
3EEC6ECA2BD8472200BC5D32 /* TrackInfoKVList.xib */,
3EEC6EC82BD8464A00BC5D32 /* TrackInfoKVListViewController.swift */,
3EFB9ECC26A688B100EA8440 /* Metadata */,
3E36BD2F26A68E7800B6E28B /* Lyrics */,
3E36BD3626A68F6300B6E28B /* CoverArt */,
Expand Down Expand Up @@ -4232,7 +4236,6 @@
3EFB9ECC26A688B100EA8440 /* Metadata */ = {
isa = PBXGroup;
children = (
3EFB9ECE26A689D800EA8440 /* MetadataTrackInfo.xib */,
3EFB9ED526A68B1F00EA8440 /* MetadataTrackInfoViewController.swift */,
3E6C103725CEB98600BF0D07 /* MetadataTrackInfoSource.swift */,
);
Expand Down Expand Up @@ -5219,7 +5222,6 @@
3EF0C3E5262A9EF30042C720 /* CreateTheme.xib in Resources */,
3EAF96FD28DCE1B6008561A7 /* coming-soon.regular.ttf in Resources */,
3E51CCF0285E8986002CBEF2 /* UnifiedPlayerSidebar.xib in Resources */,
3EFB9ECF26A689D800EA8440 /* MetadataTrackInfo.xib in Resources */,
3E6C125E25CEBE0600BF0D07 /* ReverbPresetsManager.xib in Resources */,
3E6C12A425CEBE2700BF0D07 /* AboutDialog.xib in Resources */,
3E8C370D2BD402080045FC92 /* CompactPlayerCoverArtTrackInfo.xib in Resources */,
Expand All @@ -5234,6 +5236,7 @@
3ECBF3082619D58E00AD5C30 /* AudioUnits.xib in Resources */,
3E6C126625CEBE0600BF0D07 /* DelayPresetsManager.xib in Resources */,
3E5F943425E571A6002DEF80 /* Visualizer.xib in Resources */,
3EEC6ECB2BD8472200BC5D32 /* TrackInfoKVList.xib in Resources */,
3E2000C1267CE00E008BAB70 /* GesturesPreferences.xib in Resources */,
3E6C12FC25CEBE8F00BF0D07 /* ModularPlayer.xib in Resources */,
3EAF96FF28DCE1B6008561A7 /* CarroisGothicSC-Regular.ttf in Resources */,
Expand Down Expand Up @@ -5339,6 +5342,7 @@
3EFE3A8727864898006F8B8C /* FileSystemInfo.swift in Sources */,
3ECBF30A2619DF7200AD5C30 /* AudioUnitsViewController+TableViewDelegate.swift in Sources */,
3E6C66A92B54686D00AA0D81 /* LegacyAudioGraphPersistentState.swift in Sources */,
3EEC6EC92BD8464A00BC5D32 /* TrackInfoKVListViewController.swift in Sources */,
3EFE387527864896006F8B8C /* ReverbUnit.swift in Sources */,
3ECBF3062619D58500AD5C30 /* AudioUnitsViewController.swift in Sources */,
3E6C128525CEBE1800BF0D07 /* AuralColorPicker.swift in Sources */,
Expand Down
8 changes: 8 additions & 0 deletions macOS/Source/UI/CustomViews/PrettyScroller.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,22 @@ class PrettyScroller: NSScroller {

var knobColor: NSColor = NSColor.gray

@IBOutlet weak var scrollView: NSScrollView!
@IBOutlet weak var contentView: NSView!

override func awakeFromNib() {
self.scrollerStyle = .overlay
}

override func drawKnob() {

if contentView != nil, scrollView != nil, contentView.height <= scrollView.height {
return
}

let knobRect = self.rect(for: .knob).insetBy(dx: knobInsetX, dy: knobInsetY)
if knobRect.height <= 0 || knobRect.width <= 0 {return}

NSBezierPath.fillRoundedRect(knobRect, radius: knobRadius, withColor: .scrollerKnobColor)
}

Expand Down
10 changes: 10 additions & 0 deletions macOS/Source/UI/CustomViews/TextFields/TintableTextField.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,13 @@ extension NSTextField: ColorSchemePropertyChangeReceiver {
// font = newFont
// }
//}

extension NSTextView {

func setBackgroundColor(_ newColor: PlatformColor) {

backgroundColor = newColor
enclosingScrollView?.backgroundColor = newColor
enclosingScrollView?.contentView.backgroundColor = newColor
}
}
18 changes: 11 additions & 7 deletions macOS/Source/UI/PlayQueue/ExpandedView/PlayQueueExpandedView.xib
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22505"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22689"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
Expand Down Expand Up @@ -98,7 +98,7 @@
<rect key="frame" x="44" y="2" width="340" height="50"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="ZBX-aA-NAy" userLabel="Title" customClass="CenterTextLabel" customModule="Aural" customModuleProvider="target">
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="ZBX-aA-NAy" userLabel="Title" customClass="CenterTextLabel" customModule="Aural" customModuleProvider="target">
<rect key="frame" x="8" y="25" width="332" height="22"/>
<constraints>
<constraint firstAttribute="height" constant="22" id="a9d-Cg-WAK"/>
Expand All @@ -109,7 +109,7 @@
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="SU0-ut-uHa" userLabel="Default Display Name" customClass="CenterTextLabel" customModule="Aural" customModuleProvider="target">
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="SU0-ut-uHa" userLabel="Default Display Name" customClass="CenterTextLabel" customModule="Aural" customModuleProvider="target">
<rect key="frame" x="8" y="5" width="332" height="40"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="UU6-Pd-Rza"/>
Expand All @@ -120,7 +120,7 @@
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="vJS-xt-F7y" userLabel="Artist Album" customClass="CenterTextLabel" customModule="Aural" customModuleProvider="target">
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="vJS-xt-F7y" userLabel="Artist Album" customClass="CenterTextLabel" customModule="Aural" customModuleProvider="target">
<rect key="frame" x="8" y="3" width="332" height="22"/>
<constraints>
<constraint firstAttribute="height" constant="22" id="3m7-rA-xeC"/>
Expand Down Expand Up @@ -168,7 +168,7 @@
<rect key="frame" x="387" y="2" width="70" height="50"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="bxe-de-Six" userLabel="Duration">
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="bxe-de-Six" userLabel="Duration">
<rect key="frame" x="-2" y="10" width="69" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="J5d-DA-zWJ"/>
Expand Down Expand Up @@ -205,9 +205,13 @@
<rect key="frame" x="-100" y="-100" width="500" height="15"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="NrJ-XW-mbV">
<scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="NrJ-XW-mbV" customClass="PrettyScroller" customModule="Aural" customModuleProvider="target">
<rect key="frame" x="-100" y="-100" width="15" height="102"/>
<autoresizingMask key="autoresizingMask"/>
<connections>
<outlet property="contentView" destination="RAo-B3-mxT" id="wTn-uG-Rcm"/>
<outlet property="scrollView" destination="KbK-mP-1to" id="QnX-yt-7U8"/>
</connections>
</scroller>
</scrollView>
</subviews>
Expand Down
8 changes: 6 additions & 2 deletions macOS/Source/UI/PlayQueue/SimpleView/PlayQueueSimpleView.xib
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<customView misplaced="YES" id="c22-O7-iKe">
<customView id="c22-O7-iKe">
<rect key="frame" x="0.0" y="0.0" width="447" height="177"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<subviews>
Expand Down Expand Up @@ -173,9 +173,13 @@
<rect key="frame" x="-100" y="-100" width="500" height="15"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="NrJ-XW-mbV">
<scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="NrJ-XW-mbV" customClass="PrettyScroller" customModule="Aural" customModuleProvider="target">
<rect key="frame" x="-100" y="-100" width="15" height="177"/>
<autoresizingMask key="autoresizingMask"/>
<connections>
<outlet property="contentView" destination="RAo-B3-mxT" id="5i0-LU-yBh"/>
<outlet property="scrollView" destination="KbK-mP-1to" id="uhf-op-tb0"/>
</connections>
</scroller>
</scrollView>
</subviews>
Expand Down
Loading

0 comments on commit 6ced2ff

Please sign in to comment.