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

LibGUI: Preserve glyph selection when changing font

This commit is contained in:
Sam Atkins 2022-01-10 17:33:56 +00:00 committed by Andreas Kling
parent 70a79ea70c
commit 1d79e8cb0f

View file

@ -52,6 +52,7 @@ GlyphMapWidget::GlyphMapWidget()
set_focus_policy(FocusPolicy::StrongFocus);
horizontal_scrollbar().set_visible(false);
did_change_font();
set_active_glyph('A');
}
GlyphMapWidget::~GlyphMapWidget()
@ -236,7 +237,6 @@ void GlyphMapWidget::did_change_font()
{
recalculate_content_size();
vertical_scrollbar().set_step(font().glyph_height() + m_vertical_spacing);
set_active_glyph('A');
}
void GlyphMapWidget::scroll_to_glyph(int glyph)