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:
parent
cc781e3d94
commit
2785e12b76
4 changed files with 48 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue