Visual updates for Big Sur and newer

This commit is contained in:
Lior Halphon 2022-03-13 01:14:29 +02:00
parent 9fe965bcc2
commit 86a1977034
23 changed files with 17 additions and 6 deletions

View File

@ -154,6 +154,10 @@ static uint32_t color_to_int(NSColor *color)
#ifndef UPDATE_SUPPORT
[_preferencesWindow.toolbar removeItemAtIndex:4];
#endif
if (@available(macOS 11.0, *)) {
[_preferencesWindow.toolbar insertItemWithItemIdentifier:NSToolbarFlexibleSpaceItemIdentifier atIndex:0];
[_preferencesWindow.toolbar insertItemWithItemIdentifier:NSToolbarFlexibleSpaceItemIdentifier atIndex:_preferencesWindow.toolbar.items.count];
}
}
[_preferencesWindow makeKeyAndOrderFront:self];
}

BIN
Cocoa/CPU~solid.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 B

BIN
Cocoa/CPU~solid@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 586 B

BIN
Cocoa/CPU~solid~dark.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 B

BIN
Cocoa/CPU~solid~dark@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 605 B

BIN
Cocoa/Display~solid.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 B

BIN
Cocoa/Display~solid@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 456 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 255 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 454 B

View File

@ -507,7 +507,7 @@
<rect key="frame" x="0.0" y="0.0" width="512" height="432"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<scrollView fixedFrame="YES" borderType="none" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Vhq-K4-baH">
<scrollView fixedFrame="YES" borderType="none" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Vhq-K4-baH">
<rect key="frame" x="0.0" y="0.0" width="512" height="432"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<clipView key="contentView" ambiguous="YES" id="JYu-CM-49p">
@ -522,8 +522,8 @@
<edgeInsets key="contentInsets" left="0.0" right="0.0" top="0.0" bottom="0.0"/>
</clipView>
<edgeInsets key="contentInsets" left="0.0" right="0.0" top="0.0" bottom="0.0"/>
<scroller key="horizontalScroller" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="zUB-xg-cXq">
<rect key="frame" x="0.0" y="416" width="512" height="16"/>
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="zUB-xg-cXq">
<rect key="frame" x="-100" y="-100" width="512" height="16"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="jMe-gO-ERw">

View File

@ -65,7 +65,7 @@
- (NSWindowToolbarStyle)toolbarStyle
{
return NSWindowToolbarStylePreference;
return NSWindowToolbarStyleExpanded;
}
- (void)close

BIN
Cocoa/Joypad~solid.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

BIN
Cocoa/Joypad~solid@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 710 B

View File

@ -11,6 +11,13 @@ static NSImage * (*imageNamed)(Class self, SEL _cmd, NSString *name);
+ (NSImage *)imageNamedWithDark:(NSImageName)name
{
if (@available(macOS 11.0, *)) {
if (![name containsString:@"~solid"]) {
NSImage *solid = [self imageNamed:[name stringByAppendingString:@"~solid"]];
[solid setTemplate:true];
if (solid) return solid;
}
}
NSImage *light = imageNamed(self, _cmd, name);
if (@available(macOS 10.14, *)) {
NSImage *dark = imageNamed(self, _cmd, [name stringByAppendingString:@"~dark"]);

View File

@ -52,7 +52,7 @@
<action selector="switchPreferencesTab:" target="-2" id="Tio-D7-PaA"/>
</connections>
</toolbarItem>
<toolbarItem implicitItemIdentifier="EB7AB5BC-57B0-4639-A037-E28226866C80" label="Updates" paletteLabel="Updates" tag="4" image="AppIcon" autovalidates="NO" selectable="YES" id="lMV-68-ntz">
<toolbarItem implicitItemIdentifier="EB7AB5BC-57B0-4639-A037-E28226866C80" label="Updates" paletteLabel="Updates" tag="4" image="Updates" autovalidates="NO" selectable="YES" id="lMV-68-ntz">
<connections>
<action selector="switchPreferencesTab:" target="-2" id="bfU-hc-FnN"/>
</connections>
@ -1113,12 +1113,12 @@
</customObject>
</objects>
<resources>
<image name="AppIcon" width="512" height="512"/>
<image name="CPU" width="32" height="32"/>
<image name="Display" width="32" height="32"/>
<image name="Joypad" width="32" height="32"/>
<image name="NSAddTemplate" width="11" height="11"/>
<image name="NSRemoveTemplate" width="11" height="11"/>
<image name="Speaker" width="32" height="32"/>
<image name="Updates" width="32" height="32"/>
</resources>
</document>

BIN
Cocoa/Speaker~solid.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 548 B

BIN
Cocoa/Speaker~solid@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

BIN
Cocoa/Updates.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
Cocoa/Updates@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
Cocoa/Updates~solid.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 428 B

BIN
Cocoa/Updates~solid@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 366 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1021 B