Skip to content

Commit

Permalink
new themes!
Browse files Browse the repository at this point in the history
  • Loading branch information
KrLite committed May 12, 2024
1 parent c1a9644 commit b0dbe05
Show file tree
Hide file tree
Showing 19 changed files with 160 additions and 26 deletions.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions Abyssal/Assets.xcassets/Themes/Colons/Colon.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "template"
}
}
9 changes: 9 additions & 0 deletions Abyssal/Assets.xcassets/Themes/Colons/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"provides-namespace" : true
}
}
Binary file modified Abyssal/Assets.xcassets/Themes/NotSoHappy/Amazed.imageset/2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "template"
}
}
Binary file modified Abyssal/Assets.xcassets/Themes/NotSoHappy/Pale.imageset/2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
65 changes: 52 additions & 13 deletions Abyssal/Contents/Theme.swift
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,20 @@ class Themes {
[
abyssal,
hiddenBar,
simplicity,
approaching,
metresAway,
interstellar,
electrodiagram,
droplets,
codec,
colons,
notSoHappy,
playPause,
theFace,
theImplied,
macOS
].sorted(by: { $0.identifier < $1.identifier })
]
}

static var defaultTheme: Theme {
Expand All @@ -114,8 +117,8 @@ extension Themes {
"Abyssal", NSLocalizedString("Theme/Abyssal", value: "Abyssal", comment: "name for theme 'Abyssal'"),
icon: .tail,

headUncollapsed: NamedIconBuilder(name: "Dot", width: 10),
headCollapsed: .headWithWidth(2),
headUncollapsed: NamedIconBuilder(name: "Dot", width: 2),
headCollapsed: .headWithWidth(10),

body: NamedIconBuilder(name: "Line", width: 2),
tail: NamedIconBuilder(name: "DottedLine", width: 2),
Expand All @@ -126,15 +129,27 @@ extension Themes {
static let hiddenBar = Theme(
"HiddenBar", NSLocalizedString("Theme/HiddenBar", value: "Hidden Bar", comment: "name for theme 'Hidden Bar'"),

headUncollapsed: NamedIconBuilder(name:"ic_left", width: 20),
headCollapsed: .custom(NamedIconBuilder(name:"ic_right", width: 20)),
headUncollapsed: NamedIconBuilder(name: "ic_left", width: 20),
headCollapsed: .custom(NamedIconBuilder(name: "ic_right", width: 20)),

body: NamedIconBuilder(name:"ic_line", width: 20),
tail: NamedIconBuilder(name:"ic_line_translucent", width: 20),

autoHideIcons: false
)

static let simplicity = Theme(
"Simplicity", NSLocalizedString("Theme/Simplicity", value: "Simplicity", comment: "name for theme 'Simplicity'"),

headUncollapsed: SymbolIconBuilder(symbol: .poweron, width: 4),
headCollapsed: .custom(SymbolIconBuilder(symbol: .poweron, width: 12, opacity: 0.2)),

body: SymbolIconBuilder(symbol: .poweron, width: 2),
tail: SymbolIconBuilder(symbol: .poweron, width: 2),

autoHideIcons: true
)

static let approaching = Theme(
"Approaching", NSLocalizedString("Theme/Approaching", value: "Approaching", comment: "name for theme 'Approaching'"),

Expand All @@ -159,6 +174,18 @@ extension Themes {
autoHideIcons: false
)

static let interstellar = Theme(
"Interstellar", NSLocalizedString("Theme/Interstellar", value: "Interstellar", comment: "name for theme 'Interstellar'"),

headUncollapsed: SymbolIconBuilder(symbol: .globeAmericasFill, configuration: .init(scale: .small), width: 10),
headCollapsed: .custom(SymbolIconBuilder(symbol: .globeAmericas, configuration: .init(scale: .small), width: 32)),

body: SymbolIconBuilder(symbol: .sunMaxFill, configuration: .init(scale: .small), width: 10),
tail: SymbolIconBuilder(symbol: .moonphaseWaningGibbous, configuration: .init(scale: .small).applying(.preferringHierarchical()), width: 10),

autoHideIcons: true
)

static let electrodiagram = Theme(
"Electrodiagram", NSLocalizedString("Theme/Electrodiagram", value: "Electrodiagram", comment: "name for theme 'Electrodiagram'"),

Expand Down Expand Up @@ -186,11 +213,23 @@ extension Themes {
static let codec = Theme(
"Codec", NSLocalizedString("Theme/Codec", value: "Codec", comment: "name for theme 'Codec'"),

headUncollapsed: SymbolIconBuilder(symbol: .curlybraces, width: 16),
headCollapsed: .custom(SymbolIconBuilder(symbol: .ellipsisCurlybraces, configuration: .preferringHierarchical(), width: 22)),
headUncollapsed: SymbolIconBuilder(symbol: .ellipsisCurlybraces, configuration: .preferringHierarchical(), width: 16),
headCollapsed: .custom(SymbolIconBuilder(symbol: .curlybraces, width: 22)),

body: SymbolIconBuilder(symbol: .ellipsis, width: 16),
tail: SymbolIconBuilder(symbol: .ellipsis, width: 16),

autoHideIcons: false
)

static let colons = Theme(
"Colons", NSLocalizedString("Theme/Colons", value: "Colons", comment: "name for theme 'Colons'"),

headUncollapsed: NamedIconBuilder(name: "Colon", width: 6),
headCollapsed: .headWithWidth(16),

body: SymbolIconBuilder(symbol: .ellipsis, width: 16, opacity: 0.5),
tail: SymbolIconBuilder(symbol: .ellipsis, width: 16, opacity: 0.2),
body: NamedIconBuilder(name: "Colon", width: 6),
tail: NamedIconBuilder(name: "Colon", width: 6),

autoHideIcons: false
)
Expand All @@ -202,7 +241,7 @@ extension Themes {
headCollapsed: .custom(NamedIconBuilder(name: "Happy", width: 32)),

body: NamedIconBuilder(name: "Pale", width: 14),
tail: NamedIconBuilder(name: "Amazed", width: 14),
tail: NamedIconBuilder(name: "Cat", width: 14),

autoHideIcons: false
)
Expand All @@ -226,8 +265,8 @@ extension Themes {
headUncollapsed: NamedIconBuilder(name: "Face", width: 25),
headCollapsed: .headWithWidth(64),

body: SymbolIconBuilder(symbol: .musicNote, width: 16, opacity: 0.5),
tail: SymbolIconBuilder(symbol: .musicQuarternote3, width: 16, opacity: 0.2),
body: SymbolIconBuilder(symbol: .musicNote, width: 16),
tail: SymbolIconBuilder(symbol: .musicQuarternote3, width: 16),

autoHideIcons: false
)
Expand All @@ -246,7 +285,7 @@ extension Themes {
)

static let macOS = Theme(
"macOS", NSLocalizedString("Theme/MacOS", value: "macOS", comment: "name for theme 'macOS'"),
"macOS", NSLocalizedString("Theme/macOS", value: "macOS", comment: "name for theme 'macOS'"),
icon: .custom(SymbolIconBuilder(symbol: .appleLogo, width: 20)),

headUncollapsed: SymbolIconBuilder(symbol: .chevronBackward, width: 20),
Expand Down
2 changes: 2 additions & 0 deletions Abyssal/Extensions/Defaults+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import Defaults
import LaunchAtLogin

extension Defaults.Keys {
// Collapsed: the expanded state and menu bar itms are hidden
// Uncollapsed: the shrunk state and menu bar items are visible
static let isCollapsed = Key<Bool>("isCollapsed", default: false)

static let tipsEnabled = Key<Bool>("tipsEnabled", default: true)
Expand Down
62 changes: 49 additions & 13 deletions Abyssal/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,25 @@
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "调制、解调"
"value" : "调制解调"
}
}
}
},
"Theme/Colons" : {
"comment" : "name for theme 'Colons'",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Colons"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "无话可说"
}
}
}
Expand Down Expand Up @@ -295,12 +313,6 @@
"state" : "new",
"value" : "Hidden Bar"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "Hidden Bar"
}
}
}
},
Expand All @@ -322,19 +334,31 @@
}
}
},
"Theme/MacOS" : {
"comment" : "name for theme 'macOS'",
"Theme/Interstellar" : {
"comment" : "name for theme 'Interstellar'",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "macOS"
"value" : "Interstellar"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "星际穿越"
}
}
}
},
"Theme/macOS" : {
"comment" : "name for theme 'macOS'",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "macOS"
}
}
Expand Down Expand Up @@ -394,19 +418,31 @@
}
}
},
"Theme/TheFace" : {
"comment" : "name for theme '【=◈︿◈=】'",
"Theme/Simplicity" : {
"comment" : "name for theme 'Simplicity'",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "【=◈︿◈=】"
"value" : "Simplicity"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "简简单单"
}
}
}
},
"Theme/TheFace" : {
"comment" : "name for theme '【=◈︿◈=】'",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "【=◈︿◈=】"
}
}
Expand Down
Binary file added Design/Themes/Colons/Colon/2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Design/Themes/Colons/Colon/2x.pxd
Binary file not shown.
Binary file modified Design/Themes/NotSoHappy/Amazed/2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Design/Themes/NotSoHappy/Amazed/2x.pxd
Binary file not shown.
Binary file added Design/Themes/NotSoHappy/Cat/2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Design/Themes/NotSoHappy/Cat/2x.pxd
Binary file not shown.
Binary file modified Design/Themes/NotSoHappy/Pale/2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Design/Themes/NotSoHappy/Pale/2x.pxd
Binary file not shown.

0 comments on commit b0dbe05

Please sign in to comment.