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:
parent
9d6198b683
commit
6a19542715
3 changed files with 23 additions and 3 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue