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

[BUG] Modal Shadow Mismatch and can't Resize #1545

Closed
AlbinoGeek opened this issue Nov 15, 2020 · 2 comments
Closed

[BUG] Modal Shadow Mismatch and can't Resize #1545

AlbinoGeek opened this issue Nov 15, 2020 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@AlbinoGeek
Copy link
Contributor

Describe the bug:

The shadow of a Modal does not match up with it's size/contents when it contains a long label.

To Reproduce:

Full code attached.

Screenshots

Without Wrap

image

With Wrap

image

With Reload

( no change )

With Resize then Reload

( no change )

Putting modal.Show() Last

( no change )

Example code:

func main() {
	fyneApp = app.New()
	fyneApp.Settings().SetTheme(theme.DarkTheme())

	mainWindow = fyneApp.NewWindow("Hello, Fyne!")
	hello := widget.NewLabel("Hello Fyne!")
	mainWindow.SetContent(widget.NewVBox(
		hello,
		widget.NewButton("Hi!", func() {
			hello.SetText("Welcome :)")
		}),
	))

	mainWindow.Resize(fyne.NewSize(420, 360))
	mainWindow.CenterOnScreen()
	mainWindow.Show()

	label := widget.NewLabel("This is some really long text, and we know it will not fit on the screen, because this does not wrap by default.")
	modal := widget.NewModalPopUp(
		widget.NewCard("Welcome!", "First-Time Setup",
			widget.NewVBox(
				label,
			),
		), mainWindow.Canvas())
	// label.Wrapping = fyne.TextWrapWord
	modal.Show()

	// modal.Resize(fyne.NewSize(400, 340))
	// mainWindow.Canvas().Refresh(modal)
	// modal.Refresh()

	fyneApp.Run()
}

Device (please complete the following information):

  • OS: Fedora
  • Version: 33
  • Go version: 1.15.2 linux/amd64
  • Fyne version: 1.4.0
@andydotxyz
Copy link
Member

I am pretty confident that this is because the label will resize to accomodate the wrap.
That makes this a duplicate of a ticket we hoped to resolve soon, #1370

@andydotxyz andydotxyz added the duplicate This issue or pull request already exists label Nov 15, 2020
@andydotxyz
Copy link
Member

Tested locally and #1613 resolves this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants