summaryrefslogtreecommitdiff
path: root/Userland/DevTools
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2023-02-19 16:14:16 +0000
committerAndreas Kling <kling@serenityos.org>2023-02-20 18:41:47 +0100
commit1a5159df734301e6c65e48e358884f9671cb2084 (patch)
tree41fc3d5bd345f9f36c8ad5a33cf507f8a84ae1a0 /Userland/DevTools
parent3676f5085e3afe545f20fb6c7c0e03f2212091ca (diff)
downloadserenity-1a5159df734301e6c65e48e358884f9671cb2084.zip
LibGUI+HackStudio: Simplify TextEditor gutter & ruler calculations
- Make gutter/ruler_content_rect() return rectangles relative to the TextEditor widget. - Re-order painting code to translate the Painter after the gutter/ruler has been painted, to use those coordinates. - Consistently put gutter before ruler in code, because that's the order they physically appear.
Diffstat (limited to 'Userland/DevTools')
-rw-r--r--Userland/DevTools/HackStudio/Editor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/DevTools/HackStudio/Editor.cpp b/Userland/DevTools/HackStudio/Editor.cpp
index fad9c322a6..6cc0a45d6f 100644
--- a/Userland/DevTools/HackStudio/Editor.cpp
+++ b/Userland/DevTools/HackStudio/Editor.cpp
@@ -121,7 +121,7 @@ void Editor::focusout_event(GUI::FocusEvent& event)
Gfx::IntRect Editor::gutter_icon_rect(size_t line_number) const
{
- return gutter_content_rect(line_number).translated(ruler_width() + gutter_width() + frame_thickness(), -vertical_scrollbar().value());
+ return gutter_content_rect(line_number).translated(frame_thickness(), 0);
}
void Editor::paint_event(GUI::PaintEvent& event)