mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 19:58:11 +00:00
LibWeb: Scale the font when painting the text on buttons
Button text was staying the same size at all zoom levels. :^)
This commit is contained in:
parent
20132da88d
commit
5146b9b35e
4 changed files with 29 additions and 18 deletions
|
@ -37,6 +37,8 @@ public:
|
|||
RefPtr<Gfx::Font const> get(FontSelector const&) const;
|
||||
void set(FontSelector const&, NonnullRefPtr<Gfx::Font const>);
|
||||
|
||||
NonnullRefPtr<Gfx::Font const> scaled_font(Gfx::Font const&, float scale_factor);
|
||||
|
||||
private:
|
||||
FontCache() = default;
|
||||
mutable HashMap<FontSelector, NonnullRefPtr<Gfx::Font const>> m_fonts;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue