2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Fixed Xcode build of the new styles.

This commit is contained in:
John Preston
2016-04-21 21:18:44 +03:00
parent 705358993d
commit f93e51a934
3 changed files with 50 additions and 8 deletions

View File

@@ -156,7 +156,7 @@ void _placeCounter(QImage &img, int size, int count, style::color bg, style::col
skip = 2;
fontSize = 16;
}
style::font f(fontSize);
style::font f(fontSize, 0, 0);
int32 w = f->width(cnt), d, r;
if (size == 22) {
d = (cntSize < 2) ? 3 : 2;

View File

@@ -42,7 +42,11 @@ class Sprite {
public:
Sprite() {
}
Sprite(int left, int top, int width, int height) : _rect(rtl() ? (spriteWidth() - left - width) : left, top, width, height) {
Sprite(int left, int top, int width, int height)
: _rect(rtl() ? (spriteWidth() - left * cIntRetinaFactor() - width * cIntRetinaFactor()) : left * cIntRetinaFactor(),
top * cIntRetinaFactor(),
width * cIntRetinaFactor(),
height * cIntRetinaFactor()) {
}
int pxWidth() const {
return _rect.width() / cIntRetinaFactor();