LibGUI: Set FilePicker window icon based on mode (#4148)

This commit is contained in:
Zac 2020-11-23 23:56:44 +10:00 committed by GitHub
parent df758a5a51
commit 39bb346cef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
Notes: sideshowbarker 2024-07-19 01:18:10 +09:00

View file

@ -85,12 +85,15 @@ FilePicker::FilePicker(Window* parent_window, Mode mode, Options options, const
switch (m_mode) {
case Mode::Open:
set_title("Open File");
set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/open.png"));
break;
case Mode::OpenMultiple:
set_title("Open Files");
set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/open.png"));
break;
case Mode::Save:
set_title("Save File");
set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/save.png"));
break;
}
set_title(m_mode == Mode::Open ? "Open File" : "Save File");