diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-03-09 21:24:12 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-03-09 21:24:12 +0100 |
commit | ffe452231634534315321b3096dda60f329f6baa (patch) | |
tree | 2dd99055f60835a00863cae3ade82d8aab581b9b /WindowServer/WSWindowSwitcher.cpp | |
parent | b8f999cbefe3585f077aaf8f07067e5a9c61aebc (diff) | |
download | serenity-ffe452231634534315321b3096dda60f329f6baa.zip |
SharedGraphics: Allow passing a Font to text drawing functions.
This way we don't have to juggle around with calls to Painter::set_font()
which simplifies a bunch of places.
Diffstat (limited to 'WindowServer/WSWindowSwitcher.cpp')
-rw-r--r-- | WindowServer/WSWindowSwitcher.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/WindowServer/WSWindowSwitcher.cpp b/WindowServer/WSWindowSwitcher.cpp index 5c1bae7993..9882d1e69b 100644 --- a/WindowServer/WSWindowSwitcher.cpp +++ b/WindowServer/WSWindowSwitcher.cpp @@ -81,9 +81,7 @@ void WSWindowSwitcher::draw() rect_text_color = Color::DarkGray; } painter.blit(item_rect.location().translated(0, (item_rect.height() - window.icon().height()) / 2), window.icon(), window.icon().rect()); - painter.set_font(Font::default_bold_font()); - painter.draw_text(item_rect.translated(window.icon().width() + 4, 0), window.title(), TextAlignment::CenterLeft, text_color); - painter.set_font(WSWindowManager::the().font()); + 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); } } |