LibGUI: Window Creation takes attributes as an argument

This reduces windows showing/moving once they are opened and setting
their attributes.
This commit is contained in:
2024-11-14 20:57:34 +02:00
parent 04eee2ea75
commit a859558840
6 changed files with 21 additions and 19 deletions

View File

@@ -22,15 +22,14 @@ int main()
auto font = MUST(LibFont::Font::load("/usr/share/fonts/lat0-16.psfu"_sv));
auto window = MUST(LibGUI::Window::create(0, font.height() + 2 * padding, "TaskBar"));
auto attributes = LibGUI::Window::default_attributes;
attributes.title_bar = false;
attributes.movable = false;
attributes.focusable = false;
attributes.alpha_channel = false;
attributes.rounded_corners = false;
window->set_attributes(attributes);
auto window = MUST(LibGUI::Window::create(0, font.height() + 2 * padding, "TaskBar", attributes));
window->set_close_window_event_callback([]() {});