Fix settings reacting to language change
This commit is contained in:
@ -41,30 +41,39 @@ struct SettingsSheet: View {
|
||||
|
||||
var body: some View {
|
||||
VStack(spacing: 0) {
|
||||
HStack(alignment: .top) {
|
||||
DetailTitle(
|
||||
title: title,
|
||||
text: text)
|
||||
Spacer()
|
||||
Picker("", selection: $language) {
|
||||
Text("English")
|
||||
.tag(ContentLanguage.english)
|
||||
Text("German")
|
||||
.tag(ContentLanguage.german)
|
||||
}
|
||||
.pickerStyle(.segmented)
|
||||
Button(action: { dismiss() }) {
|
||||
Text("Close")
|
||||
VStack(alignment: .leading) {
|
||||
HStack(alignment: .top) {
|
||||
Text(title)
|
||||
.font(.largeTitle)
|
||||
.bold()
|
||||
Spacer()
|
||||
HStack(alignment: .center) {
|
||||
Picker("", selection: $language) {
|
||||
Text("English")
|
||||
.tag(ContentLanguage.english)
|
||||
Text("German")
|
||||
.tag(ContentLanguage.german)
|
||||
}
|
||||
.pickerStyle(.segmented)
|
||||
Button(action: { dismiss() }) {
|
||||
Text("Close")
|
||||
}
|
||||
}.frame(width: 200)
|
||||
}
|
||||
Text(text)
|
||||
.foregroundStyle(.secondary)
|
||||
.padding(.bottom, 30)
|
||||
|
||||
}
|
||||
.frame(height: 100)
|
||||
.padding()
|
||||
.background(Color(NSColor.windowBackgroundColor))
|
||||
NavigationSplitView {
|
||||
SettingsListView(section: $section)
|
||||
.navigationSplitViewColumnWidth(min: sidebarWidth, ideal: sidebarWidth, max: sidebarWidth)
|
||||
} detail: {
|
||||
SettingsContentView(section: section)
|
||||
SettingsContentView(language: $language, section: $section)
|
||||
}
|
||||
}.frame(width: 550, height: 600)
|
||||
}.frame(width: 600, height: 600)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user