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

New style::icon class added, colorized icons by codegen_style.

Moved style_core to /ui/style/, Xcode and QtCreator builds are broken.
This commit is contained in:
John Preston
2016-04-21 20:57:29 +03:00
parent a133115aa6
commit 705358993d
97 changed files with 2090 additions and 1548 deletions

View File

@@ -19,15 +19,13 @@ Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
*/
#include "stdafx.h"
#include "lang.h"
#include "ui/style.h"
#include "intro/introsignup.h"
#include "ui/filedialog.h"
#include "boxes/photocropbox.h"
#include "lang.h"
#include "application.h"
#include "intro/introsignup.h"
IntroSignup::IntroSignup(IntroWidget *parent) : IntroStep(parent)
, a_errorAlpha(0)
, a_photoOver(0)
@@ -126,15 +124,15 @@ void IntroSignup::paintEvent(QPaintEvent *e) {
if (_photoSmall.isNull()) {
if (a_photoOver.current() < 1) {
QRect pix(st::setPhotoImg);
pix.moveTo(pix.x() + (pix.width() - st::introPhotoSize) / 2, pix.y() + (pix.height() - st::introPhotoSize) / 2);
pix.setSize(QSize(st::introPhotoSize, st::introPhotoSize));
QRect pix(st::setPhotoImg.rect());
pix.moveTo(pix.x() + (pix.width() - (st::introPhotoSize * cIntRetinaFactor())) / 2, pix.y() + (pix.height() - (st::introPhotoSize * cIntRetinaFactor())) / 2);
pix.setSize(QSize(st::introPhotoSize * cIntRetinaFactor(), st::introPhotoSize * cIntRetinaFactor()));
p.drawPixmap(QPoint(_phLeft, _phTop), App::sprite(), pix);
}
if (a_photoOver.current() > 0) {
QRect pix(st::setOverPhotoImg);
pix.moveTo(pix.x() + (pix.width() - st::introPhotoSize) / 2, pix.y() + (pix.height() - st::introPhotoSize) / 2);
pix.setSize(QSize(st::introPhotoSize, st::introPhotoSize));
QRect pix(st::setOverPhotoImg.rect());
pix.moveTo(pix.x() + (pix.width() - (st::introPhotoSize * cIntRetinaFactor())) / 2, pix.y() + (pix.height() - (st::introPhotoSize * cIntRetinaFactor())) / 2);
pix.setSize(QSize(st::introPhotoSize * cIntRetinaFactor(), st::introPhotoSize * cIntRetinaFactor()));
p.setOpacity(a_photoOver.current());
p.drawPixmap(QPoint(_phLeft, _phTop), App::sprite(), pix);
p.setOpacity(1);