1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:48:10 +00:00

FontEditor: Add adjustable scaling to GlyphEditorWidget

The editor can now be adjusted under the View->Scale menu
This commit is contained in:
thankyouverycool 2021-04-22 14:04:19 -04:00 committed by Andreas Kling
parent cc781e3d94
commit 2785e12b76
4 changed files with 48 additions and 0 deletions

View file

@ -183,3 +183,11 @@ int GlyphEditorWidget::preferred_height() const
{
return frame_thickness() * 2 + font().glyph_height() * m_scale - 1;
}
void GlyphEditorWidget::set_scale(int scale)
{
if (m_scale == scale)
return;
m_scale = clamp(scale, 1, 15);
update();
}