summaryrefslogtreecommitdiff
path: root/Userland/Applications
diff options
context:
space:
mode:
authorJelle Raaijmakers <jelle@gmta.nl>2023-04-27 21:10:10 +0200
committerSam Atkins <atkinssj@gmail.com>2023-04-27 21:17:11 +0100
commitc7f651d5262cb116bdab4514175f204293c8fa5d (patch)
treee5a502e645341de38d933486097e9613621b86b4 /Userland/Applications
parentf99a5e10a36d23359fa34bf552ac796799818ee5 (diff)
downloadserenity-c7f651d5262cb116bdab4514175f204293c8fa5d.zip
DisplaySettings: Remove unused code from `MonitorWidget`
Diffstat (limited to 'Userland/Applications')
-rw-r--r--Userland/Applications/DisplaySettings/MonitorWidget.cpp23
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
}
}