summaryrefslogtreecommitdiff
path: root/Userland/Libraries
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2023-01-03 18:40:26 +0100
committerAndreas Kling <kling@serenityos.org>2023-01-06 12:02:20 +0100
commitb4946eac6e4adb23e4c92686edb94e18a1c3cacd (patch)
tree4c18091d6eae83c498d493c2fc742ffc83593b78 /Userland/Libraries
parent4cbdc747abbef74a3de8b05428fa5c0ca0dd09ba (diff)
downloadserenity-b4946eac6e4adb23e4c92686edb94e18a1c3cacd.zip
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.
Diffstat (limited to 'Userland/Libraries')
-rw-r--r--Userland/Libraries/LibVT/TerminalWidget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibVT/TerminalWidget.cpp b/Userland/Libraries/LibVT/TerminalWidget.cpp
index 83a337fe9a..4ef4b8f06f 100644
--- a/Userland/Libraries/LibVT/TerminalWidget.cpp
+++ b/Userland/Libraries/LibVT/TerminalWidget.cpp
@@ -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.