LibGUI: Remove more header dependencies from Widget.h

This commit is contained in:
Andreas Kling 2020-02-15 00:24:14 +01:00
commit e1ff4fa034
Notes: sideshowbarker 2024-07-19 09:19:56 +09:00
12 changed files with 26 additions and 8 deletions

View file

@ -38,6 +38,7 @@
#include <LibGUI/TextEditor.h>
#include <LibGUI/Window.h>
#include <LibGfx/Bitmap.h>
#include <LibGfx/Font.h>
#include <LibGfx/Palette.h>
#include <ctype.h>
#include <fcntl.h>
@ -1500,4 +1501,14 @@ void TextEditor::set_syntax_highlighter(OwnPtr<SyntaxHighlighter> highlighter)
}
}
int TextEditor::line_height() const
{
return font().glyph_height() + m_line_spacing;
}
int TextEditor::glyph_width() const
{
return font().glyph_width('x');
}
}