minor fixes
This commit is contained in:
1 parent
e71ce58d9b
commit
9cd72271ca
1 file changed
+18
-1
@@ -1430,6 +1430,8 @@ struct WidgetPickerView: View {
|
|||||||
SwiftLocalizationHelper.localizedString(forKey: "Enter label(optional)"),
|
SwiftLocalizationHelper.localizedString(forKey: "Enter label(optional)"),
|
||||||
text: $widgetButtonLabel
|
text: $widgetButtonLabel
|
||||||
)
|
)
|
||||||
|
.foregroundColor(Color.black.opacity(0.82))
|
||||||
|
.environment(\.colorScheme, .light)
|
||||||
.padding(.horizontal, 12)
|
.padding(.horizontal, 12)
|
||||||
.frame(height: fieldHeight)
|
.frame(height: fieldHeight)
|
||||||
.background(
|
.background(
|
||||||
@@ -1451,6 +1453,7 @@ struct WidgetPickerView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.pickerStyle(SegmentedPickerStyle())
|
.pickerStyle(SegmentedPickerStyle())
|
||||||
|
.environment(\.colorScheme, .light)
|
||||||
.disabled(isComboModeLocked)
|
.disabled(isComboModeLocked)
|
||||||
.opacity(isComboModeLocked ? 0.45 : 1.0)
|
.opacity(isComboModeLocked ? 0.45 : 1.0)
|
||||||
}
|
}
|
||||||
@@ -1477,6 +1480,7 @@ struct WidgetPickerView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.pickerStyle(SegmentedPickerStyle())
|
.pickerStyle(SegmentedPickerStyle())
|
||||||
|
.environment(\.colorScheme, .light)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1584,6 +1588,10 @@ struct WidgetPickerView: View {
|
|||||||
poolItems.contains(where: isPad)
|
poolItems.contains(where: isPad)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private var hasGamepadButtonCommand: Bool {
|
||||||
|
poolItems.contains { $0.visualKind == .gamepadButton }
|
||||||
|
}
|
||||||
|
|
||||||
private var isShortcutMode: Bool {
|
private var isShortcutMode: Bool {
|
||||||
effectiveWidgetComboMode == .shortcut
|
effectiveWidgetComboMode == .shortcut
|
||||||
}
|
}
|
||||||
@@ -1597,7 +1605,7 @@ struct WidgetPickerView: View {
|
|||||||
|
|
||||||
private var forcedComboMode: WidgetCreateComboMode? {
|
private var forcedComboMode: WidgetCreateComboMode? {
|
||||||
guard showsComboModeControl else { return nil }
|
guard showsComboModeControl else { return nil }
|
||||||
if targetWidgetKind == .button && hasPadCommand {
|
if targetWidgetKind == .button && (hasPadCommand || hasGamepadButtonCommand) {
|
||||||
return .skill
|
return .skill
|
||||||
}
|
}
|
||||||
return selectedFunctionalButtonOption?.forcedComboMode
|
return selectedFunctionalButtonOption?.forcedComboMode
|
||||||
@@ -1657,6 +1665,15 @@ struct WidgetPickerView: View {
|
|||||||
private var shouldBypassCreateWidgetSheet: Bool {
|
private var shouldBypassCreateWidgetSheet: Bool {
|
||||||
guard !poolItems.isEmpty else { return false }
|
guard !poolItems.isEmpty else { return false }
|
||||||
|
|
||||||
|
let hasVisibleConfigurationSection =
|
||||||
|
showsButtonLabelField ||
|
||||||
|
showsComboModeControl ||
|
||||||
|
showsIntervalSlider ||
|
||||||
|
showsShapeControl
|
||||||
|
if !hasVisibleConfigurationSection {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
let isSinglePadSelection = poolItems.count == 1 && isPad(poolItems[0])
|
let isSinglePadSelection = poolItems.count == 1 && isPad(poolItems[0])
|
||||||
let isSingleButtonThenSinglePadSelection =
|
let isSingleButtonThenSinglePadSelection =
|
||||||
poolItems.count == 2 && !isPad(poolItems[0]) && isPad(poolItems[1])
|
poolItems.count == 2 && !isPad(poolItems[0]) && isPad(poolItems[1])
|
||||||
|
|||||||
Reference in new issue
Block a user