2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

box shadows and bg changed, retina shadow draw fixed

This commit is contained in:
John Preston
2015-05-22 14:14:52 +03:00
parent 8ed1961886
commit 7ca4ec1bed
16 changed files with 111 additions and 93 deletions

View File

@@ -2016,6 +2016,16 @@ namespace App {
p.drawPixmap(QPoint(x + w - cw, y + h - ch), *c[3]);
}
void roundShadow(QPainter &p, int32 x, int32 y, int32 w, int32 h, const style::color &sh, RoundCorners index) {
QPixmap **c = App::corners(index);
int32 cw = c[0]->width() / cIntRetinaFactor(), ch = c[0]->height() / cIntRetinaFactor();
p.fillRect(x + cw, y + h, w - 2 * cw, st::msgShadow, sh->b);
p.fillRect(x, y + h - ch, cw, st::msgShadow, sh->b);
p.fillRect(x + w - cw, y + h - ch, cw, st::msgShadow, sh->b);
p.drawPixmap(x, y + h - ch + st::msgShadow, *c[2]);
p.drawPixmap(x + w - cw, y + h - ch + st::msgShadow, *c[3]);
}
void initBackground(int32 id, const QImage &p, bool nowrite) {
if (Local::readBackground()) return;