mirror of
https://github.com/Qz3rK/tdesktop.git
synced 2026-07-03 14:15:08 +02:00
Fixed sprite generation for 125% and 150% interface scales.
This commit is contained in:
@@ -75,7 +75,10 @@ inline bool operator!=(const Type &a, const Type &b) {
|
||||
namespace data {
|
||||
|
||||
inline int pxAdjust(int value, int scale) {
|
||||
return qRound((value * scale / 4.) + (value > 0 ? -0.01 : 0.01));
|
||||
if (value < 0) {
|
||||
return -pxAdjust(-value, scale);
|
||||
}
|
||||
return static_cast<int>(std::floor((value * scale / 4.) + 0.1));
|
||||
}
|
||||
|
||||
struct point {
|
||||
|
||||
Reference in New Issue
Block a user