diff options
author | Jelle Raaijmakers <jelle@gmta.nl> | 2023-04-27 21:10:10 +0200 |
---|---|---|
committer | Sam Atkins <atkinssj@gmail.com> | 2023-04-27 21:17:11 +0100 |
commit | c7f651d5262cb116bdab4514175f204293c8fa5d (patch) | |
tree | e5a502e645341de38d933486097e9613621b86b4 /Userland/Applications | |
parent | f99a5e10a36d23359fa34bf552ac796799818ee5 (diff) | |
download | serenity-c7f651d5262cb116bdab4514175f204293c8fa5d.zip |
DisplaySettings: Remove unused code from `MonitorWidget`
Diffstat (limited to 'Userland/Applications')
-rw-r--r-- | Userland/Applications/DisplaySettings/MonitorWidget.cpp | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/Userland/Applications/DisplaySettings/MonitorWidget.cpp b/Userland/Applications/DisplaySettings/MonitorWidget.cpp index 7dd8c005a6..886750d6c4 100644 --- a/Userland/Applications/DisplaySettings/MonitorWidget.cpp +++ b/Userland/Applications/DisplaySettings/MonitorWidget.cpp @@ -10,7 +10,6 @@ #include <LibGUI/MessageBox.h> #include <LibGUI/Painter.h> #include <LibGfx/Bitmap.h> -#include <LibGfx/Font/Font.h> #include <LibThreading/BackgroundAction.h> REGISTER_WIDGET(DisplaySettings, MonitorWidget) @@ -156,28 +155,6 @@ void MonitorWidget::paint_event(GUI::PaintEvent& event) painter.blit({ 0, 0 }, *m_monitor_bitmap, m_monitor_bitmap->rect()); painter.blit(m_monitor_rect.location(), *m_desktop_bitmap, m_desktop_bitmap->rect()); - -#if 0 - if (!m_desktop_resolution.is_null()) { - auto displayed_resolution_string = Gfx::IntSize { m_desktop_resolution.width(), m_desktop_resolution.height() }.to_deprecated_string(); - - // Render text label scaled with scale factor to hint at its effect. - // FIXME: Once bitmaps have intrinsic scale factors, we could create a bitmap with an intrinsic scale factor of m_desktop_scale_factor - // and that should give us the same effect with less code. - auto text_bitmap = Gfx::Bitmap::create(Gfx::BitmapFormat::BGRA8888, Gfx::IntSize { painter.font().width(displayed_resolution_string) + 1, painter.font().pixel_size_rounded_up() + 1 }); - GUI::Painter text_painter(*text_bitmap); - text_painter.set_font(painter.font()); - - text_painter.draw_text({}, displayed_resolution_string, Gfx::TextAlignment::BottomRight, Color::Black); - text_painter.draw_text({}, displayed_resolution_string, Gfx::TextAlignment::TopLeft, Color::White); - - Gfx::IntRect text_rect = text_bitmap->rect(); - text_rect.set_width(text_rect.width() * m_desktop_scale_factor); - text_rect.set_height(text_rect.height() * m_desktop_scale_factor); - text_rect.center_within(m_monitor_rect); - painter.draw_scaled_bitmap(text_rect, *text_bitmap, text_bitmap->rect()); - } -#endif } } |