diff options
author | Itamar <itamar8910@gmail.com> | 2020-08-21 10:58:05 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-08-22 09:48:59 +0200 |
commit | ebab512c035cd559a2712988219deec952125831 (patch) | |
tree | d8a250504734123b6ff1420cbe8c86c2d3e67017 | |
parent | f5aa0988f5fa5dfb2f781f09bcf56abb9b6729ac (diff) | |
download | serenity-ebab512c035cd559a2712988219deec952125831.zip |
TextEditor: Increase padding in ruler width
-rw-r--r-- | Libraries/LibGUI/TextEditor.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Libraries/LibGUI/TextEditor.cpp b/Libraries/LibGUI/TextEditor.cpp index eea4173891..0317120f13 100644 --- a/Libraries/LibGUI/TextEditor.cpp +++ b/Libraries/LibGUI/TextEditor.cpp @@ -330,7 +330,8 @@ int TextEditor::ruler_width() const if (!m_ruler_visible) return 0; int line_count_digits = static_cast<int>(log10(line_count())) + 1; - return line_count() < 10 ? (line_count_digits + 1) * font().glyph_width('x') + 4 : line_count_digits * font().glyph_width('x') + 4; + constexpr size_t padding = 20; + return line_count() < 10 ? (line_count_digits + 1) * font().glyph_width('x') + padding : line_count_digits * font().glyph_width('x') + padding; } Gfx::IntRect TextEditor::ruler_content_rect(size_t line_index) const |