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

Split Container does not respect item's Visible status #3232

Closed
2 tasks done
PaulWaldo opened this issue Aug 29, 2022 · 1 comment · Fixed by #3348
Closed
2 tasks done

Split Container does not respect item's Visible status #3232

PaulWaldo opened this issue Aug 29, 2022 · 1 comment · Fixed by #3348
Labels
blocker Items that would block a forthcoming release bug Something isn't working good first issue Good for newcomers Hacktoberfest

Comments

@PaulWaldo
Copy link

Checklist

  • I have searched the issue tracker for open issues that relate to the same problem, before opening a new one.
  • This issue only relates to a single bug. I will open new issues for any other problems.

Describe the bug

When an item in a Split container is hidden, the split should should act is if there is nothing there for that item. Neither the Layout nor the MinSize function examine the Visible status of the items.

How to reproduce

  1. Run the attached code, which is a Split container with buttons on the left and a Label on the right
  2. Drag the slider around to verify it works properly. Note that if you drag the slider right to the MinSize of the Label, the pointer moves, but the slider does not. While still holding the click, drag the slider back to the left and you can see that the pointer and the slider handle become out of sync.
  3. Click the Hide button
  4. Drag the slider around. Note that it behaves exactly the same, but with the label hidden. I would expect that with the label hidden, I could drag the slider all the way to the right edge of the window

Screenshots

CleanShot 2022-08-29 at 16 23 39

Example code

package main

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

func main() {
	myApp := app.New()
	myWindow := myApp.NewWindow("Form Layout")

	label := widget.NewLabel("I am a longish label that just sits here")

	buttons := container.NewVBox(
		widget.NewButton("Show", func() {label.Show()}),
		widget.NewButton("Hide", func() {label.Hide()}),
	)

	c := container.NewHSplit(buttons, label)

	myWindow.SetContent(c)
	myWindow.Resize(fyne.NewSize(500, 300))
	myWindow.ShowAndRun()
}

Fyne version

2.2.3

Go compiler version

go version go1.19 darwin/amd64

Operating system

macOS

Operating system version

Monterey 12.5.1

Additional Information

No response

@PaulWaldo PaulWaldo added the unverified A bug that has been reported but not verified label Aug 29, 2022
@andydotxyz andydotxyz added bug Something isn't working and removed unverified A bug that has been reported but not verified labels Aug 29, 2022
@andydotxyz andydotxyz added blocker Items that would block a forthcoming release good first issue Good for newcomers Hacktoberfest labels Oct 4, 2022
@andydotxyz
Copy link
Member

This was resolved ready for v2.3.0 release

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 good first issue Good for newcomers Hacktoberfest
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants