Skip to content

Commit

Permalink
Minor UI cleanup (alerts / buttons)
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-venugopal committed Dec 22, 2024
1 parent 5a04bb3 commit caaf7e8
Show file tree
Hide file tree
Showing 15 changed files with 18 additions and 229 deletions.
8 changes: 0 additions & 8 deletions Aural.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,6 @@
3E6C129825CEBE2700BF0D07 /* VAlignedTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E6C0FBF25CEB98600BF0D07 /* VAlignedTextField.swift */; };
3E6C129925CEBE2700BF0D07 /* AuralTabView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E6C0FD125CEB98600BF0D07 /* AuralTabView.swift */; };
3E6C129B25CEBE2700BF0D07 /* ColoredCursorTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E6C0FC525CEB98600BF0D07 /* ColoredCursorTextField.swift */; };
3E6C129C25CEBE2700BF0D07 /* AlertWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E6C0FC925CEB98600BF0D07 /* AlertWindowController.swift */; };
3E6C129D25CEBE2700BF0D07 /* AuralSliderCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E6C0FD625CEB98600BF0D07 /* AuralSliderCell.swift */; };
3E6C129E25CEBE2700BF0D07 /* EQSliderCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E6C0FD725CEB98600BF0D07 /* EQSliderCell.swift */; };
3E6C12A025CEBE2700BF0D07 /* TintedImageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E6C0FBE25CEB98600BF0D07 /* TintedImageView.swift */; };
Expand All @@ -682,7 +681,6 @@
3E6C12A425CEBE2700BF0D07 /* AboutDialog.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3E6C0FDC25CEB98600BF0D07 /* AboutDialog.xib */; };
3E6C12A525CEBE2700BF0D07 /* EffectsUnitSlider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E6C0FD525CEB98600BF0D07 /* EffectsUnitSlider.swift */; };
3E6C12A625CEBE2700BF0D07 /* ToggleMenuItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E6C0FCD25CEB98600BF0D07 /* ToggleMenuItem.swift */; };
3E6C12A725CEBE2700BF0D07 /* Alerts.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3E6C0FC725CEB98600BF0D07 /* Alerts.xib */; };
3E6C12A825CEBE2700BF0D07 /* TriStateLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E6C0FD025CEB98600BF0D07 /* TriStateLabel.swift */; };
3E6C12A925CEBE2700BF0D07 /* EffectsUnitTriStateBypassImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E6C0FCA25CEB98600BF0D07 /* EffectsUnitTriStateBypassImage.swift */; };
3E6C12AA25CEBE2700BF0D07 /* AboutDialogController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E6C0FDB25CEB98600BF0D07 /* AboutDialogController.swift */; };
Expand Down Expand Up @@ -1782,9 +1780,7 @@
3E6C0FC325CEB98600BF0D07 /* StringInputPopover.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = StringInputPopover.xib; sourceTree = "<group>"; };
3E6C0FC425CEB98600BF0D07 /* StringInputPopoverViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringInputPopoverViewController.swift; sourceTree = "<group>"; };
3E6C0FC525CEB98600BF0D07 /* ColoredCursorTextField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColoredCursorTextField.swift; sourceTree = "<group>"; };
3E6C0FC725CEB98600BF0D07 /* Alerts.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = Alerts.xib; sourceTree = "<group>"; };
3E6C0FC825CEB98600BF0D07 /* DialogsAndAlerts.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DialogsAndAlerts.swift; sourceTree = "<group>"; };
3E6C0FC925CEB98600BF0D07 /* AlertWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertWindowController.swift; sourceTree = "<group>"; };
3E6C0FCA25CEB98600BF0D07 /* EffectsUnitTriStateBypassImage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EffectsUnitTriStateBypassImage.swift; sourceTree = "<group>"; };
3E6C0FCB25CEB98600BF0D07 /* SnappingWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SnappingWindow.swift; sourceTree = "<group>"; };
3E6C0FCD25CEB98600BF0D07 /* ToggleMenuItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ToggleMenuItem.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -4390,9 +4386,7 @@
3E6C0FC625CEB98600BF0D07 /* Alerts */ = {
isa = PBXGroup;
children = (
3E6C0FC725CEB98600BF0D07 /* Alerts.xib */,
3E6C0FC825CEB98600BF0D07 /* DialogsAndAlerts.swift */,
3E6C0FC925CEB98600BF0D07 /* AlertWindowController.swift */,
);
path = Alerts;
sourceTree = "<group>";
Expand Down Expand Up @@ -5749,7 +5743,6 @@
3E0219CB2C23497D00865AC2 /* neo-latina-demo-FFP.ttf in Resources */,
3E45C03325E1264C00C1519C /* FontSchemeSizes.xib in Resources */,
3E6668B12ADB4AF500BBD119 /* WindowLayoutSetup.xib in Resources */,
3E6C12A725CEBE2700BF0D07 /* Alerts.xib in Resources */,
3EC793882B74700900AF7E9E /* CompactPlayQueue.xib in Resources */,
3E25B65027F7818900D10A5F /* PlayQueueWindow.xib in Resources */,
3E91932925E0CF5D00F30F81 /* FontSchemeFonts.xib in Resources */,
Expand Down Expand Up @@ -5780,7 +5773,6 @@
3E02190B2C23490E00865AC2 /* LegacyPlaylistPreferences.swift in Sources */,
3E0218222C23490E00865AC2 /* FilesAndPaths.swift in Sources */,
3E64AE112BD6FFB900630B8B /* ProgressArc.swift in Sources */,
3E6C129C25CEBE2700BF0D07 /* AlertWindowController.swift in Sources */,
3E0219A22C23490E00865AC2 /* Globals.swift in Sources */,
3E6C0EC325CEB3ED00BF0D07 /* AppDelegate.swift in Sources */,
3EF28DBB2694E46B005D5B43 /* AppMode.swift in Sources */,
Expand Down
Binary file not shown.
61 changes: 0 additions & 61 deletions Source/UI/CustomViews/Alerts/AlertWindowController.swift

This file was deleted.

109 changes: 0 additions & 109 deletions Source/UI/CustomViews/Alerts/Alerts.xib

This file was deleted.

30 changes: 0 additions & 30 deletions Source/UI/CustomViews/Buttons/ModalDialogButtonCells.swift
Original file line number Diff line number Diff line change
Expand Up @@ -69,36 +69,6 @@ class StringInputPopoverResponseButtonCell: ModalDialogResponseButtonCell {
override var textFont: NSFont {.stringInputPopoverFont}
}

// Cell for all response buttons (Save/Cancel, etc)
class ModalDialogControlButtonCell: ModalDialogButtonCell {

override var cellInsetX: CGFloat {1}
override var cellInsetY: CGFloat {0}

override var textFont: NSFont {.modalDialogControlButtonFont}
}

// Browse button in Playlist preferences
class ModalDialogSmallControlButtonCell: ModalDialogButtonCell {

override var cellInsetX: CGFloat {1}
override var cellInsetY: CGFloat {0}

override var textFont: NSFont {standardFontSet.mainFont(size: 10)}
}

// Cell for search results navigation buttons (next/previous)
class ColoredNavigationButtonCell: ModalDialogButtonCell {

override var cellInsetX: CGFloat {1}
override var cellInsetY: CGFloat {1}

override var borderRadius: CGFloat {3}

override var textColor: NSColor {.modalDialogNavButtonTextColor}
override var textFont: NSFont {.modalDialogNavButtonFont}
}

class ColorAwareButtonCell: ModalDialogButtonCell {

override var textColor: NSColor {systemColorScheme.buttonColor}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@
</objects>
<resources>
<image name="ScrollToBottom" width="33" height="37"/>
<image name="ScrollToTop" width="33" height="37"/>
<image name="ScrollToTop" width="269" height="266"/>
<image name="Sort" width="35" height="25"/>
<image name="arrow.down" catalog="system" width="13" height="14"/>
<image name="arrow.down.to.line.alt" catalog="system" width="13" height="14"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ class PlaylistContainerViewController: NSViewController {
lazy var searchWindowController: SearchWindowController = .shared

lazy var fileOpenDialog = DialogsAndAlerts.openFilesAndFoldersDialog
lazy var alertDialog: AlertWindowController = .instance
lazy var saveDialog = DialogsAndAlerts.savePlaylistDialog

var currentViewController: PlaylistSimpleViewController {
Expand Down Expand Up @@ -159,7 +158,8 @@ class PlaylistContainerViewController: NSViewController {

if playlistBeingModified {

alertDialog.showAlert(.error, "Playlist not modified", "The Playlist cannot be modified while tracks are being added", "Please wait till the Playlist is done adding tracks ...")
NSAlert.showError(withTitle: "Playlist not modified",
andText: "The playlist cannot be modified while tracks are being added. Please wait till the playlist is done adding tracks ...")
}

return playlistBeingModified
Expand Down
2 changes: 1 addition & 1 deletion Source/UI/Menus/Base.lproj/MainMenu.xib
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ CA
<menu key="submenu" title=" Recent items" autoenablesItems="NO" id="O8Z-ZZ-NUj"/>
</menuItem>
<menuItem isSeparatorItem="YES" id="Srn-8q-b5U"/>
<menuItem title=" Resume last played track sequence" image="play" catalog="system" id="sYa-3o-gtH">
<menuItem title=" Resume last played track / sequence" image="play" catalog="system" id="sYa-3o-gtH">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="resumeLastPlayedSequenceAction:" target="7Mj-fX-Ivy" id="Cub-Fz-ao6"/>
Expand Down
2 changes: 0 additions & 2 deletions Source/UI/Menus/PlayQueueMenuController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ class PlayQueueMenuController: NSObject, NSMenuDelegate {
@IBOutlet weak var scrollToTopItem: NSMenuItem!
@IBOutlet weak var scrollToBottomItem: NSMenuItem!

private lazy var alertDialog: AlertWindowController = .instance

private lazy var messenger = Messenger(for: self)

func menuNeedsUpdate(_ menu: NSMenu) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,8 @@ extension PlayQueueContainerViewController {

if playQueueBeingModified {

alertDialog.showAlert(.error, "Play Queue not modified",
"The Play Queue cannot be modified while tracks are being added",
"Please wait till the Play Queue is done adding tracks ...")
NSAlert.showError(withTitle: "Play Queue not modified",
andText: "The Play Queue cannot be modified while tracks are being added. Please wait till the Play Queue is done adding tracks ...")
}

return playQueueBeingModified
Expand Down
Loading

0 comments on commit caaf7e8

Please sign in to comment.