diff --git a/Telegram/SourceFiles/dialogswidget.cpp b/Telegram/SourceFiles/dialogswidget.cpp index 83ac51c8b..79a521235 100644 --- a/Telegram/SourceFiles/dialogswidget.cpp +++ b/Telegram/SourceFiles/dialogswidget.cpp @@ -2201,7 +2201,7 @@ void DialogsWidget::paintEvent(QPaintEvent *e) { } if (_a_show.animating()) { if (a_coordOver.current() > 0) { - p.drawPixmap(QRect(0, 0, a_coordOver.current(), height()), _cacheUnder, QRect(-a_coordUnder.current(), 0, a_coordOver.current(), height())); + p.drawPixmap(QRect(0, 0, a_coordOver.current(), height()), _cacheUnder, QRect(-a_coordUnder.current() * cRetinaFactor(), 0, a_coordOver.current() * cRetinaFactor(), height() * cRetinaFactor())); p.setOpacity(a_shadow.current() * st::slideFadeOut); p.fillRect(0, 0, a_coordOver.current(), height(), st::black->b); p.setOpacity(1); diff --git a/Telegram/SourceFiles/gui/twidget.cpp b/Telegram/SourceFiles/gui/twidget.cpp index aaca90b7b..edd21afcd 100644 --- a/Telegram/SourceFiles/gui/twidget.cpp +++ b/Telegram/SourceFiles/gui/twidget.cpp @@ -47,9 +47,8 @@ QPixmap myGrab(TWidget *target, QRect rect) { myEnsureResized(target); if (rect.isNull()) rect = target->rect(); - qreal dpr = App::app()->devicePixelRatio(); - QPixmap result(rect.size() * dpr); - result.setDevicePixelRatio(dpr); + QPixmap result(rect.size() * cRetinaFactor()); + result.setDevicePixelRatio(cRetinaFactor()); result.fill(Qt::transparent); target->grabStart(); diff --git a/Telegram/SourceFiles/historywidget.cpp b/Telegram/SourceFiles/historywidget.cpp index 1f85e0bbc..a3bd124cf 100644 --- a/Telegram/SourceFiles/historywidget.cpp +++ b/Telegram/SourceFiles/historywidget.cpp @@ -6315,7 +6315,7 @@ void HistoryWidget::paintEvent(QPaintEvent *e) { } if (_a_show.animating()) { if (a_coordOver.current() > 0) { - p.drawPixmap(QRect(0, 0, a_coordOver.current(), height()), _cacheUnder, QRect(-a_coordUnder.current(), 0, a_coordOver.current(), height())); + p.drawPixmap(QRect(0, 0, a_coordOver.current(), height()), _cacheUnder, QRect(-a_coordUnder.current() * cRetinaFactor(), 0, a_coordOver.current() * cRetinaFactor(), height() * cRetinaFactor())); p.setOpacity(a_shadow.current() * st::slideFadeOut); p.fillRect(0, 0, a_coordOver.current(), height(), st::black->b); p.setOpacity(1); diff --git a/Telegram/SourceFiles/intro/intro.cpp b/Telegram/SourceFiles/intro/intro.cpp index 514631c73..82d54b98f 100644 --- a/Telegram/SourceFiles/intro/intro.cpp +++ b/Telegram/SourceFiles/intro/intro.cpp @@ -307,7 +307,7 @@ void IntroWidget::paintEvent(QPaintEvent *e) { p.fillRect(e->rect(), st::white->b); if (_a_show.animating()) { if (a_coordOver.current() > 0) { - p.drawPixmap(QRect(0, 0, a_coordOver.current(), height()), _cacheUnder, QRect(-a_coordUnder.current(), 0, a_coordOver.current(), height())); + p.drawPixmap(QRect(0, 0, a_coordOver.current(), height()), _cacheUnder, QRect(-a_coordUnder.current() * cRetinaFactor(), 0, a_coordOver.current() * cRetinaFactor(), height() * cRetinaFactor())); p.setOpacity(a_shadow.current() * st::slideFadeOut); p.fillRect(0, 0, a_coordOver.current(), height(), st::black->b); p.setOpacity(1); diff --git a/Telegram/SourceFiles/mainwidget.cpp b/Telegram/SourceFiles/mainwidget.cpp index b7374ff83..b769f6b6b 100644 --- a/Telegram/SourceFiles/mainwidget.cpp +++ b/Telegram/SourceFiles/mainwidget.cpp @@ -382,8 +382,8 @@ MainWidget::MainWidget(Window *window) : TWidget(window) , _started(0) , failedObjId(0) , _toForwardNameVersion(0) -, _dialogsWidth(st::dlgMinWidth) , _a_show(animFunc(this, &MainWidget::animStep_show)) +, _dialogsWidth(st::dlgMinWidth) , dialogs(this) , history(this) , profile(0) @@ -2813,7 +2813,7 @@ void MainWidget::paintEvent(QPaintEvent *e) { Painter p(this); if (_a_show.animating()) { if (a_coordOver.current() > 0) { - p.drawPixmap(QRect(0, 0, a_coordOver.current(), height()), _cacheUnder, QRect(-a_coordUnder.current(), 0, a_coordOver.current(), height())); + p.drawPixmap(QRect(0, 0, a_coordOver.current(), height()), _cacheUnder, QRect(-a_coordUnder.current() * cRetinaFactor(), 0, a_coordOver.current() * cRetinaFactor(), height() * cRetinaFactor())); p.setOpacity(a_shadow.current() * st::slideFadeOut); p.fillRect(0, 0, a_coordOver.current(), height(), st::black->b); p.setOpacity(1); diff --git a/Telegram/SourceFiles/overviewwidget.cpp b/Telegram/SourceFiles/overviewwidget.cpp index 8e0fed64c..1e6c6a7d9 100644 --- a/Telegram/SourceFiles/overviewwidget.cpp +++ b/Telegram/SourceFiles/overviewwidget.cpp @@ -2619,7 +2619,7 @@ void OverviewWidget::paintEvent(QPaintEvent *e) { Painter p(this); if (_a_show.animating()) { if (a_coordOver.current() > 0) { - p.drawPixmap(QRect(0, 0, a_coordOver.current(), height()), _cacheUnder, QRect(-a_coordUnder.current(), 0, a_coordOver.current(), height())); + p.drawPixmap(QRect(0, 0, a_coordOver.current(), height()), _cacheUnder, QRect(-a_coordUnder.current() * cRetinaFactor(), 0, a_coordOver.current() * cRetinaFactor(), height() * cRetinaFactor())); p.setOpacity(a_shadow.current() * st::slideFadeOut); p.fillRect(0, 0, a_coordOver.current(), height(), st::black->b); p.setOpacity(1); diff --git a/Telegram/SourceFiles/passcodewidget.cpp b/Telegram/SourceFiles/passcodewidget.cpp index 50cfe3f2a..f6b375dd8 100644 --- a/Telegram/SourceFiles/passcodewidget.cpp +++ b/Telegram/SourceFiles/passcodewidget.cpp @@ -184,7 +184,7 @@ void PasscodeWidget::paintEvent(QPaintEvent *e) { if (_a_show.animating()) { if (a_coordOver.current() > 0) { - p.drawPixmap(QRect(0, 0, a_coordOver.current(), height()), _cacheUnder, QRect(-a_coordUnder.current(), 0, a_coordOver.current(), height())); + p.drawPixmap(QRect(0, 0, a_coordOver.current(), height()), _cacheUnder, QRect(-a_coordUnder.current() * cRetinaFactor(), 0, a_coordOver.current() * cRetinaFactor(), height() * cRetinaFactor())); p.setOpacity(a_shadow.current() * st::slideFadeOut); p.fillRect(0, 0, a_coordOver.current(), height(), st::black->b); p.setOpacity(1); diff --git a/Telegram/SourceFiles/profilewidget.cpp b/Telegram/SourceFiles/profilewidget.cpp index f88d50641..36425cfe2 100644 --- a/Telegram/SourceFiles/profilewidget.cpp +++ b/Telegram/SourceFiles/profilewidget.cpp @@ -1577,7 +1577,7 @@ void ProfileWidget::paintEvent(QPaintEvent *e) { Painter p(this); if (_a_show.animating()) { if (a_coordOver.current() > 0) { - p.drawPixmap(QRect(0, 0, a_coordOver.current(), height()), _cacheUnder, QRect(-a_coordUnder.current(), 0, a_coordOver.current(), height())); + p.drawPixmap(QRect(0, 0, a_coordOver.current(), height()), _cacheUnder, QRect(-a_coordUnder.current() * cRetinaFactor(), 0, a_coordOver.current() * cRetinaFactor(), height() * cRetinaFactor())); p.setOpacity(a_shadow.current() * st::slideFadeOut); p.fillRect(0, 0, a_coordOver.current(), height(), st::black->b); p.setOpacity(1); diff --git a/Telegram/SourceFiles/settingswidget.cpp b/Telegram/SourceFiles/settingswidget.cpp index aab9f8525..01ea04b23 100644 --- a/Telegram/SourceFiles/settingswidget.cpp +++ b/Telegram/SourceFiles/settingswidget.cpp @@ -1829,7 +1829,7 @@ void SettingsWidget::paintEvent(QPaintEvent *e) { } if (_a_show.animating()) { if (a_coordOver.current() > 0) { - p.drawPixmap(QRect(0, 0, a_coordOver.current(), height()), _cacheUnder, QRect(-a_coordUnder.current(), 0, a_coordOver.current(), height())); + p.drawPixmap(QRect(0, 0, a_coordOver.current(), height()), _cacheUnder, QRect(-a_coordUnder.current() * cRetinaFactor(), 0, a_coordOver.current() * cRetinaFactor(), height() * cRetinaFactor())); p.setOpacity(a_shadow.current() * st::slideFadeOut); p.fillRect(0, 0, a_coordOver.current(), height(), st::black->b); p.setOpacity(1);