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

LibGUI: Remove more header dependencies from Widget.h

This commit is contained in:
Andreas Kling 2020-02-15 00:24:14 +01:00
parent 69400c2ca1
commit e1ff4fa034
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');
}
}