mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:48:12 +00:00
WindowServer: Give windows a "background color" to use for missing parts.
When resizing a window, we often end up having to paint some part of it without coverage in the current backing store. This patch makes those cases look nicer by having a fallback background color for each window, passed along with the CreateWindow client message.
This commit is contained in:
parent
30e2d62c38
commit
d4818dd2dd
9 changed files with 30 additions and 2 deletions
|
@ -38,6 +38,9 @@ public:
|
|||
String title() const;
|
||||
void set_title(const String&);
|
||||
|
||||
Color background_color() const { return m_background_color; }
|
||||
void set_background_color(Color color) { m_background_color = color; }
|
||||
|
||||
int x() const { return rect().x(); }
|
||||
int y() const { return rect().y(); }
|
||||
int width() const { return rect().width(); }
|
||||
|
@ -123,6 +126,7 @@ private:
|
|||
Vector<Rect> m_pending_paint_event_rects;
|
||||
Size m_size_increment;
|
||||
Size m_base_size;
|
||||
Color m_background_color { Color::LightGray };
|
||||
GWindowType m_window_type { GWindowType::Normal };
|
||||
bool m_is_active { false };
|
||||
bool m_should_exit_app_on_close { false };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue