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

DisplaySettings: Improve contrast of screen resolution label

Since we're putting this on top of the wallpaper preview, let's make
it white with a black shadow to ensure that it's always readable.
This commit is contained in:
Andreas Kling 2020-12-13 00:51:35 +01:00
parent 3ee5694e97
commit 919d3dc56f

View file

@ -106,6 +106,8 @@ void MonitorWidget::paint_event(GUI::PaintEvent& event)
painter.blit({ 0, 0 }, *m_monitor_bitmap, m_monitor_bitmap->rect());
painter.draw_scaled_bitmap(m_monitor_rect, *screen_bitmap, screen_bitmap->rect());
if (!m_desktop_resolution.is_null())
painter.draw_text(m_monitor_rect, m_desktop_resolution.to_string(), Gfx::TextAlignment::Center);
if (!m_desktop_resolution.is_null()) {
painter.draw_text(m_monitor_rect.translated(1, 1), m_desktop_resolution.to_string(), Gfx::TextAlignment::Center, Color::Black);
painter.draw_text(m_monitor_rect, m_desktop_resolution.to_string(), Gfx::TextAlignment::Center, Color::White);
}
}