Fix style
This commit is contained in:
parent
266fb1dc23
commit
24ae87f124
@ -3,7 +3,6 @@ opt_in_rules:
|
|||||||
- anonymous_argument_in_multiline_closure
|
- anonymous_argument_in_multiline_closure
|
||||||
- array_init
|
- array_init
|
||||||
- attributes
|
- attributes
|
||||||
- closure_body_length
|
|
||||||
- closure_end_indentation
|
- closure_end_indentation
|
||||||
- closure_spacing
|
- closure_spacing
|
||||||
- collection_alignment
|
- collection_alignment
|
||||||
|
@ -43,7 +43,7 @@ public enum Icon: WinUIWidget, Equatable {
|
|||||||
data: WidgetData,
|
data: WidgetData,
|
||||||
updateProperties: Bool,
|
updateProperties: Bool,
|
||||||
type: Data.Type
|
type: Data.Type
|
||||||
) where Data : ViewRenderData {
|
) where Data: ViewRenderData {
|
||||||
guard updateProperties else {
|
guard updateProperties else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -80,15 +80,27 @@ struct ContentView: View {
|
|||||||
SettingsControl("Button Control", icon: .systemIcon(unicode: "\u{E7C9}")) {
|
SettingsControl("Button Control", icon: .systemIcon(unicode: "\u{E7C9}")) {
|
||||||
Button("Control") { }
|
Button("Control") { }
|
||||||
}
|
}
|
||||||
SettingsControl("Combo Box", icon: .systemIcon(unicode: "\u{E700}"), description: "Selected item: \(comboBoxSelection)") {
|
SettingsControl(
|
||||||
|
"Combo Box",
|
||||||
|
icon: .systemIcon(unicode: "\u{E700}"),
|
||||||
|
description: "Selected item: \(comboBoxSelection)"
|
||||||
|
) {
|
||||||
ComboBox(NavigationItem.allCases, selection: $comboBoxSelection)
|
ComboBox(NavigationItem.allCases, selection: $comboBoxSelection)
|
||||||
}
|
}
|
||||||
SettingsControl("Toggle Switch", icon: .systemIcon(unicode: "\u{F19E}"), description: "Current state: \(switchState ? "on" : "off")") {
|
SettingsControl(
|
||||||
|
"Toggle Switch",
|
||||||
|
icon: .systemIcon(unicode: "\u{F19E}"),
|
||||||
|
description: "Current state: \(switchState ? "on" : "off")"
|
||||||
|
) {
|
||||||
ToggleSwitch(isOn: $switchState)
|
ToggleSwitch(isOn: $switchState)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SettingsSection("About") {
|
SettingsSection("About") {
|
||||||
SettingsControl("WinUI for Swift Demo", icon: .systemIcon(unicode: "\u{E946}"), description: "main") {
|
SettingsControl(
|
||||||
|
"WinUI for Swift Demo",
|
||||||
|
icon: .systemIcon(unicode: "\u{E946}"),
|
||||||
|
description: "main"
|
||||||
|
) {
|
||||||
HyperlinkButton("Website", url: "https://aparoksha.dev/")
|
HyperlinkButton("Website", url: "https://aparoksha.dev/")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user