Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird behaviour when resizing or minimizing a ScrollContainer containing a VBox #1245

Closed
PucklaJ opened this issue Aug 11, 2020 · 4 comments
Closed
Assignees
Labels
blocker Items that would block a forthcoming release bug Something isn't working

Comments

@PucklaJ
Copy link
Contributor

PucklaJ commented Aug 11, 2020

Describe the bug:

When you minimize a Window containing a ScrollContainer the VBox does not expand completely. The same thing happens if you resize the Window so that both the horizontal and vertical scroll bars appear.

To Reproduce:

Steps to reproduce the behaviour:

  1. Create a Vbox inside a ScrollContainer
  2. Minimize or resize the Window as described above.
  3. Resize the Window again.
  4. Notice that the VBox does not expand.

Screenshots:

vbox_bug

Example code:

package main

import (
	"fyne.io/fyne"
	"fyne.io/fyne/app"
	"fyne.io/fyne/layout"
	"fyne.io/fyne/widget"
)

func main() {
	a := app.New()
	w := a.NewWindow("V Box")

	w.SetContent(
		widget.NewScrollContainer(
			widget.NewVBox(
				fyne.NewContainerWithLayout(layout.NewCenterLayout(), widget.NewLabel("VBoxElement 1")),
				fyne.NewContainerWithLayout(layout.NewCenterLayout(), widget.NewLabel("VBoxElement 2")),
				widget.NewButton("Hello World", nil),
				widget.NewEntry(),
			),
		),
	)

	w.Resize(fyne.NewSize(640, 480))

	w.ShowAndRun()
}

Device:

  • OS: Windows 10
  • Go version: 1.14.6
  • Fyne version: 1.3.3
@andydotxyz
Copy link
Member

Although the exact steps do not reproduce the issue on other platforms I had a suspicion that Windows was resizing the window to 0,0.

On other systems running the same code and resizing the window to less than the content minSize and size up again you can see the same issue.

@andydotxyz andydotxyz added the bug Something isn't working label Aug 11, 2020
@andydotxyz andydotxyz added this to the 1.3.x milestone Aug 11, 2020
@andydotxyz andydotxyz added the blocker Items that would block a forthcoming release label Aug 11, 2020
@andydotxyz
Copy link
Member

On looking at this I wanted to remove some possible complications... the following smaller code should also show the same outcome:

package main

import (
	"fyne.io/fyne"
	"fyne.io/fyne/app"
	"fyne.io/fyne/layout"
	"fyne.io/fyne/widget"
)

func main() {
	a := app.New()
	w := a.NewWindow("V Box")

	w.SetContent(
		widget.NewScrollContainer(
			fyne.NewContainerWithLayout(layout.NewGridLayout(2),
				widget.NewButton("Hello World", nil),
				widget.NewEntry(),
			),
		),
	)

	w.ShowAndRun()
}

@andydotxyz
Copy link
Member

Moving this blocker to 1.4 as the team agreed we won't make another 1.3.x so we can focus on 1.4

andydotxyz added a commit that referenced this issue Oct 22, 2020
@andydotxyz
Copy link
Member

On develop for testing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker Items that would block a forthcoming release bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants