1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-12 02:30:30 +09: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
Notes: sideshowbarker 2024-07-17 20:46:26 +09:00

View file

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