replace savegame.png with scaleable savegame.svgz
This commit is contained in:
parent
fa86e8f8a7
commit
9989d9d869
6 changed files with 13 additions and 20 deletions
|
@ -51,7 +51,6 @@
|
||||||
#include <QScrollBar>
|
#include <QScrollBar>
|
||||||
#include <QClipboard>
|
#include <QClipboard>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include <QPalette>
|
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include <QRegExp>
|
#include <QRegExp>
|
||||||
#include <QAction>
|
#include <QAction>
|
||||||
|
@ -1588,7 +1587,7 @@ void ProfileInterface::contextMenuTriggeredPIC(QContextMenuEvent *ev)
|
||||||
{
|
{
|
||||||
previousWidget->setStyleSheet(QLatin1String(""));
|
previousWidget->setStyleSheet(QLatin1String(""));
|
||||||
}
|
}
|
||||||
picWidget->setStyleSheet(QString("QFrame#SnapmaticFrame{background-color: rgb(%1, %2, %3)}QLabel#labPicStr{color: rgb(%4, %5, %6)}").arg(QString::number(highlightBackColor.red()), QString::number(highlightBackColor.green()), QString::number(highlightBackColor.blue()), QString::number(highlightTextColor.red()), QString::number(highlightTextColor.green()), QString::number(highlightTextColor.blue())));
|
picWidget->setStyleSheet(QString("QFrame#SnapmaticFrame{background-color:palette(highlight)}QLabel#labPicStr{color:palette(highlighted-text)}"));
|
||||||
previousWidget = picWidget;
|
previousWidget = picWidget;
|
||||||
}
|
}
|
||||||
QMenu contextMenu(picWidget);
|
QMenu contextMenu(picWidget);
|
||||||
|
@ -1639,7 +1638,7 @@ void ProfileInterface::contextMenuTriggeredSGD(QContextMenuEvent *ev)
|
||||||
{
|
{
|
||||||
previousWidget->setStyleSheet(QLatin1String(""));
|
previousWidget->setStyleSheet(QLatin1String(""));
|
||||||
}
|
}
|
||||||
sgdWidget->setStyleSheet(QString("QFrame#SavegameFrame{background-color: rgb(%1, %2, %3)}QLabel#labSavegameStr{color: rgb(%4, %5, %6)}").arg(QString::number(highlightBackColor.red()), QString::number(highlightBackColor.green()), QString::number(highlightBackColor.blue()), QString::number(highlightTextColor.red()), QString::number(highlightTextColor.green()), QString::number(highlightTextColor.blue())));
|
sgdWidget->setStyleSheet(QString("QFrame#SavegameFrame{background-color:palette(highlight)}QLabel#labSavegameStr{color:palette(highlighted-text)}"));
|
||||||
previousWidget = sgdWidget;
|
previousWidget = sgdWidget;
|
||||||
}
|
}
|
||||||
QMenu contextMenu(sgdWidget);
|
QMenu contextMenu(sgdWidget);
|
||||||
|
@ -1757,7 +1756,7 @@ bool ProfileInterface::eventFilter(QObject *watched, QEvent *event)
|
||||||
{
|
{
|
||||||
if (pWidget != previousWidget)
|
if (pWidget != previousWidget)
|
||||||
{
|
{
|
||||||
pWidget->setStyleSheet(QString("QFrame#SnapmaticFrame{background-color: rgb(%1, %2, %3)}QLabel#labPicStr{color: rgb(%4, %5, %6)}").arg(QString::number(highlightBackColor.red()), QString::number(highlightBackColor.green()), QString::number(highlightBackColor.blue()), QString::number(highlightTextColor.red()), QString::number(highlightTextColor.green()), QString::number(highlightTextColor.blue())));
|
pWidget->setStyleSheet(QString("QFrame#SnapmaticFrame{background-color:palette(highlight)}QLabel#labPicStr{color:palette(highlighted-text)}"));
|
||||||
styleSheetChanged = true;
|
styleSheetChanged = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1765,7 +1764,7 @@ bool ProfileInterface::eventFilter(QObject *watched, QEvent *event)
|
||||||
{
|
{
|
||||||
if (pWidget != previousWidget)
|
if (pWidget != previousWidget)
|
||||||
{
|
{
|
||||||
pWidget->setStyleSheet(QString("QFrame#SavegameFrame{background-color: rgb(%1, %2, %3)}QLabel#labSavegameStr{color: rgb(%4, %5, %6)}").arg(QString::number(highlightBackColor.red()), QString::number(highlightBackColor.green()), QString::number(highlightBackColor.blue()), QString::number(highlightTextColor.red()), QString::number(highlightTextColor.green()), QString::number(highlightTextColor.blue())));
|
pWidget->setStyleSheet(QString("QFrame#SavegameFrame{background-color:palette(highlight)}QLabel#labSavegameStr{color:palette(highlighted-text)}"));
|
||||||
styleSheetChanged = true;
|
styleSheetChanged = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1802,7 +1801,7 @@ bool ProfileInterface::eventFilter(QObject *watched, QEvent *event)
|
||||||
{
|
{
|
||||||
if (pWidget != previousWidget)
|
if (pWidget != previousWidget)
|
||||||
{
|
{
|
||||||
pWidget->setStyleSheet(QString("QFrame#SnapmaticFrame{background-color: rgb(%1, %2, %3)}QLabel#labPicStr{color: rgb(%4, %5, %6)}").arg(QString::number(highlightBackColor.red()), QString::number(highlightBackColor.green()), QString::number(highlightBackColor.blue()), QString::number(highlightTextColor.red()), QString::number(highlightTextColor.green()), QString::number(highlightTextColor.blue())));
|
pWidget->setStyleSheet(QString("QFrame#SnapmaticFrame{background-color:palette(highlight)}QLabel#labPicStr{color:palette(highlighted-text)}"));
|
||||||
styleSheetChanged = true;
|
styleSheetChanged = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1810,7 +1809,7 @@ bool ProfileInterface::eventFilter(QObject *watched, QEvent *event)
|
||||||
{
|
{
|
||||||
if (pWidget != previousWidget)
|
if (pWidget != previousWidget)
|
||||||
{
|
{
|
||||||
pWidget->setStyleSheet(QString("QFrame#SavegameFrame{background-color: rgb(%1, %2, %3)}QLabel#labSavegameStr{color: rgb(%4, %5, %6)}").arg(QString::number(highlightBackColor.red()), QString::number(highlightBackColor.green()), QString::number(highlightBackColor.blue()), QString::number(highlightTextColor.red()), QString::number(highlightTextColor.green()), QString::number(highlightTextColor.blue())));
|
pWidget->setStyleSheet(QString("QFrame#SavegameFrame{background-color:palette(highlight)}QLabel#labSavegameStr{color:palette(highlighted-text)}"));
|
||||||
styleSheetChanged = true;
|
styleSheetChanged = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1878,7 +1877,7 @@ void ProfileInterface::hoverProfileWidgetCheck()
|
||||||
{
|
{
|
||||||
if (pWidget != previousWidget)
|
if (pWidget != previousWidget)
|
||||||
{
|
{
|
||||||
pWidget->setStyleSheet(QString("QFrame#SnapmaticFrame{background-color: rgb(%1, %2, %3)}QLabel#labPicStr{color: rgb(%4, %5, %6)}").arg(QString::number(highlightBackColor.red()), QString::number(highlightBackColor.green()), QString::number(highlightBackColor.blue()), QString::number(highlightTextColor.red()), QString::number(highlightTextColor.green()), QString::number(highlightTextColor.blue())));
|
pWidget->setStyleSheet(QString("QFrame#SnapmaticFrame{background-color:palette(highlight)}QLabel#labPicStr{color:palette(highlighted-text)}"));
|
||||||
styleSheetChanged = true;
|
styleSheetChanged = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1886,7 +1885,7 @@ void ProfileInterface::hoverProfileWidgetCheck()
|
||||||
{
|
{
|
||||||
if (pWidget != previousWidget)
|
if (pWidget != previousWidget)
|
||||||
{
|
{
|
||||||
pWidget->setStyleSheet(QString("QFrame#SavegameFrame{background-color: rgb(%1, %2, %3)}QLabel#labSavegameStr{color: rgb(%4, %5, %6)}").arg(QString::number(highlightBackColor.red()), QString::number(highlightBackColor.green()), QString::number(highlightBackColor.blue()), QString::number(highlightTextColor.red()), QString::number(highlightTextColor.green()), QString::number(highlightTextColor.blue())));
|
pWidget->setStyleSheet(QString("QFrame#SavegameFrame{background-color:palette(highlight)}QLabel#labSavegameStr{color:palette(highlighted-text)}"));
|
||||||
styleSheetChanged = true;
|
styleSheetChanged = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1911,20 +1910,16 @@ void ProfileInterface::hoverProfileWidgetCheck()
|
||||||
|
|
||||||
void ProfileInterface::updatePalette()
|
void ProfileInterface::updatePalette()
|
||||||
{
|
{
|
||||||
QPalette palette;
|
ui->saProfile->setStyleSheet(QString("QWidget#saProfileContent{background-color:palette(base)}"));
|
||||||
QColor baseColor = palette.base().color();
|
|
||||||
highlightBackColor = palette.highlight().color();
|
|
||||||
highlightTextColor = palette.highlightedText().color();
|
|
||||||
ui->saProfile->setStyleSheet(QString("QWidget#saProfileContent{background-color: rgb(%1, %2, %3)}").arg(QString::number(baseColor.red()), QString::number(baseColor.green()), QString::number(baseColor.blue())));
|
|
||||||
if (previousWidget != nullptr)
|
if (previousWidget != nullptr)
|
||||||
{
|
{
|
||||||
if (previousWidget->getWidgetType() == "SnapmaticWidget")
|
if (previousWidget->getWidgetType() == "SnapmaticWidget")
|
||||||
{
|
{
|
||||||
previousWidget->setStyleSheet(QString("QFrame#SnapmaticFrame{background-color: rgb(%1, %2, %3)}QLabel#labPicStr{color: rgb(%4, %5, %6)}").arg(QString::number(highlightBackColor.red()), QString::number(highlightBackColor.green()), QString::number(highlightBackColor.blue()), QString::number(highlightTextColor.red()), QString::number(highlightTextColor.green()), QString::number(highlightTextColor.blue())));
|
previousWidget->setStyleSheet(QString("QFrame#SnapmaticFrame{background-color:palette(highlight)}QLabel#labPicStr{color:palette(highlighted-text)}"));
|
||||||
}
|
}
|
||||||
else if (previousWidget->getWidgetType() == "SavegameWidget")
|
else if (previousWidget->getWidgetType() == "SavegameWidget")
|
||||||
{
|
{
|
||||||
previousWidget->setStyleSheet(QString("QFrame#SavegameFrame{background-color: rgb(%1, %2, %3)}QLabel#labSavegameStr{color: rgb(%4, %5, %6)}").arg(QString::number(highlightBackColor.red()), QString::number(highlightBackColor.green()), QString::number(highlightBackColor.blue()), QString::number(highlightTextColor.red()), QString::number(highlightTextColor.green()), QString::number(highlightTextColor.blue())));
|
previousWidget->setStyleSheet(QString("QFrame#SnapmaticFrame{background-color:palette(highlight)}QLabel#labPicStr{color:palette(highlighted-text)}"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,8 +101,6 @@ private:
|
||||||
QMap<ProfileWidget*,QString> widgets;
|
QMap<ProfileWidget*,QString> widgets;
|
||||||
QSpacerItem *saSpacerItem;
|
QSpacerItem *saSpacerItem;
|
||||||
QStringList fixedPictures;
|
QStringList fixedPictures;
|
||||||
QColor highlightBackColor;
|
|
||||||
QColor highlightTextColor;
|
|
||||||
QString enabledPicStr;
|
QString enabledPicStr;
|
||||||
QString profileFolder;
|
QString profileFolder;
|
||||||
QString profileName;
|
QString profileName;
|
||||||
|
|
|
@ -58,7 +58,7 @@ SavegameWidget::SavegameWidget(QWidget *parent) :
|
||||||
qreal screenRatio = AppEnv::screenRatio();
|
qreal screenRatio = AppEnv::screenRatio();
|
||||||
ui->labSavegamePic->setFixedSize(48 * screenRatio, 27 * screenRatio);
|
ui->labSavegamePic->setFixedSize(48 * screenRatio, 27 * screenRatio);
|
||||||
|
|
||||||
QPixmap savegamePixmap(":/img/savegame.png");
|
QPixmap savegamePixmap(":/img/savegame.svgz");
|
||||||
if (screenRatio != 1) savegamePixmap = savegamePixmap.scaledToHeight(ui->labSavegamePic->height(), Qt::SmoothTransformation);
|
if (screenRatio != 1) savegamePixmap = savegamePixmap.scaledToHeight(ui->labSavegamePic->height(), Qt::SmoothTransformation);
|
||||||
ui->labSavegamePic->setPixmap(savegamePixmap);
|
ui->labSavegamePic->setPixmap(savegamePixmap);
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
<file>pointmaker-16.png</file>
|
<file>pointmaker-16.png</file>
|
||||||
<file>pointmaker-24.png</file>
|
<file>pointmaker-24.png</file>
|
||||||
<file>pointmaker-32.png</file>
|
<file>pointmaker-32.png</file>
|
||||||
<file>savegame.png</file>
|
<file>savegame.svgz</file>
|
||||||
<file>watermark_1b.png</file>
|
<file>watermark_1b.png</file>
|
||||||
<file>watermark_2b.png</file>
|
<file>watermark_2b.png</file>
|
||||||
<file>watermark_2r.png</file>
|
<file>watermark_2r.png</file>
|
||||||
|
|
BIN
res/savegame.png
BIN
res/savegame.png
Binary file not shown.
Before Width: | Height: | Size: 1.3 KiB |
BIN
res/savegame.svgz
Normal file
BIN
res/savegame.svgz
Normal file
Binary file not shown.
Loading…
Reference in a new issue