fyne-io / fyne

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

Theme Override container cannot be used to override layout paddings #5019

Open dweymouth opened 3 months ago

dweymouth commented 3 months ago

Checklist

Describe the bug

The standard layouts all use the deprecated theme.Padding() to look up the padding value which does not pick up the overrides if the layout is used in a container or internally within a widget in an override container.

How to reproduce

create a theme override container with a theme that overrides padding, and put a container with a layout inside that theme override container

Screenshots

No response

Example code

it's trivial from a code audit of the layout package to see where the problem is

Fyne version

2.5.0

Go compiler version

n/a

Operating system and version

all

Additional Information

No response

andydotxyz commented 2 months ago

I think the only way this can be completely resolved is with changes to how the draw is threaded or with an API change for layouts as they have no access to the widget / container that they are being used to lay out.