Skip to content

Commit

Permalink
#112 preview14 release (Menu Bar mode fix)
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-venugopal committed Nov 12, 2024
1 parent 2c2f14a commit d88efa0
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 72 deletions.
8 changes: 4 additions & 4 deletions Aural.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -6714,7 +6714,7 @@
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = "4.0.0-preview13";
CURRENT_PROJECT_VERSION = "4.0.0-preview14";
DEVELOPMENT_TEAM = C4YUF2G676;
FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../Frameworks";
HEADER_SEARCH_PATHS = "${SOURCE_ROOT}/../**";
Expand All @@ -6731,7 +6731,7 @@
"$(PROJECT_DIR)/ToolsAndScripts/LibCueBuild",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
MARKETING_VERSION = "4.0.0-preview13";
MARKETING_VERSION = "4.0.0-preview14";
ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = com.kv.Aural;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -6753,7 +6753,7 @@
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = "4.0.0-preview13";
CURRENT_PROJECT_VERSION = "4.0.0-preview14";
DEVELOPMENT_TEAM = C4YUF2G676;
FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../Frameworks";
HEADER_SEARCH_PATHS = "${SOURCE_ROOT}/../**";
Expand All @@ -6770,7 +6770,7 @@
"$(PROJECT_DIR)/ToolsAndScripts/LibCueBuild",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
MARKETING_VERSION = "4.0.0-preview13";
MARKETING_VERSION = "4.0.0-preview14";
PRODUCT_BUNDLE_IDENTIFIER = com.kv.Aural;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = Source/Core/bridge.h;
Expand Down
Binary file not shown.
8 changes: 4 additions & 4 deletions Documentation/Release Notes.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# What's New in Version 4.0.0-preview13
# What's New in Version 4.0.0-preview14

## #102 - Modular player window now horizontally resizable
Thanks @focusonsight for requesting this enhancement!
## #112 - Redesigned presentation modes menu in Menu Bar mode
Thanks @nextofsearch for reporting the bug!

## Fixed a lot of memory leaks (when switching between app modes)
## Fixed some bugs related to the track info and chapters list views

### **For more info**
Visit the [official release page](https://github.com/kartik-venugopal/aural-player/releases/tag/4.0.0-preview)
66 changes: 24 additions & 42 deletions Source/UI/MenuBarPlayer/MenuBarPlayer.xib
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,15 @@
<customObject id="-2" userLabel="File's Owner" customClass="MenuBarPlayerViewController" customModule="Aural" customModuleProvider="target">
<connections>
<outlet property="artView" destination="WCq-Eb-sSB" id="zra-Oi-efb"/>
<outlet property="btnCompactMode" destination="bV4-WK-nNi" id="dc2-WS-JX0"/>
<outlet property="btnLoop" destination="Y0O-RQ-7r1" id="cfW-gc-hXW"/>
<outlet property="btnModularMode" destination="8da-oj-HLG" id="yjT-i6-1aY"/>
<outlet property="btnNextTrack" destination="ffS-Wf-PIL" id="Twh-Eu-6Hd"/>
<outlet property="btnPlayPause" destination="k6P-VT-BGY" id="rwJ-uf-z8Y"/>
<outlet property="btnPreviousTrack" destination="AAi-7n-PAk" id="sDp-P3-en5"/>
<outlet property="btnQuit" destination="enq-6c-0bc" id="YLr-E1-cR4"/>
<outlet property="btnRepeat" destination="vDs-we-Jvw" id="M4H-fK-2JS"/>
<outlet property="btnSettings" destination="t49-BV-Ux5" id="1vX-fw-yrS"/>
<outlet property="btnShuffle" destination="0r6-na-u8Q" id="8zK-n5-fJh"/>
<outlet property="btnUnifiedMode" destination="fOP-lC-pbG" id="HD3-04-Sef"/>
<outlet property="btnVolume" destination="lt1-d9-2mN" id="hKv-Yp-vBu"/>
<outlet property="btnWidgetMode" destination="d0q-xP-bTY" id="ohB-MM-ujb"/>
<outlet property="lblPlaybackPosition" destination="D24-2X-fE6" id="XWd-QC-B4g"/>
<outlet property="lblVolume" destination="KgP-XY-h6e" id="eR1-JY-aBL"/>
<outlet property="logoImage" destination="sz6-pu-dBE" id="sKk-0i-xZe"/>
Expand Down Expand Up @@ -83,68 +79,54 @@
</connections>
</button>
<box hidden="YES" boxType="custom" borderType="line" cornerRadius="5" titlePosition="noTitle" id="5xA-GD-o4c" userLabel="Presentation Modes Box">
<rect key="frame" x="24" y="5" width="247" height="140"/>
<rect key="frame" x="24" y="10" width="247" height="135"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<view key="contentView" id="wFD-wS-6Hf">
<rect key="frame" x="1" y="1" width="245" height="138"/>
<rect key="frame" x="1" y="1" width="245" height="133"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="8da-oj-HLG" customClass="DialogCheckRadioButton" customModule="Aural" customModuleProvider="target">
<rect key="frame" x="10" y="106" width="192" height="19"/>
<button fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="3hY-rz-96f">
<rect key="frame" x="5" y="100" width="235" height="26"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="radio" title="Modular (multi-window)" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="lD4-L2-0o0">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" size="13" name="Play-Regular"/>
</buttonCell>
<connections>
<action selector="presentationModeRadioButtonGroupAction:" target="-2" id="Xjw-7d-EDc"/>
</connections>
</button>
<button fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="fOP-lC-pbG" customClass="DialogCheckRadioButton" customModule="Aural" customModuleProvider="target">
<rect key="frame" x="10" y="84" width="192" height="19"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="radio" title="Unified (single window)" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" inset="2" id="sRV-EQ-wkF">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" size="13" name="Play-Regular"/>
<buttonCell key="cell" type="square" title="Modular (multiple windows)" bezelStyle="shadowlessSquare" alignment="left" controlSize="small" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="JGV-wp-79k">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="smallSystem"/>
</buttonCell>
<connections>
<action selector="presentationModeRadioButtonGroupAction:" target="-2" id="QEi-Rw-agu"/>
<action selector="modularModeAction:" target="-2" id="xKE-3t-fMe"/>
</connections>
</button>
<button fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="bV4-WK-nNi" customClass="DialogCheckRadioButton" customModule="Aural" customModuleProvider="target">
<rect key="frame" x="10" y="62" width="218" height="19"/>
<button fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="FjB-j4-iFr">
<rect key="frame" x="5" y="70" width="235" height="26"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="radio" title="Compact (single compact window)" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" inset="2" id="NrP-SC-kKg">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" size="13" name="Play-Regular"/>
<buttonCell key="cell" type="square" title="Unified (single window)" bezelStyle="shadowlessSquare" alignment="left" controlSize="small" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="ydG-Gm-aHJ">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="smallSystem"/>
</buttonCell>
<connections>
<action selector="presentationModeRadioButtonGroupAction:" target="-2" id="hx4-Fr-67k"/>
<action selector="unifiedModeAction:" target="-2" id="700-t3-GXu"/>
</connections>
</button>
<button fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="d0q-xP-bTY" userLabel="Widget (floating mini window)" customClass="DialogCheckRadioButton" customModule="Aural" customModuleProvider="target">
<rect key="frame" x="10" y="40" width="218" height="19"/>
<button fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="6N2-lw-g3I">
<rect key="frame" x="5" y="40" width="235" height="26"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="radio" title="Widget (floating mini window)" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" inset="2" id="hbC-cJ-LJn">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" size="13" name="Play-Regular"/>
<buttonCell key="cell" type="square" title="Compact (single comapct window)" bezelStyle="shadowlessSquare" alignment="left" controlSize="small" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="cVT-mn-6FG">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="smallSystem"/>
</buttonCell>
<connections>
<action selector="presentationModeRadioButtonGroupAction:" target="-2" id="MPf-pG-iNc"/>
<action selector="compactModeAction:" target="-2" id="VeJ-x1-iEv"/>
</connections>
</button>
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="dJC-rL-PuQ">
<rect key="frame" x="184" y="6" width="55" height="27"/>
<button fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="p5r-QI-8zn">
<rect key="frame" x="5" y="10" width="235" height="26"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="push" title="OK" bezelStyle="rounded" alignment="center" controlSize="small" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="TsL-bL-mfy">
<buttonCell key="cell" type="square" title="Widget (floating mini window)" bezelStyle="shadowlessSquare" alignment="left" controlSize="small" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="Oe9-CT-YPQ">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="smallSystem"/>
<string key="keyEquivalent" base64-UTF8="YES">
DQ
</string>
</buttonCell>
<connections>
<action selector="changePresentationModeAction:" target="-2" id="h9v-p8-D6x"/>
<action selector="widgetModeAction:" target="-2" id="wAm-fz-dfD"/>
</connections>
</button>
</subviews>
Expand Down
37 changes: 15 additions & 22 deletions Source/UI/MenuBarPlayer/MenuBarPlayerViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import AppKit

class MenuBarPlayerViewController: PlayerViewController {

override var nibName: NSNib.Name? {"MenuBarPlayer"}

@IBOutlet weak var rootContainerBox: NSBox!
@IBOutlet weak var presentationModesBox: NSBox!

Expand All @@ -20,13 +22,6 @@ class MenuBarPlayerViewController: PlayerViewController {

@IBOutlet weak var btnSettings: NSButton!

@IBOutlet weak var btnModularMode: RadioButton!
@IBOutlet weak var btnUnifiedMode: RadioButton!
@IBOutlet weak var btnCompactMode: RadioButton!
@IBOutlet weak var btnWidgetMode: RadioButton!

override var nibName: NSNib.Name? {"MenuBarPlayer"}

private static let textViewDefaultPosition: NSPoint = NSPoint(x: 67, y: 66)
private static let textViewPosition_noArt: NSPoint = NSPoint(x: 12, y: 66)

Expand Down Expand Up @@ -130,22 +125,20 @@ class MenuBarPlayerViewController: PlayerViewController {
}
}

@IBAction func presentationModeRadioButtonGroupAction(_ sender: RadioButton) {}
@IBAction func modularModeAction(_ sender: NSButton) {
appModeManager.presentMode(.modular)
}

@IBAction func changePresentationModeAction(_ sender: RadioButton) {

if btnModularMode.isOn {
appModeManager.presentMode(.modular)

} else if btnUnifiedMode.isOn {
appModeManager.presentMode(.unified)

} else if btnCompactMode.isOn {
appModeManager.presentMode(.compact)

} else if btnWidgetMode.isOn {
appModeManager.presentMode(.widget)
}
@IBAction func unifiedModeAction(_ sender: NSButton) {
appModeManager.presentMode(.unified)
}

@IBAction func compactModeAction(_ sender: NSButton) {
appModeManager.presentMode(.compact)
}

@IBAction func widgetModeAction(_ sender: NSButton) {
appModeManager.presentMode(.widget)
}

@IBAction func quitAction(_ sender: AnyObject) {
Expand Down

0 comments on commit d88efa0

Please sign in to comment.