1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:17:44 +00:00

LibGUI: Use "Tray" look & feel for the common locations frame :^)

This commit is contained in:
Andreas Kling 2021-04-09 21:18:43 +02:00
parent 11bea5d633
commit da7dbc116e

View file

@ -223,9 +223,11 @@ FilePicker::FilePicker(Window* parent_window, Mode mode, const StringView& file_
};
auto& common_locations_frame = *widget.find_descendant_of_type_named<GUI::Frame>("common_locations_frame");
common_locations_frame.set_background_role(Gfx::ColorRole::Tray);
auto add_common_location_button = [&](auto& name, String path) -> GUI::Button& {
auto& button = common_locations_frame.add<GUI::Button>();
button.set_button_style(Gfx::ButtonStyle::CoolBar);
button.set_button_style(Gfx::ButtonStyle::Tray);
button.set_foreground_role(Gfx::ColorRole::TrayText);
button.set_text_alignment(Gfx::TextAlignment::CenterLeft);
button.set_text(move(name));
button.set_icon(FileIconProvider::icon_for_path(path).bitmap_for_size(16));