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
5 changed files with 22 additions and 19 deletions
+3 -3
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(); }