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

@@ -110,12 +110,10 @@ void Terminal::run()
m_bg_color = s_colors_dark[0];
m_fg_color = s_colors_bright[7];
m_window = MUST(LibGUI::Window::create(600, 400, "Terminal"_sv));
auto attributes = LibGUI::Window::default_attributes;
attributes.alpha_channel = true;
m_window->set_attributes(attributes);
m_window = MUST(LibGUI::Window::create(600, 400, "Terminal"_sv, attributes));
m_window->fill(m_bg_color);
m_window->invalidate();