Fix uiScale radio options separating labels from values (#942)
This commit is contained in:
@@ -724,16 +724,22 @@ func (s *SettingsDialog) createAppearanceTab(window fyne.Window) *container.TabI
|
|||||||
s.doChooseTTFFile(window, boldFontEntry)
|
s.doChooseTTFFile(window, boldFontEntry)
|
||||||
})
|
})
|
||||||
|
|
||||||
uiScaleRadio := widget.NewRadioGroup([]string{lang.L("Smaller"), lang.L("Normal"), lang.L("Larger")}, func(choice string) {
|
uiScaleLabels := []string{lang.L("Smaller"), lang.L("Normal"), lang.L("Larger")}
|
||||||
s.config.Application.UIScaleSize = choice
|
uiScaleValues := []string{"Smaller", "Normal", "Larger"}
|
||||||
s.setRestartRequired()
|
|
||||||
|
uiScaleRadio := widget.NewRadioGroup(uiScaleLabels, func(choice string) {
|
||||||
|
if i := slices.Index(uiScaleLabels, choice); i >= 0 {
|
||||||
|
s.config.Application.UIScaleSize = uiScaleValues[i]
|
||||||
|
s.setRestartRequired()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
uiScaleRadio.Required = true
|
uiScaleRadio.Required = true
|
||||||
uiScaleRadio.Horizontal = true
|
uiScaleRadio.Horizontal = true
|
||||||
if s.config.Application.UIScaleSize == "Smaller" || s.config.Application.UIScaleSize == "Larger" {
|
|
||||||
uiScaleRadio.Selected = s.config.Application.UIScaleSize
|
if i := slices.Index(uiScaleValues, s.config.Application.UIScaleSize); i >= 0 {
|
||||||
|
uiScaleRadio.Selected = uiScaleLabels[i]
|
||||||
} else {
|
} else {
|
||||||
uiScaleRadio.Selected = "Normal"
|
uiScaleRadio.Selected = lang.L("Normal")
|
||||||
}
|
}
|
||||||
|
|
||||||
disableDPI := widget.NewCheck(lang.L("Disable automatic DPI adjustment"), func(b bool) {
|
disableDPI := widget.NewCheck(lang.L("Disable automatic DPI adjustment"), func(b bool) {
|
||||||
|
|||||||
Reference in New Issue
Block a user