mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 09:49:15 +03:00
LibVT: Fix bug where terminal size got lost on font size change
When changing the font size, we now resize the terminal widget *before* setting the font. This ensures that we keep the same logical terminal size after the font change.
This commit is contained in:
parent
4cbdc747ab
commit
b4946eac6e
Notes:
sideshowbarker
2024-07-17 03:18:29 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/b4946eac6e
@ -1260,8 +1260,8 @@ constexpr Gfx::Color TerminalWidget::terminal_color_to_rgb(VT::Color color) cons
|
||||
|
||||
void TerminalWidget::set_font_and_resize_to_fit(Gfx::Font const& font)
|
||||
{
|
||||
set_font(font);
|
||||
resize(widget_size_for_font(font));
|
||||
set_font(font);
|
||||
}
|
||||
|
||||
// Used for sending data that was not directly typed by the user.
|
||||
|
Loading…
Reference in New Issue
Block a user