Skip to content

Commit

Permalink
Fix broken scrolling
Browse files Browse the repository at this point in the history
The defaultusername browser introduced an issue with scrolling inside
the application. Not the actual widget was hidden, but the "internal"
widget was hidden and the scroll window still visible. This introduced
an issue for every other scroll widget, because it stole the "scroll
focus". Therefore the actual widget is now hidden.
  • Loading branch information
seternate committed Sep 13, 2024
1 parent 61f2f9b commit 7b4b8bc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/widget/lanty.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,14 @@ func NewLanty(controller *controller.Controller, window fyne.Window) *Lanty {
})

defaultusernamebrowser.SetOnSubmit(func() {
defaultusernamebrowser.Hide()
lanty.defaultusernamebrowser.Hide()
lanty.showGameBrowser()
})
if controller.Settings.Settings().Username == setting.DEFAULT_USERNAME {
defaultusernamebrowser.Show()
lanty.defaultusernamebrowser.Show()
lanty.hideAll()
} else {
defaultusernamebrowser.Hide()
lanty.defaultusernamebrowser.Hide()
lanty.showGameBrowser()
}

Expand Down Expand Up @@ -270,10 +270,10 @@ func newLantyRenderer(widget *Lanty) *lantyRenderer {

func (renderer *lantyRenderer) Objects() []fyne.CanvasObject {
return []fyne.CanvasObject{
renderer.widget.defaultusernamebrowser,
renderer.widget.sidebar,
renderer.main,
renderer.widget.statusbar,
renderer.widget.defaultusernamebrowser,
}
}

Expand Down

0 comments on commit 7b4b8bc

Please sign in to comment.