diff --git a/applications/Photoframe/src/devicelist.cpp b/applications/Photoframe/src/devicelist.cpp index 8bbaff9..912df1a 100755 --- a/applications/Photoframe/src/devicelist.cpp +++ b/applications/Photoframe/src/devicelist.cpp @@ -20,9 +20,10 @@ DeviceList::DeviceList(QWidget *parent, const char *title, const char *iconfile) : Stage(parent) { - QLabel *icon = new QLabel(this); + QLabel* icon = new QLabel(this); icon->setObjectName("icon"); - icon->setPixmap(Image::icon(iconfile, 72)); + icon->setPixmap(Image::icon(iconfile, 256)); + icon->setScaledContents(true); icon->move(10, 10); new Text(this, 110, 20, title, 37, QColor(0,0,0)); diff --git a/applications/Photoframe/src/devicelist.cpp b/applications/Photoframe/src/devicelist.cpp index 8bbaff9..912df1a 100755 --- a/applications/Photoframe/src/devicelist.cpp +++ b/applications/Photoframe/src/devicelist.cpp @@ -20,9 +20,10 @@ DeviceList::DeviceList(QWidget *parent, const char *title, const char *iconfile) : Stage(parent) { - QLabel *icon = new QLabel(this); + QLabel* icon = new QLabel(this); icon->setObjectName("icon"); - icon->setPixmap(Image::icon(iconfile, 72)); + icon->setPixmap(Image::icon(iconfile, 256)); + icon->setScaledContents(true); icon->move(10, 10); new Text(this, 110, 20, title, 37, QColor(0,0,0)); diff --git a/applications/Photoframe/src/mainmenu.cpp b/applications/Photoframe/src/mainmenu.cpp index a16485d..c09a2b4 100755 --- a/applications/Photoframe/src/mainmenu.cpp +++ b/applications/Photoframe/src/mainmenu.cpp @@ -71,7 +71,7 @@ trans.scale(scale, scale); p.setWorldTransform(trans); p.setOpacity((20 - frame) / 20.0); - p.drawPixmap(480 * (1.0 - scale) + 160 - frame * 10, 0, a); + p.drawPixmap(380 * (1.0 - scale) + 160 - frame * 10, 0, a); p.resetTransform(); // Draw icon 'a' reflected @@ -79,7 +79,7 @@ trans.scale(scale, -scale); p.setWorldTransform(trans); p.setOpacity(0.3 * ((20 - frame) / 20.0)); - p.drawPixmap(480 * (1.0 - scale) + 160 - frame * 10, -2.0 * a.height(), a); + p.drawPixmap(380 * (1.0 - scale) + 160 - frame * 10, -2.0 * a.height(), a); p.resetTransform(); // Draw icon 'b' diff --git a/applications/Photoframe/src/devicelist.cpp b/applications/Photoframe/src/devicelist.cpp index 8bbaff9..912df1a 100755 --- a/applications/Photoframe/src/devicelist.cpp +++ b/applications/Photoframe/src/devicelist.cpp @@ -20,9 +20,10 @@ DeviceList::DeviceList(QWidget *parent, const char *title, const char *iconfile) : Stage(parent) { - QLabel *icon = new QLabel(this); + QLabel* icon = new QLabel(this); icon->setObjectName("icon"); - icon->setPixmap(Image::icon(iconfile, 72)); + icon->setPixmap(Image::icon(iconfile, 256)); + icon->setScaledContents(true); icon->move(10, 10); new Text(this, 110, 20, title, 37, QColor(0,0,0)); diff --git a/applications/Photoframe/src/mainmenu.cpp b/applications/Photoframe/src/mainmenu.cpp index a16485d..c09a2b4 100755 --- a/applications/Photoframe/src/mainmenu.cpp +++ b/applications/Photoframe/src/mainmenu.cpp @@ -71,7 +71,7 @@ trans.scale(scale, scale); p.setWorldTransform(trans); p.setOpacity((20 - frame) / 20.0); - p.drawPixmap(480 * (1.0 - scale) + 160 - frame * 10, 0, a); + p.drawPixmap(380 * (1.0 - scale) + 160 - frame * 10, 0, a); p.resetTransform(); // Draw icon 'a' reflected @@ -79,7 +79,7 @@ trans.scale(scale, -scale); p.setWorldTransform(trans); p.setOpacity(0.3 * ((20 - frame) / 20.0)); - p.drawPixmap(480 * (1.0 - scale) + 160 - frame * 10, -2.0 * a.height(), a); + p.drawPixmap(380 * (1.0 - scale) + 160 - frame * 10, -2.0 * a.height(), a); p.resetTransform(); // Draw icon 'b' diff --git a/applications/Photoframe/src/manager.cpp b/applications/Photoframe/src/manager.cpp index 84dd307..1da7590 100755 --- a/applications/Photoframe/src/manager.cpp +++ b/applications/Photoframe/src/manager.cpp @@ -1,6 +1,8 @@ #include #include #include +#include +#include #include #include "intro.h" #include "manager.h" @@ -41,14 +43,36 @@ { w->show(); w->setFocus(); + w->setWindowOpacity(0.0); + QGraphicsOpacityEffect* eff = new QGraphicsOpacityEffect(this); w->setGraphicsEffect(eff); + + QParallelAnimationGroup* group = new QParallelAnimationGroup(); + QPropertyAnimation* anim = new QPropertyAnimation(eff, "opacity"); - anim->setDuration(500); + anim->setDuration(1200); anim->setStartValue(0); anim->setEndValue(1); - anim->setEasingCurve(QEasingCurve::InBack); - anim->start(QPropertyAnimation::DeleteWhenStopped); + anim->setEasingCurve(QEasingCurve::OutBack); + group->addAnimation(anim); + + QLabel* icon = w->findChild("icon"); + if (icon) + { + icon->show(); + icon->raise(); + icon->setWindowOpacity(1.0); + + QPropertyAnimation* anim2 = new QPropertyAnimation(icon, "geometry"); + anim2->setDuration(170); + anim2->setStartValue(QRect(20, 80, 360, 360)); + anim2->setEndValue(QRect(10, 10, 72, 72)); + anim2->setEasingCurve(QEasingCurve::InExpo); + group->addAnimation(anim2); + } + + group->start(QAbstractAnimation::DeleteWhenStopped); } @@ -56,13 +80,33 @@ { QGraphicsOpacityEffect* eff = new QGraphicsOpacityEffect(this); w->setGraphicsEffect(eff); + + QParallelAnimationGroup* group = new QParallelAnimationGroup(); + QPropertyAnimation* anim = new QPropertyAnimation(eff, "opacity"); - anim->setDuration(500); + anim->setDuration(700); anim->setStartValue(1); anim->setEndValue(0); anim->setEasingCurve(QEasingCurve::OutBack); - anim->start(QPropertyAnimation::DeleteWhenStopped); - connect(anim, &QPropertyAnimation::finished, [w]() { w->hide(); }); + group->addAnimation(anim); + + QLabel* icon = w->findChild("icon"); + if (icon) + { + icon->show(); + icon->raise(); + icon->setWindowOpacity(1.0); + + QPropertyAnimation* anim2 = new QPropertyAnimation(icon, "geometry"); + anim2->setDuration(120); + anim2->setStartValue(QRect(10, 10, 72, 72)); + anim2->setEndValue(QRect(75, 145, 256, 256)); + anim2->setEasingCurve(QEasingCurve::OutExpo); + group->addAnimation(anim2); + } + + connect(group, &QAnimationGroup::finished, [w, icon]() { w->hide(); if (icon) icon->hide(); }); + group->start(QAbstractAnimation::DeleteWhenStopped); }