Fix Info button sizing when album art not present.
parent
66efdfcf1e
commit
9c58f67c48
|
@ -260,6 +260,18 @@ void* kAppControllerContext = &kAppControllerContext;
|
|||
self.infoButtonMini.image = [NSImage imageNamed:@"infoTemplate"];
|
||||
}
|
||||
|
||||
if (entry.albumArt) {
|
||||
self.infoButton.imageScaling = NSImageScaleProportionallyUpOrDown;
|
||||
self.infoButton.image = playlistController.currentEntry.albumArt;
|
||||
self.infoButtonMini.imageScaling = NSImageScaleProportionallyUpOrDown;
|
||||
self.infoButtonMini.image = playlistController.currentEntry.albumArt;
|
||||
} else {
|
||||
self.infoButton.imageScaling = NSImageScaleNone;
|
||||
self.infoButton.image = [NSImage imageNamed:@"infoTemplate"];
|
||||
self.infoButtonMini.imageScaling = NSImageScaleNone;
|
||||
self.infoButtonMini.image = [NSImage imageNamed:@"infoTemplate"];
|
||||
}
|
||||
|
||||
if (@available(macOS 11.0, *)) {
|
||||
NSString *title = @"Cog";
|
||||
if (entry.title) {
|
||||
|
@ -291,18 +303,6 @@ void* kAppControllerContext = &kAppControllerContext;
|
|||
miniWindow.title = title;
|
||||
mainWindow.title = title;
|
||||
}
|
||||
|
||||
if (entry.albumArt) {
|
||||
self.infoButton.imageScaling = NSImageScaleProportionallyUpOrDown;
|
||||
self.infoButton.image = playlistController.currentEntry.albumArt;
|
||||
self.infoButtonMini.imageScaling = NSImageScaleProportionallyUpOrDown;
|
||||
self.infoButtonMini.image = playlistController.currentEntry.albumArt;
|
||||
} else {
|
||||
self.infoButton.imageScaling = NSImageScaleNone;
|
||||
self.infoButton.image = [NSImage imageNamed:@"infoTemplate"];
|
||||
self.infoButtonMini.imageScaling = NSImageScaleNone;
|
||||
self.infoButtonMini.image = [NSImage imageNamed:@"infoTemplate"];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -435,8 +435,10 @@
|
|||
</connections>
|
||||
</button>
|
||||
</toolbarItem>
|
||||
<toolbarItem implicitItemIdentifier="2F487D99-16E9-4BF8-9A98-637FABEB2716" label="Info Inspector" paletteLabel="Info Inspector" image="infoTemplate" sizingBehavior="auto" navigational="YES" id="1629">
|
||||
<toolbarItem implicitItemIdentifier="2F487D99-16E9-4BF8-9A98-637FABEB2716" label="Info Inspector" paletteLabel="Info Inspector" image="infoTemplate" navigational="YES" id="1629">
|
||||
<nil key="toolTip"/>
|
||||
<size key="minSize" width="32" height="32"/>
|
||||
<size key="maxSize" width="32" height="32"/>
|
||||
<button key="view" verticalHuggingPriority="750" id="1627">
|
||||
<rect key="frame" x="26" y="14" width="28" height="23"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
|
|
Loading…
Reference in New Issue