diff --git a/AzooKeyCore/Sources/KeyboardViews/View/CustomKeybaord/SimpleKeyView/SimpleKeyModel.swift b/AzooKeyCore/Sources/KeyboardViews/View/CustomKeybaord/SimpleKeyView/SimpleKeyModel.swift index 3ade17fd..3c164299 100644 --- a/AzooKeyCore/Sources/KeyboardViews/View/CustomKeybaord/SimpleKeyView/SimpleKeyModel.swift +++ b/AzooKeyCore/Sources/KeyboardViews/View/CustomKeybaord/SimpleKeyView/SimpleKeyModel.swift @@ -82,7 +82,7 @@ struct SimpleKeyModel: Simp private let pressActions: [ActionType] let longPressActions: LongpressActionType - func label(width: CGFloat, states: VariableStates, theme: ThemeData) -> KeyLabel { + func label(width: CGFloat, states: VariableStates, theme: ThemeData) -> KeyLabel { KeyLabel(self.keyLabelType, width: width) } @@ -108,7 +108,7 @@ struct SimpleEnterKeyModel: let longPressActions: LongpressActionType = .none let unpressedKeyColorType: SimpleUnpressedKeyColorType = .enter - func label(width: CGFloat, states: VariableStates, theme: ThemeData) -> KeyLabel { + func label(width: CGFloat, states: VariableStates, theme: ThemeData) -> KeyLabel { let text = Design.language.getEnterKeyText(states.enterKeyState) return KeyLabel(.text(text), width: width) } @@ -134,7 +134,7 @@ struct SimpleChangeKeyboardKeyModel(width: CGFloat, states: VariableStates, theme: ThemeData) -> KeyLabel { + func label(width: CGFloat, states: VariableStates, theme: ThemeData) -> KeyLabel { if SemiStaticStates.shared.needsInputModeSwitchKey { return KeyLabel(.changeKeyboard, width: width) } else { diff --git a/AzooKeyCore/Sources/KeyboardViews/View/FlickKeyboard/KeyView/FlickAaKeyModel.swift b/AzooKeyCore/Sources/KeyboardViews/View/FlickKeyboard/KeyView/FlickAaKeyModel.swift index 94a7d7da..8ded3816 100644 --- a/AzooKeyCore/Sources/KeyboardViews/View/FlickKeyboard/KeyView/FlickAaKeyModel.swift +++ b/AzooKeyCore/Sources/KeyboardViews/View/FlickKeyboard/KeyView/FlickAaKeyModel.swift @@ -37,7 +37,7 @@ struct FlickAaKeyModel: Fli } } - func label(width: CGFloat, states: VariableStates) -> KeyLabel { + func label(width: CGFloat, states: VariableStates) -> KeyLabel { if states.boolStates.isCapsLocked { return KeyLabel(.image("capslock.fill"), width: width) } else { diff --git a/AzooKeyCore/Sources/KeyboardViews/View/FlickKeyboard/KeyView/FlickChangeKeyboardKeyModel.swift b/AzooKeyCore/Sources/KeyboardViews/View/FlickKeyboard/KeyView/FlickChangeKeyboardKeyModel.swift index 8c2a694e..255af3b7 100644 --- a/AzooKeyCore/Sources/KeyboardViews/View/FlickKeyboard/KeyView/FlickChangeKeyboardKeyModel.swift +++ b/AzooKeyCore/Sources/KeyboardViews/View/FlickKeyboard/KeyView/FlickChangeKeyboardKeyModel.swift @@ -43,7 +43,7 @@ struct FlickChangeKeyboardModel(width: CGFloat, states: VariableStates) -> KeyLabel { + func label(width: CGFloat, states: VariableStates) -> KeyLabel { switch SemiStaticStates.shared.needsInputModeSwitchKey { case true: return KeyLabel(.changeKeyboard, width: width) diff --git a/AzooKeyCore/Sources/KeyboardViews/View/FlickKeyboard/KeyView/FlickEnterKeyModel.swift b/AzooKeyCore/Sources/KeyboardViews/View/FlickKeyboard/KeyView/FlickEnterKeyModel.swift index 44082bc1..98b9a304 100644 --- a/AzooKeyCore/Sources/KeyboardViews/View/FlickKeyboard/KeyView/FlickEnterKeyModel.swift +++ b/AzooKeyCore/Sources/KeyboardViews/View/FlickKeyboard/KeyView/FlickEnterKeyModel.swift @@ -30,7 +30,7 @@ struct FlickEnterKeyModel: [:] } - func label(width: CGFloat, states: VariableStates) -> KeyLabel { + func label(width: CGFloat, states: VariableStates) -> KeyLabel { let text = Design.language.getEnterKeyText(states.enterKeyState) return KeyLabel(.text(text), width: width) } diff --git a/AzooKeyCore/Sources/KeyboardViews/View/FlickKeyboard/KeyView/FlickKanaSymbolsKeyModel.swift b/AzooKeyCore/Sources/KeyboardViews/View/FlickKeyboard/KeyView/FlickKanaSymbolsKeyModel.swift index 59ca0069..78f6e31a 100644 --- a/AzooKeyCore/Sources/KeyboardViews/View/FlickKeyboard/KeyView/FlickKanaSymbolsKeyModel.swift +++ b/AzooKeyCore/Sources/KeyboardViews/View/FlickKeyboard/KeyView/FlickKanaSymbolsKeyModel.swift @@ -33,7 +33,7 @@ struct FlickKanaSymbolsKeyModel(width: CGFloat, states: VariableStates) -> KeyLabel { + func label(width: CGFloat, states: VariableStates) -> KeyLabel { KeyLabel(self.labelType, width: width) } diff --git a/AzooKeyCore/Sources/KeyboardViews/View/FlickKeyboard/KeyView/FlickKeyModel.swift b/AzooKeyCore/Sources/KeyboardViews/View/FlickKeyboard/KeyView/FlickKeyModel.swift index 3157b215..b5530cde 100644 --- a/AzooKeyCore/Sources/KeyboardViews/View/FlickKeyboard/KeyView/FlickKeyModel.swift +++ b/AzooKeyCore/Sources/KeyboardViews/View/FlickKeyboard/KeyView/FlickKeyModel.swift @@ -49,7 +49,7 @@ struct FlickKeyModel: Flick self.flickKeys } - func label(width: CGFloat, states: VariableStates) -> KeyLabel { + func label(width: CGFloat, states: VariableStates) -> KeyLabel { KeyLabel(self.labelType, width: width) } diff --git a/AzooKeyCore/Sources/KeyboardViews/View/FlickKeyboard/KeyView/FlickKogakiKeyModel.swift b/AzooKeyCore/Sources/KeyboardViews/View/FlickKeyboard/KeyView/FlickKogakiKeyModel.swift index 452611cf..ebb697d0 100644 --- a/AzooKeyCore/Sources/KeyboardViews/View/FlickKeyboard/KeyView/FlickKogakiKeyModel.swift +++ b/AzooKeyCore/Sources/KeyboardViews/View/FlickKeyboard/KeyView/FlickKogakiKeyModel.swift @@ -33,7 +33,7 @@ struct FlickKogakiKeyModel: [.changeCharacterType] } - func label(width: CGFloat, states: VariableStates) -> KeyLabel { + func label(width: CGFloat, states: VariableStates) -> KeyLabel { KeyLabel(self.labelType, width: width) } diff --git a/AzooKeyCore/Sources/KeyboardViews/View/FlickKeyboard/KeyView/FlickSpaceKeyModel.swift b/AzooKeyCore/Sources/KeyboardViews/View/FlickKeyboard/KeyView/FlickSpaceKeyModel.swift index e13e1e74..02847458 100644 --- a/AzooKeyCore/Sources/KeyboardViews/View/FlickKeyboard/KeyView/FlickSpaceKeyModel.swift +++ b/AzooKeyCore/Sources/KeyboardViews/View/FlickKeyboard/KeyView/FlickSpaceKeyModel.swift @@ -41,7 +41,7 @@ struct FlickSpaceKeyModel: [.input(" ")] } - func label(width: CGFloat, states: VariableStates) -> KeyLabel { + func label(width: CGFloat, states: VariableStates) -> KeyLabel { KeyLabel(.text("空白"), width: width) } diff --git a/AzooKeyCore/Sources/KeyboardViews/View/FlickKeyboard/KeyView/FlickTabKeyModel.swift b/AzooKeyCore/Sources/KeyboardViews/View/FlickKeyboard/KeyView/FlickTabKeyModel.swift index 0278175c..668d2fa1 100644 --- a/AzooKeyCore/Sources/KeyboardViews/View/FlickKeyboard/KeyView/FlickTabKeyModel.swift +++ b/AzooKeyCore/Sources/KeyboardViews/View/FlickKeyboard/KeyView/FlickTabKeyModel.swift @@ -37,7 +37,7 @@ struct FlickTabKeyModel: Fl self.tab = tab } - func label(width: CGFloat, states: VariableStates) -> KeyLabel { + func label(width: CGFloat, states: VariableStates) -> KeyLabel { KeyLabel(self.data.labelType, width: width) } diff --git a/AzooKeyCore/Sources/KeyboardViews/View/QwertyKeyboard/KeyView/QwertyAaKeyModel.swift b/AzooKeyCore/Sources/KeyboardViews/View/QwertyKeyboard/KeyView/QwertyAaKeyModel.swift index cfbeab90..86efda10 100644 --- a/AzooKeyCore/Sources/KeyboardViews/View/QwertyKeyboard/KeyView/QwertyAaKeyModel.swift +++ b/AzooKeyCore/Sources/KeyboardViews/View/QwertyKeyboard/KeyView/QwertyAaKeyModel.swift @@ -28,7 +28,7 @@ struct QwertyAaKeyModel: Qw .init(start: [.setBoolState(VariableStates.BoolStates.isCapsLockedKey, .toggle)]) } - func label(width: CGFloat, states: VariableStates, color: Color?) -> KeyLabel { + func label(width: CGFloat, states: VariableStates, color: Color?) -> KeyLabel { if states.boolStates.isCapsLocked { return KeyLabel(.image("capslock.fill"), width: width, textColor: color) } else { diff --git a/AzooKeyCore/Sources/KeyboardViews/View/QwertyKeyboard/KeyView/QwertyChangeKeyboardKeyModel.swift b/AzooKeyCore/Sources/KeyboardViews/View/QwertyKeyboard/KeyView/QwertyChangeKeyboardKeyModel.swift index 673507e1..92139067 100644 --- a/AzooKeyCore/Sources/KeyboardViews/View/QwertyKeyboard/KeyView/QwertyChangeKeyboardKeyModel.swift +++ b/AzooKeyCore/Sources/KeyboardViews/View/QwertyKeyboard/KeyView/QwertyChangeKeyboardKeyModel.swift @@ -66,7 +66,7 @@ struct QwertyChangeKeyboardKeyModel(width: CGFloat, states: VariableStates, color: Color?) -> KeyLabel { + func label(width: CGFloat, states: VariableStates, color: Color?) -> KeyLabel { if SemiStaticStates.shared.needsInputModeSwitchKey { return KeyLabel(.changeKeyboard, width: width, textColor: color) } diff --git a/AzooKeyCore/Sources/KeyboardViews/View/QwertyKeyboard/KeyView/QwertyEnterKeyModel.swift b/AzooKeyCore/Sources/KeyboardViews/View/QwertyKeyboard/KeyView/QwertyEnterKeyModel.swift index 50faca4e..98fe9dbd 100644 --- a/AzooKeyCore/Sources/KeyboardViews/View/QwertyKeyboard/KeyView/QwertyEnterKeyModel.swift +++ b/AzooKeyCore/Sources/KeyboardViews/View/QwertyKeyboard/KeyView/QwertyEnterKeyModel.swift @@ -32,7 +32,7 @@ struct QwertyEnterKeyModel: let longPressActions: LongpressActionType = .none - func label(width: CGFloat, states: VariableStates, color: Color?) -> KeyLabel { + func label(width: CGFloat, states: VariableStates, color: Color?) -> KeyLabel { let text = Design.language.getEnterKeyText(states.enterKeyState) return KeyLabel(.text(text), width: width, textSize: .small, textColor: color) } diff --git a/AzooKeyCore/Sources/KeyboardViews/View/QwertyKeyboard/KeyView/QwertyFunctionalKeyModel.swift b/AzooKeyCore/Sources/KeyboardViews/View/QwertyKeyboard/KeyView/QwertyFunctionalKeyModel.swift index fecb568a..357c6ed9 100644 --- a/AzooKeyCore/Sources/KeyboardViews/View/QwertyKeyboard/KeyView/QwertyFunctionalKeyModel.swift +++ b/AzooKeyCore/Sources/KeyboardViews/View/QwertyKeyboard/KeyView/QwertyFunctionalKeyModel.swift @@ -34,7 +34,7 @@ struct QwertyFunctionalKeyModel(width: CGFloat, states: VariableStates, color: Color?) -> KeyLabel { + func label(width: CGFloat, states: VariableStates, color: Color?) -> KeyLabel { KeyLabel(self.labelType, width: width, textColor: color) } diff --git a/AzooKeyCore/Sources/KeyboardViews/View/QwertyKeyboard/KeyView/QwertyKeyModel.swift b/AzooKeyCore/Sources/KeyboardViews/View/QwertyKeyboard/KeyView/QwertyKeyModel.swift index 683598ab..a7a0048f 100644 --- a/AzooKeyCore/Sources/KeyboardViews/View/QwertyKeyboard/KeyView/QwertyKeyModel.swift +++ b/AzooKeyCore/Sources/KeyboardViews/View/QwertyKeyboard/KeyView/QwertyKeyModel.swift @@ -31,7 +31,7 @@ struct QwertyKeyModel: Qwer self.unpressedKeyColorType = keyColorType } - func label(width: CGFloat, states: VariableStates, color: Color?) -> KeyLabel { + func label(width: CGFloat, states: VariableStates, color: Color?) -> KeyLabel { if (states.boolStates.isCapsLocked || states.boolStates.isShifted), states.keyboardLanguage == .en_US, case let .text(text) = self.labelType { return KeyLabel(.text(text.uppercased()), width: width, textColor: color) } diff --git a/AzooKeyCore/Sources/KeyboardViews/View/QwertyKeyboard/KeyView/QwertyLanguageSwitchKeyModel.swift b/AzooKeyCore/Sources/KeyboardViews/View/QwertyKeyboard/KeyView/QwertyLanguageSwitchKeyModel.swift index 447d64a6..41550099 100644 --- a/AzooKeyCore/Sources/KeyboardViews/View/QwertyKeyboard/KeyView/QwertyLanguageSwitchKeyModel.swift +++ b/AzooKeyCore/Sources/KeyboardViews/View/QwertyKeyboard/KeyView/QwertyLanguageSwitchKeyModel.swift @@ -53,7 +53,7 @@ struct QwertySwitchLanguageKeyModel(width: CGFloat, states: VariableStates, color: Color?) -> KeyLabel { + func label(width: CGFloat, states: VariableStates, color: Color?) -> KeyLabel { let current = currentTabLanguage(variableStates: states) if languages.0 == current { return KeyLabel(.selectable(languages.0.symbol, languages.1.symbol), width: width, textColor: color) @@ -62,7 +62,7 @@ struct QwertySwitchLanguageKeyModel: } } - func label(width: CGFloat, states: VariableStates, color: Color?) -> KeyLabel { + func label(width: CGFloat, states: VariableStates, color: Color?) -> KeyLabel { if states.boolStates.isCapsLocked { return KeyLabel(.image("capslock.fill"), width: width, textColor: color) } else if states.boolStates.isShifted { diff --git a/AzooKeyCore/Sources/KeyboardViews/View/QwertyKeyboard/KeyView/QwertySpaceKeyModel.swift b/AzooKeyCore/Sources/KeyboardViews/View/QwertyKeyboard/KeyView/QwertySpaceKeyModel.swift index e02b5140..8c97f4f7 100644 --- a/AzooKeyCore/Sources/KeyboardViews/View/QwertyKeyboard/KeyView/QwertySpaceKeyModel.swift +++ b/AzooKeyCore/Sources/KeyboardViews/View/QwertyKeyboard/KeyView/QwertySpaceKeyModel.swift @@ -19,7 +19,7 @@ struct QwertySpaceKeyModel: init() {} - func label(width: CGFloat, states: VariableStates, color: Color?) -> KeyLabel { + func label(width: CGFloat, states: VariableStates, color: Color?) -> KeyLabel { switch states.keyboardLanguage { case .el_GR: return KeyLabel(.text("διάστημα"), width: width, textSize: .small, textColor: color) diff --git a/AzooKeyCore/Sources/KeyboardViews/View/QwertyKeyboard/KeyView/QwertyTabKeyModel.swift b/AzooKeyCore/Sources/KeyboardViews/View/QwertyKeyboard/KeyView/QwertyTabKeyModel.swift index 48be6a4e..969114b9 100644 --- a/AzooKeyCore/Sources/KeyboardViews/View/QwertyKeyboard/KeyView/QwertyTabKeyModel.swift +++ b/AzooKeyCore/Sources/KeyboardViews/View/QwertyKeyboard/KeyView/QwertyTabKeyModel.swift @@ -39,7 +39,7 @@ struct QwertyTabKeyModel: Q self.keySizeType = .functional(normal: rowInfo.normal, functional: rowInfo.functional, enter: rowInfo.enter, space: rowInfo.space) } - func label(width: CGFloat, states: VariableStates, color: Color?) -> KeyLabel { + func label(width: CGFloat, states: VariableStates, color: Color?) -> KeyLabel { switch SemiStaticStates.shared.needsInputModeSwitchKey { case true: switch states.keyboardLanguage { diff --git a/AzooKeyCore/Sources/KeyboardViews/View/SpecialTabs/EmojiTab.swift b/AzooKeyCore/Sources/KeyboardViews/View/SpecialTabs/EmojiTab.swift index d0af3089..fae49311 100644 --- a/AzooKeyCore/Sources/KeyboardViews/View/SpecialTabs/EmojiTab.swift +++ b/AzooKeyCore/Sources/KeyboardViews/View/SpecialTabs/EmojiTab.swift @@ -368,7 +368,7 @@ struct EmojiTab: View { private struct ExpandKeyModel: SimpleKeyModelProtocol { private var currentLevel: EmojiTabExpandModePreference.Level private var action: () -> Void - func label(width: CGFloat, states: VariableStates, theme: ThemeData) -> KeyLabel { + func label(width: CGFloat, states: VariableStates, theme: ThemeData) -> KeyLabel { KeyLabel(.image(self.currentLevel.icon), width: width, textSize: .max) } @@ -393,7 +393,7 @@ private struct ExpandKeyModel: SimpleKeyModelProtocol { private var action: () -> Void private var systemImage: String - func label(width: CGFloat, states: VariableStates, theme: ThemeData) -> KeyLabel { + func label(width: CGFloat, states: VariableStates, theme: ThemeData) -> KeyLabel { KeyLabel(.image(systemImage), width: width, textSize: .max) } @@ -430,7 +430,7 @@ private struct EmojiKeyModel(width: CGFloat, states _: VariableStates, theme _: ThemeData) -> KeyLabel { + func label(width: CGFloat, states _: VariableStates, theme _: ThemeData) -> KeyLabel { KeyLabel(.text(emoji), width: width, textSize: .max) }