!74 fix icon error

Merge pull request !74 from likehomedream/plymouthshow
This commit is contained in:
KevinDuan 2023-12-11 03:11:38 +00:00 committed by Gitee
commit bc1874b910
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
6 changed files with 13 additions and 12 deletions

View File

@ -15,6 +15,7 @@ public:
explicit FileCheck(QObject *parent = nullptr);
static bool isLegalIconFile(const QString& filePath);
static bool isLegalWallPaperFile(const QString& filePath, const QString& type);
static bool isLegalMP4File(const QString& filePath, const QString& type);
signals:

View File

@ -138,7 +138,7 @@ void MainInterface::init()
FileProcess getInfo;
info->getFileInfo(getInfo.FileSearch(FileProcess::g_date));
info->show();
connect(info,&InfoCreateWidget::readytoBuild,this,&MainInterface::startCopy);
// connect(info,&InfoCreateWidget::readytoBuild,this,&MainInterface::startCopy);
connect(info,&InfoCreateWidget::gohomesignals,this,[=](){
//发送返回主界面信号给mainwindow
emit gohomesignals();

View File

@ -3,7 +3,7 @@
AboutDialog::AboutDialog(QWidget *parent) :
kdk::KAboutDialog(parent)
{
this->setAppIcon(QIcon::fromTheme("fretsonfire"));
this->setAppIcon(QIcon::fromTheme("kylin-theme-builder"));
this->setAppName(tr("Kylin Theme Builder"));
this->setAppVersion(this->getCurrentVersion());
this->setBodyText(tr(""));

View File

@ -1,4 +1,4 @@
#include "globalthemewidget.h"
#include "globalthemewidget.h"
#include "../fileProcess/filecheck.h"
bool GlobalThemeWidget::g_themeChange;
@ -231,7 +231,7 @@ void GlobalThemeWidget::initWallPaperWidget()
wallpaperbtn = new EditButton(cover);
wallpaperbtn->setFixedSize(160,100);
QLabel *tip = new QLabel(cover);
tip->setText("<html>尺寸3840*2160<br>大小:不超过 10 MB<br>格式PNG</html>");
tip->setText("<html>尺寸3840*2160<br>大小:不超过 10 MB<br>格式PNG\/JPG</html>");
coverlayout->addWidget(wallpaperbtn);
coverlayout->addWidget(tip);

View File

@ -20,13 +20,13 @@ void TypeButton::paintEvent(QPaintEvent *event)
{
QPushButton::paintEvent(event);
if (isChecked()) {
QPainter painter(this);
QIcon icon = QIcon::fromTheme("kylin-settings-account");
QPixmap pixmap = icon.pixmap(QSize(16, 16));
QRect pixmapRect(rect().right() - pixmap.width(), (rect().height() - pixmap.height()) / 2, pixmap.width(), pixmap.height());
painter.drawPixmap(pixmapRect, pixmap);
}
// if (isChecked()) {
// QPainter painter(this);
// QIcon icon = QIcon::fromTheme("");
// QPixmap pixmap = icon.pixmap(QSize(16, 16));
// QRect pixmapRect(rect().right() - pixmap.width(), (rect().height() - pixmap.height()) / 2, pixmap.width(), pixmap.height());
// painter.drawPixmap(pixmapRect, pixmap);
// }
}
/**

View File

@ -19,7 +19,7 @@ TitleBar::TitleBar(QWidget *parent) : QWidget(parent)
QLabel *iconlabel = new QLabel(this);
iconlabel->setFixedSize(30, 30);
QIcon icon = QIcon::fromTheme("viewnior");
QIcon icon = QIcon::fromTheme("kylin-theme-builder");
QIcon scaledIcon = icon.pixmap(QSize(30, 30)).scaled(QSize(30, 30), Qt::KeepAspectRatio, Qt::SmoothTransformation);
QPixmap pixmap = scaledIcon.pixmap(QSize(30, 30));
iconlabel->setPixmap(pixmap);