FontEditor: Keep selected glyph in view on resize

This commit is contained in:
thankyouverycool 2021-09-22 09:59:48 -04:00 committed by Andreas Kling
parent efe44451ca
commit bbaebdcd00
Notes: sideshowbarker 2024-07-18 03:33:25 +09:00

View file

@ -41,6 +41,8 @@ void GlyphMapWidget::resize_event(GUI::ResizeEvent& event)
int content_height = rows() * (font().glyph_height() + m_vertical_spacing) + frame_thickness();
set_content_size({ content_width, content_height });
scroll_to_glyph(m_selected_glyph);
AbstractScrollableWidget::resize_event(event);
}