mirror of
https://github.com/shadowsocks/ShadowsocksX-NG.git
synced 2026-10-31 23:03:43 +00:00
style(ui): refine picker presentation
This commit is contained in:
@@ -27,7 +27,6 @@ struct ModeCard: View {
|
||||
Text(action.label).tag(action)
|
||||
}
|
||||
}
|
||||
.pickerStyle(.segmented)
|
||||
.labelsHidden()
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
}
|
||||
|
||||
@@ -4,14 +4,15 @@ struct RulesPresetView: View {
|
||||
@ObservedObject var workspaces: RulesWorkspaces
|
||||
|
||||
var body: some View {
|
||||
VStack(spacing: 0) {
|
||||
VStack(alignment: .leading, spacing: 0) {
|
||||
Picker("规则预设", selection: $workspaces.selectedPreset) {
|
||||
ForEach(RulePreset.allCases, id: \.self) { preset in
|
||||
Text(preset.label).tag(preset)
|
||||
}
|
||||
}
|
||||
.pickerStyle(.segmented)
|
||||
.padding()
|
||||
.padding(.top)
|
||||
.padding(.horizontal)
|
||||
RulesView(workflow: workspaces.current).id(workspaces.selectedPreset)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user