mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 10:01:13 +09:00
TextEditor: Increase padding in ruler width
This commit is contained in:
parent
f5aa0988f5
commit
ebab512c03
Notes:
sideshowbarker
2024-07-19 03:20:17 +09:00
Author: https://github.com/itamar8910
Commit: ebab512c03
Pull-request: https://github.com/SerenityOS/serenity/pull/3252
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue