Skip to content

Commit

Permalink
Dark Mode (#27)
Browse files Browse the repository at this point in the history
* Enable Dark Mode Background Color

* Update Named Colors to use Dark Mode Equivalents
  • Loading branch information
winsmith committed Apr 22, 2019
1 parent 48ff3ea commit 61a2395
Show file tree
Hide file tree
Showing 9 changed files with 111 additions and 7 deletions.
18 changes: 18 additions & 0 deletions Assets/Assets.xcassets/AlmostBlack.colorset/Contents.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,24 @@
"green" : "0x1E"
}
}
},
{
"idiom" : "universal",
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "0xE5",
"alpha" : "1.000",
"blue" : "0xCB",
"green" : "0xDD"
}
}
}
]
}
12 changes: 12 additions & 0 deletions Assets/Assets.xcassets/BackgroundColor.colorset/Contents.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@
"green" : "0xFF"
}
}
},
{
"idiom" : "universal",
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"reference" : "controlBackgroundColor"
}
}
]
}
18 changes: 18 additions & 0 deletions Assets/Assets.xcassets/DarkAccent.colorset/Contents.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,24 @@
"green" : "0x46"
}
}
},
{
"idiom" : "universal",
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "0xE1",
"alpha" : "1.000",
"blue" : "0xE5",
"green" : "0xD6"
}
}
}
]
}
18 changes: 18 additions & 0 deletions Assets/Assets.xcassets/DarkGray.colorset/Contents.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,24 @@
"green" : "0xB3"
}
}
},
{
"idiom" : "universal",
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "55",
"alpha" : "1.000",
"blue" : "78",
"green" : "35"
}
}
}
]
}
18 changes: 18 additions & 0 deletions Assets/Assets.xcassets/DrunkOnWhite.colorset/Contents.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,24 @@
"green" : "0xDD"
}
}
},
{
"idiom" : "universal",
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "0x20",
"alpha" : "1.000",
"blue" : "0x19",
"green" : "0x1E"
}
}
}
]
}
18 changes: 18 additions & 0 deletions Assets/Assets.xcassets/LightAccent.colorset/Contents.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,24 @@
"green" : "0xD6"
}
}
},
{
"idiom" : "universal",
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "0x52",
"alpha" : "1.000",
"blue" : "0x56",
"green" : "0x46"
}
}
}
]
}
2 changes: 1 addition & 1 deletion Launch Pad/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundleShortVersionString</key>
<string>1</string>
<key>CFBundleVersion</key>
<string>a4</string>
<string>a5</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.games</string>
<key>LSMinimumSystemVersion</key>
Expand Down
13 changes: 7 additions & 6 deletions Launch Pad/UI/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14460.31"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14490.70"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="System colors introduced in macOS 10.14" minToolsVersion="10.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
Expand Down Expand Up @@ -621,7 +622,7 @@
<menuItem title="Show Sidebar" keyEquivalent="s" id="kIP-vf-haE">
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
<connections>
<action selector="toggleSourceList:" target="Ady-hI-5gd" id="iwa-gc-5KM"/>
<action selector="toggleSidebar:" target="Ady-hI-5gd" id="iwa-gc-5KM"/>
</connections>
</menuItem>
<menuItem title="Enter Full Screen" keyEquivalent="f" id="4J7-dP-txa">
Expand Down Expand Up @@ -1351,7 +1352,7 @@ Gw
<subviews>
<scrollView wantsLayer="YES" autohidesScrollers="YES" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jaF-Ou-zl3">
<rect key="frame" x="0.0" y="0.0" width="300" height="482"/>
<clipView key="contentView" ambiguous="YES" drawsBackground="NO" id="2WS-Fy-qTG">
<clipView key="contentView" ambiguous="YES" drawsBackground="NO" copiesOnScroll="NO" id="2WS-Fy-qTG">
<rect key="frame" x="1" y="1" width="298" height="480"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
Expand All @@ -1368,7 +1369,7 @@ Gw
</connections>
</collectionView>
</subviews>
<color key="backgroundColor" name="BackgroundColor"/>
<color key="backgroundColor" name="alternatingContentBackgroundColor" catalog="System" colorSpace="catalog"/>
</clipView>
<constraints>
<constraint firstAttribute="width" constant="300" id="iNK-qe-X61"/>
Expand Down Expand Up @@ -2447,6 +2448,6 @@ Gw
</namedColor>
</resources>
<inferredMetricsTieBreakers>
<segue reference="Ezp-9p-85V"/>
<segue reference="1yj-1d-kgX"/>
</inferredMetricsTieBreakers>
</document>
1 change: 1 addition & 0 deletions Launch Pad/UI/Browse/ModuleCollectionViewItem.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,6 @@ class ModuleCollectionViewItem: NSCollectionViewItem {
view.layer?.backgroundColor = isSelected ? darkColor.cgColor : lightColor.cgColor
nameLabel.textColor = isSelected ? lightColor : darkColor
versionLabel.textColor = isSelected ? lightColor : darkColor
authorLabel.textColor = isSelected ? lightColor : darkColor
}
}

0 comments on commit 61a2395

Please sign in to comment.