fix(ui): Enable text wrapping for batch settings toggle button
Fixed Issue: - "Hide Batch Settings" button text was overflowing beyond button boundary - Text was truncated and hard to read in narrow layouts Solution: - Created wrapped label overlay on button using container.NewStack - Label has TextWrapWord enabled for automatic line breaking - Maintains button click functionality while improving readability - Text now wraps to multiple lines when space is constrained Files Changed: - main.go: Batch settings toggle button (lines 6858-6879) Reported-by: User (screenshot showing text overflow)
This commit is contained in:
parent
64d111b9b2
commit
c1143b803f
18
main.go
18
main.go
|
|
@ -6855,21 +6855,31 @@ func buildConvertView(state *appState, src *videoSource) fyne.CanvasObject {
|
||||||
settingsContent.Hide()
|
settingsContent.Hide()
|
||||||
|
|
||||||
settingsVisible := false
|
settingsVisible := false
|
||||||
|
toggleSettingsLabel := widget.NewLabel("Show Batch Settings")
|
||||||
|
toggleSettingsLabel.Wrapping = fyne.TextWrapWord
|
||||||
|
toggleSettingsLabel.Alignment = fyne.TextAlignCenter
|
||||||
|
|
||||||
var toggleSettingsBtn *widget.Button
|
var toggleSettingsBtn *widget.Button
|
||||||
toggleSettingsBtn = widget.NewButton("Show Batch Settings", func() {
|
toggleSettingsBtn = widget.NewButton("", func() {
|
||||||
if settingsVisible {
|
if settingsVisible {
|
||||||
settingsContent.Hide()
|
settingsContent.Hide()
|
||||||
toggleSettingsBtn.SetText("Show Batch Settings")
|
toggleSettingsLabel.SetText("Show Batch Settings")
|
||||||
} else {
|
} else {
|
||||||
settingsContent.Show()
|
settingsContent.Show()
|
||||||
toggleSettingsBtn.SetText("Hide Batch Settings")
|
toggleSettingsLabel.SetText("Hide Batch Settings")
|
||||||
}
|
}
|
||||||
settingsVisible = !settingsVisible
|
settingsVisible = !settingsVisible
|
||||||
})
|
})
|
||||||
toggleSettingsBtn.Importance = widget.LowImportance
|
toggleSettingsBtn.Importance = widget.LowImportance
|
||||||
|
|
||||||
settingsBox := container.NewVBox(
|
// Replace button text with wrapped label
|
||||||
|
toggleSettingsBtnWithLabel := container.NewStack(
|
||||||
toggleSettingsBtn,
|
toggleSettingsBtn,
|
||||||
|
container.NewPadded(toggleSettingsLabel),
|
||||||
|
)
|
||||||
|
|
||||||
|
settingsBox := container.NewVBox(
|
||||||
|
toggleSettingsBtnWithLabel,
|
||||||
settingsContent,
|
settingsContent,
|
||||||
widget.NewSeparator(),
|
widget.NewSeparator(),
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user