SettingsUI // Ensure the visibility of scroll bars when should.

This commit is contained in:
ShikiSuen 2023-12-04 17:22:31 +08:00
parent 19339d8195
commit 464838b721
9 changed files with 44 additions and 18 deletions

View File

@ -267,9 +267,12 @@ public struct VwrSettingsPaneBehavior: View {
.settingsDescription() .settingsDescription()
} }
} }
}.formStyled().frame(minWidth: CtlSettingsUI.formWidth, maxWidth: ceil(CtlSettingsUI.formWidth * 1.2)) }.formStyled()
} }
.frame(maxHeight: CtlSettingsUI.contentMaxHeight) .frame(
minWidth: CtlSettingsUI.formWidth,
maxHeight: CtlSettingsUI.contentMaxHeight
)
} }
} }

View File

@ -201,9 +201,12 @@ public struct VwrSettingsPaneCandidates: View {
isOn: $enableMouseScrollingForTDKCandidatesCocoa isOn: $enableMouseScrollingForTDKCandidatesCocoa
) )
} }
}.formStyled().frame(minWidth: CtlSettingsUI.formWidth, maxWidth: ceil(CtlSettingsUI.formWidth * 1.2)) }.formStyled()
} }
.frame(maxHeight: CtlSettingsUI.contentMaxHeight) .frame(
minWidth: CtlSettingsUI.formWidth,
maxHeight: CtlSettingsUI.contentMaxHeight
)
} }
} }

View File

@ -183,9 +183,12 @@ public struct VwrSettingsPaneCassette: View {
.settingsDescription() .settingsDescription()
} }
} }
}.formStyled().frame(minWidth: CtlSettingsUI.formWidth, maxWidth: ceil(CtlSettingsUI.formWidth * 1.2)) }.formStyled()
} }
.frame(maxHeight: CtlSettingsUI.contentMaxHeight) .frame(
minWidth: CtlSettingsUI.formWidth,
maxHeight: CtlSettingsUI.contentMaxHeight
)
} }
} }

View File

@ -71,9 +71,12 @@ public struct VwrSettingsPaneDevZone: View {
.settingsDescription() .settingsDescription()
} }
} }
}.formStyled().frame(minWidth: CtlSettingsUI.formWidth, maxWidth: ceil(CtlSettingsUI.formWidth * 1.2)) }.formStyled()
} }
.frame(maxHeight: CtlSettingsUI.contentMaxHeight) .frame(
minWidth: CtlSettingsUI.formWidth,
maxHeight: CtlSettingsUI.contentMaxHeight
)
} }
} }

View File

@ -254,9 +254,12 @@ public struct VwrSettingsPaneDictionary: View {
}.disabled(keykeyImportButtonDisabled) }.disabled(keykeyImportButtonDisabled)
} }
} }
}.formStyled().frame(minWidth: CtlSettingsUI.formWidth, maxWidth: ceil(CtlSettingsUI.formWidth * 1.2)) }.formStyled()
} }
.frame(maxHeight: CtlSettingsUI.contentMaxHeight) .frame(
minWidth: CtlSettingsUI.formWidth,
maxHeight: CtlSettingsUI.contentMaxHeight
)
} }
} }

View File

@ -168,9 +168,12 @@ public struct VwrSettingsPaneGeneral: View {
isOn: $isDebugModeEnabled isOn: $isDebugModeEnabled
) )
} }
}.formStyled().frame(minWidth: CtlSettingsUI.formWidth, maxWidth: ceil(CtlSettingsUI.formWidth * 1.2)) }.formStyled()
} }
.frame(maxHeight: CtlSettingsUI.contentMaxHeight) .frame(
minWidth: CtlSettingsUI.formWidth,
maxHeight: CtlSettingsUI.contentMaxHeight
)
} }
} }

View File

@ -123,9 +123,12 @@ public struct VwrSettingsPaneKeyboard: View {
Section(header: Text("Keyboard Shortcuts:")) { Section(header: Text("Keyboard Shortcuts:")) {
VwrSettingsPaneKeyboard_KeyboardShortcuts() VwrSettingsPaneKeyboard_KeyboardShortcuts()
} }
}.formStyled().frame(minWidth: CtlSettingsUI.formWidth, maxWidth: ceil(CtlSettingsUI.formWidth * 1.2)) }.formStyled()
} }
.frame(maxHeight: CtlSettingsUI.contentMaxHeight) .frame(
minWidth: CtlSettingsUI.formWidth,
maxHeight: CtlSettingsUI.contentMaxHeight
)
} }
} }

View File

@ -72,9 +72,12 @@ public struct VwrSettingsPaneOutput: View {
.settingsDescription() .settingsDescription()
} }
} }
}.formStyled().frame(minWidth: CtlSettingsUI.formWidth, maxWidth: ceil(CtlSettingsUI.formWidth * 1.2)) }.formStyled()
} }
.frame(maxHeight: CtlSettingsUI.contentMaxHeight) .frame(
minWidth: CtlSettingsUI.formWidth,
maxHeight: CtlSettingsUI.contentMaxHeight
)
} }
} }

View File

@ -25,9 +25,11 @@ public struct VwrSettingsPanePhrases: View {
} }
.padding(4) .padding(4)
.padding() .padding()
.frame(minWidth: CtlSettingsUI.formWidth, maxWidth: ceil(CtlSettingsUI.formWidth * 1.2))
} }
.frame(maxHeight: CtlSettingsUI.contentMaxHeight) .frame(
minWidth: CtlSettingsUI.formWidth,
maxHeight: CtlSettingsUI.contentMaxHeight
)
} }
} }