1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 14:17:36 +00:00

LibVT+Terminal: Resize terminal when font changes

When the font is changed in the Terminal application, we now resize the
terminal window to accomodate the new font.
This commit is contained in:
Andreas Kling 2021-01-09 13:46:22 +01:00
parent 9d6198b683
commit 6a19542715
3 changed files with 23 additions and 3 deletions

View file

@ -106,6 +106,8 @@ public:
GUI::Menu& context_menu() { return *m_context_menu; }
void set_font_and_resize_to_fit(const Gfx::Font&);
private:
// ^GUI::Widget
virtual void event(Core::Event&) override;
@ -138,6 +140,8 @@ private:
Gfx::IntRect glyph_rect(u16 row, u16 column);
Gfx::IntRect row_rect(u16 row);
Gfx::IntSize widget_size_for_font(const Gfx::Font&) const;
void update_cursor();
void invalidate_cursor();