1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:47:34 +00:00

WindowServer: Show downscaled window thumbnails in the window switcher.

This commit is contained in:
Andreas Kling 2019-05-12 04:15:25 +02:00
parent 641d55c7ef
commit 23e6c45e87
3 changed files with 38 additions and 4 deletions

View file

@ -11,6 +11,8 @@ class WSWindow;
class WSWindowSwitcher : public CObject {
public:
static WSWindowSwitcher& the();
WSWindowSwitcher();
virtual ~WSWindowSwitcher() override;
@ -22,10 +24,14 @@ public:
void on_key_event(const WSKeyEvent&);
void refresh();
void refresh_if_needed();
void draw();
int item_height() { return 20; }
int thumbnail_width() { return 40; }
int thumbnail_height() { return 40; }
int item_height() { return 10 + thumbnail_height(); }
int padding() { return 8; }
int item_padding() { return 8; }