mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-21 15:14:13 +00:00
WindowServer: Reload icons on scale changes
Since MultiScaleBitmaps only loads icons for the scales in use, we need to unconditionally reload them so that we pick up the correct bitmaps for a scale that hasn't been previously used.
This commit is contained in:
@@ -38,6 +38,8 @@ bool MultiScaleBitmaps::load(StringView const& filename, StringView const& defau
|
||||
Optional<Gfx::BitmapFormat> bitmap_format;
|
||||
bool did_load_any = false;
|
||||
|
||||
m_bitmaps.clear(); // If we're reloading the bitmaps get rid of the old ones
|
||||
|
||||
auto add_bitmap = [&](StringView const& path, int scale_factor) {
|
||||
auto bitmap = Gfx::Bitmap::load_from_file(path, scale_factor);
|
||||
if (bitmap) {
|
||||
|
||||
Reference in New Issue
Block a user