jonegil / gui-with-gio

Tutorials for Gio, the GUI framework in Go.
https://jonegil.github.io/gui-with-gio/
Other
186 stars 41 forks source link

teleprompter: The right margin covers the text #30

Closed michelemendel closed 1 year ago

michelemendel commented 1 year ago
Screenshot 2023-03-10 at 15 03 48

Changing marginWidth = (unit.Dp(gtx.Constraints.Max.X) - textWidth) / 2 to marginWidth = (unit.Dp(gtx.Constraints.Max.X) - textWidth) / 4 fixed the problem, but I don't see why.

jonegil commented 1 year ago

Thank you for the comment. How big of a screen are you running this on?

jonegil commented 1 year ago

I know the root cause, and it's by design to have borders left and right that squeezes the text into the middle.

However, depending on screen resolution, the squeeze is potentially too large which is why your adjustment makes it visible again.

Closing this for now.