Best effort for pixel perfect icon rendering (#4552)

* Make sure all icons & toolbars have sizes & locations in whole number pixels, so icons won't be blurry

* Make every size even so it scales well on screen
This commit is contained in:
Noisyfox 2024-05-18 22:49:03 +08:00 committed by GitHub
parent 136313f539
commit ba3016bc3d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 22 additions and 19 deletions

View file

@ -102,10 +102,10 @@ private:
{
float scale{ 1.0f };
float icons_size{ Default_Icons_Size };
float border{ 5.0f };
float gap_y{ 5.0f };
float border{ 4.0f };
float gap_y{ 4.0f };
//BBS: GUI refactor: to support top layout
float gap_x{ 5.0f };
float gap_x{ 4.0f };
float stride_x() const { return icons_size + gap_x;}
float scaled_gap_x() const { return scale * gap_x; }
float scaled_stride_x() const { return scale * stride_x(); }