mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-03 08:25:34 +00:00
ui/app: make Draw.Config a value, not a pointer
We are going to encourage a model where pointers to a central (program global) Configs are passed to widgets at setup time, and not pass Configs at every frame. That way, the global Gonfig can change, but the pointers won't need updating. This change only switches the Draw event's Config pointer to a value to avoid tempting programs to use the event Config instead of updating their own central Configs. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -275,7 +275,7 @@ func (w *window) draw(sync bool) {
|
||||
X: int(width),
|
||||
Y: int(height),
|
||||
},
|
||||
Config: &ui.Config{
|
||||
Config: ui.Config{
|
||||
PxPerDp: ppdp,
|
||||
PxPerSp: w.fontScale * ppdp,
|
||||
Now: time.Now(),
|
||||
|
||||
Reference in New Issue
Block a user