Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
aaaa committed Jan 19, 2024
1 parent d0ba4c8 commit 970f87d
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion SpatialClock/Supporting files/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
"ja" : {
"stringUnit" : {
"state" : "translated",
"value" : "「アニメーションがオン」「秒を表示」している場合、一定量のCPUリソースを消費することがあります。"
"value" : "「アニメーションがオン」かつ「秒を表示」している場合、一定量のCPUリソースを消費することがあります。"
}
}
}
Expand Down
3 changes: 1 addition & 2 deletions SpatialClock/💾Option/💾Key.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
enum 💾Key {
static let presentSettingWindow: String = "presentSettingWindow"
static let hideDate: String = "hideDate"
static let showYear: String = "showYear"
static let hideWeekday: String = "hideWeekday"
static let hideDate: String = "hideDate"
static let showSecond: String = "showSecond"
static let fontSize: String = "fontSize"
static let fontWeight: String = "fontWeight"
Expand Down
8 changes: 4 additions & 4 deletions SpatialClock/💾Option/💾Option.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,25 +56,25 @@ enum 💾Option {
var value: Date
func body(content: Content) -> some View {
switch self.model.animation {
case .disable:
content
case .default:
content
.animation(.default, value: self.value)
case .cool:
content
.contentTransition(.numericText())
.animation(.default, value: self.value)
case .disable:
content
}
}
enum Case: String, CaseIterable, Identifiable {
case `default`, cool, disable
case disable, `default`, cool
var id: Self { self }
var label: LocalizedStringKey {
switch self {
case .disable: "disable"
case .default: "default"
case .cool: "cool"
case .disable: "disable"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion SpatialClock/📱AppModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ class 📱AppModel: ObservableObject {
@AppStorage(💾Key.opacity) var opacity: Double = 1.0
@AppStorage(💾Key.hideBackground) var hideBackground: Bool = false
@AppStorage(💾Key.angle) var angle: Int = 0
@AppStorage(💾Key.animation) var animation: 💾Option.Animation.Case = .default
@AppStorage(💾Key.animation) var animation: 💾Option.Animation.Case = .disable
}
2 changes: 1 addition & 1 deletion SpatialClock/🕒ClockView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ fileprivate extension 🕒ClockView {
@EnvironmentObject var model: 📱AppModel
func body(content: Content) -> some View {
content
.animation(.default, value: self.model.showYear)
.animation(.default, value: self.model.hideDate)
.animation(.default, value: self.model.showYear)
.animation(.default, value: self.model.hideWeekday)
.animation(.default, value: self.model.showSecond)
.animation(.default, value: self.model.fontSize)
Expand Down
2 changes: 1 addition & 1 deletion SpatialClock/🛠️Setting/🛠️SettingMenu.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ struct 🛠️SettingMenu: View {
🛠️VisualTab()
🛠️InfoTab()
}
.frame(maxWidth: 420, maxHeight: 600)
.frame(maxWidth: 420, maxHeight: 580)
.onChange(of: self.scenePhase) { _, newValue in
switch newValue {
case .background: self.dismissWindow()
Expand Down

0 comments on commit 970f87d

Please sign in to comment.