summaryrefslogtreecommitdiff
path: root/Servers/WindowServer
diff options
context:
space:
mode:
Diffstat (limited to 'Servers/WindowServer')
-rw-r--r--Servers/WindowServer/WSWindowSwitcher.cpp3
-rw-r--r--Servers/WindowServer/WSWindowSwitcher.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/Servers/WindowServer/WSWindowSwitcher.cpp b/Servers/WindowServer/WSWindowSwitcher.cpp
index 395bb77279..1ed206d9d8 100644
--- a/Servers/WindowServer/WSWindowSwitcher.cpp
+++ b/Servers/WindowServer/WSWindowSwitcher.cpp
@@ -79,6 +79,7 @@ void WSWindowSwitcher::draw()
text_color = Color::Black;
rect_text_color = Color::MidGray;
}
+ item_rect.shrink(item_padding(), 0);
painter.blit(item_rect.location().translated(0, (item_rect.height() - window.icon().height()) / 2), window.icon(), window.icon().rect());
painter.draw_text(item_rect.translated(window.icon().width() + 4, 0), window.title(), WSWindowManager::the().window_title_font(), TextAlignment::CenterLeft, text_color);
painter.draw_text(item_rect, window.rect().to_string(), TextAlignment::CenterRight, rect_text_color);
@@ -107,7 +108,7 @@ void WSWindowSwitcher::refresh()
return;
}
int space_for_window_rect = 180;
- m_rect.set_width(longest_title_width + space_for_window_rect + padding() * 2);
+ m_rect.set_width(longest_title_width + space_for_window_rect + padding() * 2 + item_padding() * 2);
m_rect.set_height(window_count * item_height() + padding() * 2);
m_rect.center_within(WSWindowManager::the().m_screen_rect);
if (!m_switcher_window)
diff --git a/Servers/WindowServer/WSWindowSwitcher.h b/Servers/WindowServer/WSWindowSwitcher.h
index e2c8fcb1bf..1702513085 100644
--- a/Servers/WindowServer/WSWindowSwitcher.h
+++ b/Servers/WindowServer/WSWindowSwitcher.h
@@ -27,6 +27,7 @@ public:
int item_height() { return 20; }
int padding() { return 8; }
+ int item_padding() { return 8; }
WSWindow* selected_window();