UI/Qt: Keep chrome style refreshes coalesced

Keep the pending chrome style refresh marker set while the deferred
refresh runs. Applying the refreshed stylesheet can synchronously
deliver palette/style change events, and clearing the marker first lets
those self-induced events enqueue another immediate refresh.

This prevents the Qt chrome from spinning through repeated stylesheet
updates and repainting the location field shadow at idle.
This commit is contained in:
Andreas Kling 2026-05-26 02:02:13 +02:00
parent 6389095054
commit 5e42dd0e26
2 changed files with 2 additions and 2 deletions

View file

@ -450,8 +450,8 @@ void Autocomplete::schedule_chrome_style_update()
m_has_pending_chrome_style_update = true;
QTimer::singleShot(0, this, [this] {
m_has_pending_chrome_style_update = false;
update_chrome_style();
m_has_pending_chrome_style_update = false;
});
}

View file

@ -422,13 +422,13 @@ void LocationEdit::schedule_chrome_style_update()
m_has_pending_chrome_style_update = true;
QTimer::singleShot(0, this, [this] {
m_has_pending_chrome_style_update = false;
update_chrome_style();
m_autocomplete->schedule_chrome_style_update();
update_focus_glow(m_focus_glow_alpha);
update_location_icon();
highlight_location();
update();
m_has_pending_chrome_style_update = false;
});
}