1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:38:11 +00:00

WindowServer: Tweak window title positioning.

This commit is contained in:
Andreas Kling 2019-04-11 02:59:40 +02:00
parent ead6524c0a
commit af070324db

View file

@ -178,7 +178,8 @@ void WSWindowFrame::paint(Painter& painter)
painter.draw_rect(outer_rect, border_color);
painter.draw_rect(inner_border_rect, border_color);
painter.draw_text(titlebar_title_rect, window.title(), wm.window_title_font(), TextAlignment::CenterLeft, title_color);
// FIXME: The translated(0, 1) wouldn't be necessary if we could center text based on its baseline.
painter.draw_text(titlebar_title_rect.translated(0, 1), window.title(), wm.window_title_font(), TextAlignment::CenterLeft, title_color);
painter.blit(titlebar_icon_rect.location(), window.icon(), window.icon().rect());