diff --git a/debian/control b/debian/control index d93106f..5b2d9c7 100644 --- a/debian/control +++ b/debian/control @@ -18,13 +18,12 @@ Build-Depends: debhelper (>= 9), libx11-dev, libqt5x11extras5-dev, libgsettings-qt-dev, - libqt5svg5-dev, Standards-Version: 3.9.5 Homepage: http://kylinos.cn Package: yhkylin-backup-tools Architecture: any -Depends: ${misc:Depends},${shlibs:Depends},libqt5widgets5,libqt5gui5,libqt5dbus5,libqt5xml5,libqt5core5a,libblkid1,rsync,squashfs-tools, libkysec, libgsettings-qt-dev,libqt5svg5-dev +Depends: ${misc:Depends},${shlibs:Depends},libqt5widgets5,libqt5gui5,libqt5dbus5,libqt5xml5,libqt5core5a,libblkid1,rsync,squashfs-tools, libkysec, libgsettings-qt-dev Description: YHkylin backup tools YHkylin backup tools diff --git a/kybackup/component/myiconbutton.cpp b/kybackup/component/myiconbutton.cpp index 21c3670..924f780 100755 --- a/kybackup/component/myiconbutton.cpp +++ b/kybackup/component/myiconbutton.cpp @@ -4,7 +4,7 @@ #include #include #include -#include "imageutil.h" +// #include "imageutil.h" #include "../gsettingswrapper.h" MyIconButton::MyIconButton(QWidget *parent) : @@ -57,27 +57,28 @@ void MyIconButton::changePalette(bool checked) { m_iconButton->setChecked(checked); QPalette pal = m_textLabel->palette(); - QIcon icon = QIcon::fromTheme(m_themeIconName, QIcon(m_defaultIconName)); - QPixmap pix; + // svg格式的图标会自动跟随主题,不需再手动设置像素颜色 +// QIcon icon = QIcon::fromTheme(m_themeIconName, QIcon(m_defaultIconName)); +// QPixmap pix; if (g_GSettingWrapper.isDarkTheme()) { if (checked) { pal.setColor(QPalette::ButtonText, this->palette().highlightedText().color()); - pix = ImageUtil::loadPixmap(icon, QString("black")); +// pix = ImageUtil::loadPixmap(icon, QString("black")); } else { pal.setColor(QPalette::ButtonText, this->palette().windowText().color()); - pix = ImageUtil::loadPixmap(icon, QString("white")); +// pix = ImageUtil::loadPixmap(icon, QString("white")); } } else { if (checked) { pal.setColor(QPalette::ButtonText, this->palette().highlightedText().color()); - pix = ImageUtil::loadPixmap(icon, QString("white")); +// pix = ImageUtil::loadPixmap(icon, QString("white")); } else { pal.setColor(QPalette::ButtonText, this->palette().windowText().color()); - pix = ImageUtil::loadPixmap(icon, QString("black")); +// pix = ImageUtil::loadPixmap(icon, QString("black")); } } m_textLabel->setPalette(pal); - m_iconButton->setIcon(pix); + //m_iconButton->setIcon(pix); } void MyIconButton::paintEvent(QPaintEvent *event) diff --git a/kybackup/component/myiconlabel.cpp b/kybackup/component/myiconlabel.cpp index 2500cb3..7e202cf 100755 --- a/kybackup/component/myiconlabel.cpp +++ b/kybackup/component/myiconlabel.cpp @@ -2,7 +2,6 @@ #include #include #include -#include "imageutil.h" #include "circlelabel.h" MyIconLabel::MyIconLabel(QWidget *parent /*= nullptr*/) : @@ -39,8 +38,7 @@ void MyIconLabel::setThemeIcon(const QString &themeIconName, const QString &defa m_defaultIconName = defaultIconName; QIcon icon = QIcon::fromTheme(themeIconName, QIcon(defaultIconName)); - // m_iconLabel->setPixmap(icon.pixmap(QSize(24,24))); - m_iconLabel->setPixmap(ImageUtil::loadPixmap(icon, QString("default"))); + m_iconLabel->setPixmap(icon.pixmap(QSize(24,24))); } void MyIconLabel::setDesplayText(const QString &text) @@ -56,18 +54,3 @@ void MyIconLabel::setDesplayText(const QString &text) } } -//void MyIconLabel::changePalette(bool dark) -//{ -// QPalette pal(m_textLabel->palette()); -// QIcon icon = QIcon::fromTheme(m_themeIconName, QIcon(m_defaultIconName)); -// QPixmap pix; -// if (dark) { -// pal.setColor(QPalette::WindowText, pal.color(QPalette::HighlightedText)); -// pix = ImageUtil::loadPixmap(icon, QString("white")); -// } else { -// pal.setColor(QPalette::WindowText, this->palette().color(QPalette::WindowText)); -// pix = ImageUtil::loadPixmap(icon, QString("default")); -// } -// m_textLabel->setPalette(pal); -// m_iconLabel->setPixmap(pix); -//} diff --git a/kybackup/kybackup.pro b/kybackup/kybackup.pro index 0f4e713..2a89fa5 100755 --- a/kybackup/kybackup.pro +++ b/kybackup/kybackup.pro @@ -1,4 +1,4 @@ -QT += core gui svg +QT += core gui QT += dbus xml QT += network @@ -42,7 +42,7 @@ HEADERS += \ component/circlelabel.h \ component/clicklabel.h \ component/hoverwidget.h \ - component/imageutil.h \ +# component/imageutil.h \ component/linelabel.h \ component/mycheckbox.h \ component/myfileselect.h \ @@ -87,7 +87,7 @@ SOURCES += \ component/circlelabel.cpp \ component/clicklabel.cpp \ component/hoverwidget.cpp \ - component/imageutil.cpp \ +# component/imageutil.cpp \ component/linelabel.cpp \ component/mycheckbox.cpp \ component/myfileselect.cpp \