~not/sonar

4681c2a633c79f989eb0c4c9a1183efbb389d7e4 — b123400 a month ago 7c9a7f0
Custom search field cell to fix icon issue
M Sonar.xcodeproj/project.pbxproj => Sonar.xcodeproj/project.pbxproj +6 -0
@@ 33,6 33,7 @@
		CFB55EA92781C39B004F9C47 /* BRSonicAPIResponsePlaylistSongs.m in Sources */ = {isa = PBXBuildFile; fileRef = CFB55EA82781C39B004F9C47 /* BRSonicAPIResponsePlaylistSongs.m */; };
		CFB55EAF2781DBA6004F9C47 /* Playlist.m in Sources */ = {isa = PBXBuildFile; fileRef = CFB55EAE2781DBA6004F9C47 /* Playlist.m */; };
		CFC62B2428ACB1F4006E08B6 /* SonarApplication.m in Sources */ = {isa = PBXBuildFile; fileRef = CFC62B2328ACB1F4006E08B6 /* SonarApplication.m */; };
		CFC743762BB315D10053ABC1 /* PlayerSearchFieldCell.m in Sources */ = {isa = PBXBuildFile; fileRef = CFC743752BB315D10053ABC1 /* PlayerSearchFieldCell.m */; };
		CFD1C4D8273E958B009ED1CD /* BRSonicAPIArtist.m in Sources */ = {isa = PBXBuildFile; fileRef = CFD1C4D7273E958B009ED1CD /* BRSonicAPIArtist.m */; };
		CFD908B62732B1F600FEFD53 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = CFD908B52732B1F600FEFD53 /* AppDelegate.m */; };
		CFD908B82732B1F800FEFD53 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = CFD908B72732B1F800FEFD53 /* Assets.xcassets */; };


@@ 111,6 112,8 @@
		CFB55EAE2781DBA6004F9C47 /* Playlist.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Playlist.m; sourceTree = "<group>"; };
		CFC62B2228ACB1F4006E08B6 /* SonarApplication.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SonarApplication.h; sourceTree = "<group>"; };
		CFC62B2328ACB1F4006E08B6 /* SonarApplication.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SonarApplication.m; sourceTree = "<group>"; };
		CFC743742BB315D10053ABC1 /* PlayerSearchFieldCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PlayerSearchFieldCell.h; sourceTree = "<group>"; };
		CFC743752BB315D10053ABC1 /* PlayerSearchFieldCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PlayerSearchFieldCell.m; sourceTree = "<group>"; };
		CFD1C4D6273E958B009ED1CD /* BRSonicAPIArtist.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BRSonicAPIArtist.h; sourceTree = "<group>"; };
		CFD1C4D7273E958B009ED1CD /* BRSonicAPIArtist.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BRSonicAPIArtist.m; sourceTree = "<group>"; };
		CFD908B12732B1F600FEFD53 /* Sonar.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Sonar.app; sourceTree = BUILT_PRODUCTS_DIR; };


@@ 278,6 281,8 @@
				CFEC2EAC273D1A5C002D5BD0 /* PlayerVolumeSliderCell.m */,
				CFEC3AF628EA7FBB004A4C6A /* PlayerViewModeState.h */,
				CFEC3AF728EA7FBB004A4C6A /* PlayerViewModeState.m */,
				CFC743742BB315D10053ABC1 /* PlayerSearchFieldCell.h */,
				CFC743752BB315D10053ABC1 /* PlayerSearchFieldCell.m */,
			);
			path = Player;
			sourceTree = "<group>";


@@ 478,6 483,7 @@
				CF5849B52A41891A00B494C7 /* BRSonicAPIResponsePlaylist.m in Sources */,
				CF252E90273E61BE00A0D26C /* MediaDB.m in Sources */,
				CF3EA281273369E70010BBE4 /* PlayerHeaderMusicImageView.m in Sources */,
				CFC743762BB315D10053ABC1 /* PlayerSearchFieldCell.m in Sources */,
				CFD908CB2732CC2800FEFD53 /* PlayerHeaderView.m in Sources */,
				CFB55EA62781BDE3004F9C47 /* BRSonicAPIPlaylist.m in Sources */,
				CFDC05512743C3870065F13D /* Album.m in Sources */,

M Sonar/Player/Base.lproj/PlayerWindowController.xib => Sonar/Player/Base.lproj/PlayerWindowController.xib +10 -10
@@ 48,8 48,8 @@
            <rect key="contentRect" x="196" y="240" width="400" height="270"/>
            <rect key="screenRect" x="0.0" y="0.0" width="1920" height="1055"/>
            <value key="minSize" type="size" width="300" height="68"/>
            <view key="contentView" misplaced="YES" id="se5-gp-TjO">
                <rect key="frame" x="0.0" y="0.0" width="400" height="267"/>
            <view key="contentView" id="se5-gp-TjO">
                <rect key="frame" x="0.0" y="0.0" width="400" height="270"/>
                <autoresizingMask key="autoresizingMask"/>
                <subviews>
                    <visualEffectView blendingMode="behindWindow" material="underWindowBackground" state="active" translatesAutoresizingMaskIntoConstraints="NO" id="qLG-JE-jin">


@@ 108,7 108,7 @@
                                        <rect key="frame" x="266" y="152" width="49" height="18"/>
                                        <buttonCell key="cell" type="inline" title="Search" bezelStyle="inline" alignment="center" borderStyle="border" inset="2" id="lPI-8O-1ri">
                                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                                            <font key="font" size="11" name=".SFNS-Semibold"/>
                                            <font key="font" metaFont="smallSystem"/>
                                        </buttonCell>
                                        <connections>
                                            <action selector="searchModeClicked:" target="-2" id="4CA-81-7ab"/>


@@ 124,12 124,12 @@
                                            <action selector="playlistsModeClicked:" target="-2" id="zME-iS-vTd"/>
                                        </connections>
                                    </button>
                                    <searchField wantsLayer="YES" focusRingType="none" verticalHuggingPriority="750" textCompletion="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hBq-6T-efE">
                                    <searchField wantsLayer="YES" verticalHuggingPriority="750" textCompletion="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hBq-6T-efE">
                                        <rect key="frame" x="20" y="126" width="360" height="22"/>
                                        <constraints>
                                            <constraint firstAttribute="height" constant="22" id="pnQ-h2-PiO"/>
                                        </constraints>
                                        <searchFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" borderStyle="bezel" usesSingleLineMode="YES" bezelStyle="round" id="NEh-Om-iU6">
                                        <searchFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" borderStyle="bezel" usesSingleLineMode="YES" bezelStyle="round" id="NEh-Om-iU6" customClass="PlayerSearchFieldCell">
                                            <font key="font" metaFont="system"/>
                                            <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
                                            <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>


@@ 386,7 386,7 @@
                                        </constraints>
                                        <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="Placeholder" id="udP-zx-Tre"/>
                                    </imageView>
                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="VBU-8f-bth">
                                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="VBU-8f-bth">
                                        <rect key="frame" x="78" y="72" width="197" height="16"/>
                                        <textFieldCell key="cell" lineBreakMode="clipping" id="cmE-bx-LGV">
                                            <font key="font" metaFont="system"/>


@@ 394,7 394,7 @@
                                            <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                        </textFieldCell>
                                    </textField>
                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="TTJ-6W-yMR">
                                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="TTJ-6W-yMR">
                                        <rect key="frame" x="78" y="28" width="197" height="14"/>
                                        <textFieldCell key="cell" lineBreakMode="clipping" id="SQh-0N-x8z">
                                            <font key="font" metaFont="smallSystem"/>


@@ 402,7 402,7 @@
                                            <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                        </textFieldCell>
                                    </textField>
                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="EiH-8A-JC1">
                                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="EiH-8A-JC1">
                                        <rect key="frame" x="78" y="50" width="197" height="14"/>
                                        <textFieldCell key="cell" lineBreakMode="clipping" id="4yt-b9-Z4t">
                                            <font key="font" metaFont="smallSystem"/>


@@ 529,7 529,7 @@
                                            <constraint firstItem="RCZ-ri-j8B" firstAttribute="top" secondItem="iZZ-fA-cDk" secondAttribute="bottom" id="toy-h4-t0x"/>
                                        </constraints>
                                    </customView>
                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="4jt-xf-IYM">
                                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="4jt-xf-IYM">
                                        <rect key="frame" x="6" y="7" width="36" height="14"/>
                                        <constraints>
                                            <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="30" id="tzm-Ks-rSb"/>


@@ 540,7 540,7 @@
                                            <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                        </textFieldCell>
                                    </textField>
                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="3oy-ZU-bX6">
                                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="3oy-ZU-bX6">
                                        <rect key="frame" x="358" y="7" width="36" height="14"/>
                                        <constraints>
                                            <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="30" id="cA4-Kg-8jB"/>

A Sonar/Player/PlayerSearchFieldCell.h => Sonar/Player/PlayerSearchFieldCell.h +16 -0
@@ 0,0 1,16 @@
//
//  PlayerSearchFieldCell.h
//  Sonar
//
//  Created by b123400 on 2024/03/26.
//

#import <Cocoa/Cocoa.h>

NS_ASSUME_NONNULL_BEGIN

@interface PlayerSearchFieldCell : NSSearchFieldCell

@end

NS_ASSUME_NONNULL_END

A Sonar/Player/PlayerSearchFieldCell.m => Sonar/Player/PlayerSearchFieldCell.m +18 -0
@@ 0,0 1,18 @@
//
//  PlayerSearchFieldCell.m
//  Sonar
//
//  Created by b123400 on 2024/03/26.
//

#import "PlayerSearchFieldCell.h"

@implementation PlayerSearchFieldCell

- (NSRect)searchButtonRectForBounds:(NSRect)rect {
    NSRect r = [super searchButtonRectForBounds:rect];
    r.origin.y = 0;
    return r;
}

@end