2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 22:25:12 +00:00

codegen_style project started, basic (common) tokenizer done.

This commit is contained in:
John Preston
2016-04-16 20:51:25 +03:00
parent b61c0941ef
commit 19f9b56d2c
25 changed files with 1587 additions and 27 deletions

View File

@@ -1994,10 +1994,19 @@ namespace {
::monofont = style::font(st::normalFont->f.pixelSize(), 0, family);
}
if (!::sprite) {
QString spriteFilePostfix;
if (cRetina() || cScale() == dbisTwo) {
spriteFilePostfix = qsl("_200x");
} else if (cScale() == dbisOneAndQuarter) {
spriteFilePostfix = qsl("_125x");
} else if (cScale() == dbisOneAndHalf) {
spriteFilePostfix = qsl("_150x");
}
QString spriteFile = qsl(":/gui/art/sprite") + spriteFilePostfix + qsl(".png");
if (rtl()) {
::sprite = new QPixmap(QPixmap::fromImage(QImage(st::spriteFile).mirrored(true, false)));
::sprite = new QPixmap(QPixmap::fromImage(QImage(spriteFile).mirrored(true, false)));
} else {
::sprite = new QPixmap(st::spriteFile);
::sprite = new QPixmap(spriteFile);
}
if (cRetina()) ::sprite->setDevicePixelRatio(cRetinaFactor());
}