fyne-io / fyne

Cross platform GUI toolkit in Go inspired by Material Design
https://fyne.io/
Other
25.2k stars 1.4k forks source link

[Linux:Gnome] wrong window size after setting label.Wrapping value. #4888

Open progfargo opened 5 months ago

progfargo commented 5 months ago

Checklist

Describe the bug

setting label.Wrapping to fyne.TextWrapBreak results in wrong window size.

How to reproduce

run the sample code

Screenshots

Screenshot from 2024-05-28 22-03-16

Example code

package main

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

func main() { a := app.New() w := a.NewWindow("bakalim ne olacak") w.Resize(fyne.NewSize(300, 300))

label := widget.NewLabel("what will hapen? what will hapen? what will hapen? what will hapen? what will hapen? what will hapen?")

label.Wrapping = fyne.TextWrapBreak

w.SetContent(label)

w.ShowAndRun()

}

Fyne version

v2.4.5

Go compiler version

go version go1.22.2

Operating system and version

Linux 5.15.0-107-generic #117-Ubuntu x86_64 GNU/Linux

Additional Information

No response

andydotxyz commented 5 months ago

This has come up before - it seems to be specific to Gnome window manager as we ask for the window to be tall because of the initial minimal width, then figure out it can be wider so the height could be smaller. We set the smaller minimum height but the window does not realise it.

I cannot find an original issue for this so unless anyone else can we will leave this open to track the (possible?) solution.

pirST commented 3 weeks ago

The same problem in Lubuntu 24.04 and Kubuntu 24.10. If you put "\n" after the first characters, the problem does not appear.

andydotxyz commented 3 weeks ago

The same problem in Lubuntu 24.04 and Kubuntu 24.10. If you put "\n" after the first characters, the problem does not appear.

Instead of listing the bistro please state the window manager - that is what controls the window min size interpretation...

pirST commented 3 weeks ago

Instead of listing the bistro please state the window manager - that is what controls the window min size interpretation...

Openbox 3.6.1 and kwin 5.1.5