File tree Expand file tree Collapse file tree 1 file changed +11
-15
lines changed Expand file tree Collapse file tree 1 file changed +11
-15
lines changed Original file line number Diff line number Diff line change @@ -169,10 +169,19 @@ func (d *driver) Run() {
169
169
app .Main (func (a app.App ) {
170
170
d .app = a
171
171
d .queuedFuncs = async .NewUnboundedChan [func ()]()
172
- var pendingSettings fyne. Settings
172
+
173
173
fyne .CurrentApp ().Settings ().AddListener (func (s fyne.Settings ) {
174
- pendingSettings = s
174
+ painter .ClearFontCache ()
175
+ cache .ResetThemeCaches ()
176
+ intapp .ApplySettingsWithCallback (s , fyne .CurrentApp (), func (w fyne.Window ) {
177
+ c , ok := w .Canvas ().(* canvas )
178
+ if ! ok {
179
+ return
180
+ }
181
+ c .applyThemeOutOfTreeObjects ()
182
+ })
175
183
})
184
+
176
185
draw := time .NewTicker (time .Second / 60 )
177
186
defer func () {
178
187
l := fyne .CurrentApp ().Lifecycle ().(* intapp.Lifecycle )
@@ -250,19 +259,6 @@ func (d *driver) Run() {
250
259
d .typeUpCanvas (c , e .Rune , e .Code , e .Modifiers )
251
260
}
252
261
}
253
-
254
- if pendingSettings != nil {
255
- painter .ClearFontCache ()
256
- cache .ResetThemeCaches ()
257
- intapp .ApplySettingsWithCallback (pendingSettings , fyne .CurrentApp (), func (w fyne.Window ) {
258
- c , ok := w .Canvas ().(* canvas )
259
- if ! ok {
260
- return
261
- }
262
- c .applyThemeOutOfTreeObjects ()
263
- })
264
- pendingSettings = nil
265
- }
266
262
}
267
263
}
268
264
})
You can’t perform that action at this time.
0 commit comments