1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:58:12 +00:00

GTextEditor: Fix wrong width calculations with line-wrapping enabled

There were various little mistakes in the width calculations used by
the line-wrapping layout code.

With this patch, we should no longer see the horizontal scrollbar get
enabled with line-wrapping enabled. I will hide the scrollbar in a
separate patch.
This commit is contained in:
Andreas Kling 2019-09-01 20:04:25 +02:00
parent 74ca299b4b
commit 906582d8df
2 changed files with 4 additions and 14 deletions

View file

@ -199,7 +199,6 @@ private:
StringView view() const { return { characters(), length() }; }
const char* characters() const { return m_text.data(); }
int length() const { return m_text.size() - 1; }
int width(const Font&) const;
void set_text(const StringView&);
void append(char);
void prepend(char);