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

Incorrect clipping behavior when scroll containers are nested #1682

Closed
charlesdaniels opened this issue Dec 23, 2020 · 3 comments · Fixed by #1695
Closed

Incorrect clipping behavior when scroll containers are nested #1682

charlesdaniels opened this issue Dec 23, 2020 · 3 comments · Fixed by #1695
Assignees
Labels
bug Something isn't working

Comments

@charlesdaniels
Copy link
Member

Describe the bug:

When a scroll container is nested within another scroll container, the clipping behavior is incorrect.

According to @andydotxyz:

There is a known issue where a scrollContainer inside a ScrollContainer does not clip correctly

I know what the issue is (child clip should intersect parent rather than replace it - but I have not found time to resolve it

The attached video shows a list (which includes a scroll container), where the list items are cards which have scroll containers in their content. Notice how as the outer container is scrolled, the content is not clipped properly and is displayed inside of the menu bar.

vokoscreenNG-2020-12-23_13-00-52.mp4

I have tested this with Fyne v 1.4.2 on Linux with Go 1.15.6.

@charlesdaniels charlesdaniels added bug Something isn't working OS:Linux Tickets affecting only Linux labels Dec 23, 2020
@andydotxyz andydotxyz removed the OS:Linux Tickets affecting only Linux label Dec 24, 2020
@andydotxyz
Copy link
Member

Easy replicate code:

package main

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

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

	w.SetContent(container.NewVScroll(
			container.NewVBox(
				container.NewHScroll(widget.NewLabel("FirstFirstFirst")),
				container.NewHScroll(widget.NewLabel("SecondSecondSecond")),
				container.NewHScroll(widget.NewLabel("ThirdThirdThird")),
				container.NewHScroll(widget.NewLabel("FourthFourthFourth")),
			),
		),
	)

	w.ShowAndRun()
}

Screenshot 2020-12-28 at 13 17 21

@andydotxyz andydotxyz self-assigned this Dec 29, 2020
@andydotxyz
Copy link
Member

I have the solution ready to roll - but it uncovered some bad mathis in the gomobile iOS driver that I will have to fix first.

@andydotxyz
Copy link
Member

Fixed on release/v1.4.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants