1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:07:35 +00:00

LibGUI: Improve visible glyph estimate in GlyphMapWidget

Previously the widget used a very rough estimate for visible glyphs
based on viewport and glyph areas. Now it simply figures rows times
columns with a two row overdraw to accommodate fractional glyphs
on either end of visible content. For KaticaRegular10, this ends up
reducing unnecessary glyph iterations during painting by about 30%.
This commit is contained in:
thankyouverycool 2022-12-15 17:16:36 -05:00 committed by Andreas Kling
parent e34503800c
commit a98d5c52f8
2 changed files with 10 additions and 6 deletions

View file

@ -100,6 +100,7 @@ private:
int m_glyph_count { 0x110000 };
int m_columns { 0 };
int m_rows { 0 };
int m_visible_rows { 0 };
int m_horizontal_spacing { 4 };
int m_vertical_spacing { 4 };
Selection m_selection;