diff --git a/component/kylinmenu.cpp b/component/kylinmenu.cpp index b24a924..cf944bc 100644 --- a/component/kylinmenu.cpp +++ b/component/kylinmenu.cpp @@ -116,10 +116,10 @@ void KylinMenu::createActions() help_button = new QPushButton(); feedback_button = new QPushButton(); about_button = new QPushButton(); - check_button->setStyleSheet("QPushButton{background:transparent;text-align:left;font-family: 方正黑体_GBK;font-size:14px;color:#666666;}QPushButton:hover{color:#0396DC;}"); - help_button->setStyleSheet("QPushButton{background:transparent;text-align:left;font-family: 方正黑体_GBK;font-size:14px;color:#666666;}QPushButton:hover{color:#0396DC;}"); - feedback_button->setStyleSheet("QPushButton{background:transparent;text-align:left;font-family: 方正黑体_GBK;font-size:14px;color:#666666;}QPushButton:hover{color:#0396DC;}"); - about_button->setStyleSheet("QPushButton{background:transparent;text-align:left;font-family: 方正黑体_GBK;font-size:14px;color:#666666;}QPushButton:hover{color:#0396DC;}"); + check_button->setStyleSheet("QPushButton{background:#ffffff;border:none;text-align:left;font-family: 方正黑体_GBK;font-size:14px;color:#666666;}QPushButton:hover{color:#0396DC;}");//background:transparent; + help_button->setStyleSheet("QPushButton{background:#ffffff;border:none;text-align:left;font-family: 方正黑体_GBK;font-size:14px;color:#666666;}QPushButton:hover{color:#0396DC;}");//background:transparent; + feedback_button->setStyleSheet("QPushButton{background:#ffffff;border:none;text-align:left;font-family: 方正黑体_GBK;font-size:14px;color:#666666;}QPushButton:hover{color:#0396DC;}");//background:transparent; + about_button->setStyleSheet("QPushButton{background:#ffffff;border:none;text-align:left;font-family: 方正黑体_GBK;font-size:14px;color:#666666;}QPushButton:hover{color:#0396DC;}");//background:transparent; QPixmap check_pixmap(":/tool/res/menu/upgrade.png"); check_label->setPixmap(check_pixmap); diff --git a/plugins/startupmanager/startupitem.cpp b/plugins/startupmanager/startupitem.cpp index f910447..d378fa6 100644 --- a/plugins/startupmanager/startupitem.cpp +++ b/plugins/startupmanager/startupitem.cpp @@ -28,7 +28,13 @@ inline QPixmap getAppIconPix(const QString &iconName, int iconSize) { - QIcon defaultExecutableIcon = QIcon::fromTheme("application-x-executable"); + QIcon defaultExecutableIcon = QIcon::fromTheme("application-x-executable");//gnome-mine-application-x-executable + if (defaultExecutableIcon.isNull()) { + defaultExecutableIcon = QIcon("/usr/share/icons/kylin-icon-theme/48x48/mimetypes/application-x-executable.png"); + if (defaultExecutableIcon.isNull()) + defaultExecutableIcon = QIcon(":/res/autostart-default.png"); + } + QIcon icon; if (iconName.contains("/")) { diff --git a/plugins/startupmanager/startuplistwidget.cpp b/plugins/startupmanager/startuplistwidget.cpp index c80a9d4..2187976 100644 --- a/plugins/startupmanager/startuplistwidget.cpp +++ b/plugins/startupmanager/startuplistwidget.cpp @@ -219,7 +219,16 @@ void StartupListWidget::listAllDesktopFileInDirectory(MonitorData monitorData) { monitorData.fileList.clear(); - QDirIterator dir(monitorData.dir, QDirIterator::Subdirectories); + QDir dir(monitorData.dir); + foreach(QFileInfo info, dir.entryInfoList()) { + if (info.isFile() && info.suffix() == "desktop") { + QString desktopFile = info.absoluteFilePath(); + monitorData.fileList.append(desktopFile); + m_startupWorker->newStartupInfo(desktopFile, monitorData.index); + } + } + + /*QDirIterator dir(monitorData.dir, QDirIterator::Subdirectories); while(dir.hasNext()) { if (dir.fileInfo().suffix() == "desktop") { QString desktopFile = dir.filePath();//dir.fileName().toLower() @@ -227,7 +236,7 @@ void StartupListWidget::listAllDesktopFileInDirectory(MonitorData monitorData) m_startupWorker->newStartupInfo(desktopFile, monitorData.index); } dir.next(); - } + }*/ m_startupWorker->appendMonitorXdgDirData(monitorData); } diff --git a/plugins/startupmanager/startupmanager.pro b/plugins/startupmanager/startupmanager.pro index a701aa8..cd65636 100644 --- a/plugins/startupmanager/startupmanager.pro +++ b/plugins/startupmanager/startupmanager.pro @@ -20,6 +20,8 @@ PKGCONFIG += glib-2.0 gobject-2.0 QMAKE_CXXFLAGS += -fpermissive +#DEFINES += QT_NO_INOTIFY + target.path = $${PREFIX}/lib/kylin-assistant/plugins/ INSTALLS += target diff --git a/plugins/startupmanager/startupwidget.cpp b/plugins/startupmanager/startupwidget.cpp index 437a063..73b5d25 100644 --- a/plugins/startupmanager/startupwidget.cpp +++ b/plugins/startupmanager/startupwidget.cpp @@ -87,6 +87,15 @@ StartupWidget::StartupWidget(QWidget *parent) this->setLayout(m_layout); this->moveCenter(); + + + +//#ifdef QT_NO_INOTIFY +// qDebug() << "QT_NO_INOTIFY mode"; +//#else +// qDebug() << "NO QT_NO_INOTIFY"; +//#endif + } StartupWidget::~StartupWidget() diff --git a/plugins/startupmanager/startupworker.cpp b/plugins/startupmanager/startupworker.cpp index cd4a1b3..645185c 100644 --- a/plugins/startupmanager/startupworker.cpp +++ b/plugins/startupmanager/startupworker.cpp @@ -34,6 +34,7 @@ #include #include #include +//#include #include #include @@ -155,14 +156,27 @@ QFileSystemWatcher *StartupWorker::createFileSystemMonitor(const QString &path) connect(m_fileSystemMonitor, &QFileSystemWatcher::directoryChanged, [=] (const QString &path) { //qDebug()<< "directoryChanged path===================="<updateGspXdgDir(path, fileList); }); @@ -284,6 +298,8 @@ void StartupWorker::updateGspXdgDir(const QString &dir, QStringList fileList) emit this->refreshUI(); } + else + qDebug() << "WTF........"; } QString StartupWorker::getStringValueAccordKeyFromDesktopFile(const gchar *key, const QString &desktopFile, bool isLocale) diff --git a/plugins/systemmonitor/processdialog.cpp b/plugins/systemmonitor/processdialog.cpp index 45aea9e..37b97bb 100644 --- a/plugins/systemmonitor/processdialog.cpp +++ b/plugins/systemmonitor/processdialog.cpp @@ -625,7 +625,15 @@ void ProcessDialog::refreshProcessList() QPixmap icon_pixmap; int iconSize = 24 * qApp->devicePixelRatio(); - QPixmap defaultPixmap = QIcon::fromTheme("application-x-executable").pixmap(iconSize, iconSize); + + QIcon defaultExecutableIcon = QIcon::fromTheme("application-x-executable");//gnome-mine-application-x-executable + if (defaultExecutableIcon.isNull()) { + defaultExecutableIcon = QIcon("/usr/share/icons/kylin-icon-theme/48x48/mimetypes/application-x-executable.png"); + if (defaultExecutableIcon.isNull()) + defaultExecutableIcon = QIcon(":/res/autostart-default.png"); + } + QPixmap defaultPixmap = defaultExecutableIcon.pixmap(iconSize, iconSize); +// QPixmap defaultPixmap = QIcon::fromTheme("application-x-executable").pixmap(iconSize, iconSize); if (desktopFile.size() == 0) { icon_pixmap = defaultPixmap; icon_pixmap.setDevicePixelRatio(qApp->devicePixelRatio()); diff --git a/plugins/systemmonitor/propertiesdialog.cpp b/plugins/systemmonitor/propertiesdialog.cpp index 8e11848..5f32c1a 100644 --- a/plugins/systemmonitor/propertiesdialog.cpp +++ b/plugins/systemmonitor/propertiesdialog.cpp @@ -341,7 +341,17 @@ void PropertiesDialog::initProcproperties() QPixmap icon_pixmap; int iconSize = 48 * qApp->devicePixelRatio(); - QPixmap defaultPixmap = QIcon::fromTheme("application-x-executable").pixmap(iconSize, iconSize); + + + + QIcon defaultExecutableIcon = QIcon::fromTheme("application-x-executable");//gnome-mine-application-x-executable + if (defaultExecutableIcon.isNull()) { + defaultExecutableIcon = QIcon("/usr/share/icons/kylin-icon-theme/48x48/mimetypes/application-x-executable.png"); + if (defaultExecutableIcon.isNull()) + defaultExecutableIcon = QIcon(":/res/autostart-default.png"); + } + QPixmap defaultPixmap = defaultExecutableIcon.pixmap(iconSize, iconSize); +// QPixmap defaultPixmap = QIcon::fromTheme("application-x-executable").pixmap(iconSize, iconSize); if (desktopFile.size() == 0) { icon_pixmap = defaultPixmap; icon_pixmap.setDevicePixelRatio(qApp->devicePixelRatio()); diff --git a/plugins/systemmonitor/util.cpp b/plugins/systemmonitor/util.cpp index cfe3499..56c0d41 100644 --- a/plugins/systemmonitor/util.cpp +++ b/plugins/systemmonitor/util.cpp @@ -122,7 +122,13 @@ QPixmap getAppIconFromDesktopFile(std::string desktopFile, int iconSize) { std::ifstream in; in.open(desktopFile); - QIcon defaultExecutableIcon = QIcon::fromTheme("application-x-executable"); + QIcon defaultExecutableIcon = QIcon::fromTheme("application-x-executable");//gnome-mine-application-x-executable + if (defaultExecutableIcon.isNull()) { + defaultExecutableIcon = QIcon("/usr/share/icons/kylin-icon-theme/48x48/mimetypes/application-x-executable.png"); + if (defaultExecutableIcon.isNull()) + defaultExecutableIcon = QIcon(":/res/autostart-default.png"); + } + QIcon icon; QString iconName; while(!in.eof()) { diff --git a/src/aboutdialog.cpp b/src/aboutdialog.cpp index d9d709c..aab04f2 100644 --- a/src/aboutdialog.cpp +++ b/src/aboutdialog.cpp @@ -135,8 +135,8 @@ AboutDialog::AboutDialog(QWidget *parent, /*const QString &version, */QString sk aboutBtn->setObjectName("transparentButton"); contributorBtn->setFocusPolicy(Qt::NoFocus); contributorBtn->setObjectName("transparentButton"); - aboutBtn->setStyleSheet("QPushButton{background:transparent;text-align:center;font-family: 方正黑体_GBK;font-size:14px;color:#ffffff;}");//QPushButton:hover{color:#666666;} - contributorBtn->setStyleSheet("QPushButton{background:transparent;text-align:center;font-family: 方正黑体_GBK;font-size:14px;color:#ffffff;}");//QPushButton:hover{color:#666666;} + aboutBtn->setStyleSheet("QPushButton{border:none;text-align:center;font-family: 方正黑体_GBK;font-size:14px;color:#ffffff;}");//QPushButton:hover{color:#666666;}//background:transparent; + contributorBtn->setStyleSheet("QPushButton{border:none;text-align:center;font-family: 方正黑体_GBK;font-size:14px;color:#ffffff;}");//QPushButton:hover{color:#666666;}//background:transparent; // aboutEdit->setStyleSheet("QLineEdit{border:1px solid #bebebe;}"); // contributorEdit->setStyleSheet("QLineEdit{border:1px solid #bebebe;}"); aboutEdit->setStyleSheet("QTextBrowser{border:none;font-family: 方正黑体_GBK;font-size:14px;}"); diff --git a/src/homepage.cpp b/src/homepage.cpp index 6d5c702..b636379 100644 --- a/src/homepage.cpp +++ b/src/homepage.cpp @@ -55,7 +55,7 @@ HomePage::HomePage(QWidget *parent, QString arch, QString os/*, const QString &v box_title->setFixedWidth(240); box_title->setCursor(Qt::PointingHandCursor); box_title->setFocusPolicy(Qt::NoFocus); - box_title->setStyleSheet("QPushButton{background:transparent;text-align:left;font-family: 方正黑体_GBK;font-size:24px;color:#000000;}QPushButton:hover{color:#3f96e4;}"); + box_title->setStyleSheet("QPushButton{background:#ffffff;border:none;text-align:left;font-family: 方正黑体_GBK;font-size:24px;color:#000000;}QPushButton:hover{color:#3f96e4;}");//background:transparent; // box_title->installEventFilter(this); box_tip = new QLabel(); // more_text_btn = new QPushButton(); diff --git a/src/img.qrc b/src/img.qrc index 44b6014..00e31d0 100644 --- a/src/img.qrc +++ b/src/img.qrc @@ -225,6 +225,7 @@ res/wave_front_small.png res/wave_back.png res/wave_back_small.png + res/autostart-default.png res/sysBtn/close_button.png diff --git a/src/main.cpp b/src/main.cpp index 3df9010..4c45ae4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -155,11 +155,11 @@ int main(int argc, char *argv[]) qDebug() << "debug mode"; #endif -#ifdef QT_NO_INOTIFY - qDebug() << "QT_NO_INOTIFY mode"; -#else - qDebug() << "NO QT_NO_INOTIFY"; -#endif +//#ifdef QT_NO_INOTIFY +// qDebug() << "QT_NO_INOTIFY mode"; +//#else +// qDebug() << "NO QT_NO_INOTIFY"; +//#endif //单程序运行处理 diff --git a/src/skincenter.cpp b/src/skincenter.cpp index 42a6cfe..0a37b2f 100644 --- a/src/skincenter.cpp +++ b/src/skincenter.cpp @@ -86,8 +86,8 @@ SkinCenter::SkinCenter(QWidget *parent, QString skin, QString arch, QString os) sysBtn->setObjectName("transparentButton"); customBtn->setFocusPolicy(Qt::NoFocus); customBtn->setObjectName("transparentButton"); - sysBtn->setStyleSheet("QPushButton{background:transparent;text-align:center;font-family: 方正黑体_GBK;font-size:14px;color:#ffffff;}");//QPushButton:hover{color:#666666;} - customBtn->setStyleSheet("QPushButton{background:transparent;text-align:center;font-family: 方正黑体_GBK;font-size:14px;color:#ffffff;}");//QPushButton:hover{color:#666666;} + sysBtn->setStyleSheet("QPushButton{border:none;text-align:center;font-family: 方正黑体_GBK;font-size:14px;color:#ffffff;}");//QPushButton:hover{color:#666666;} background:transparent + customBtn->setStyleSheet("QPushButton{border:none;text-align:center;font-family: 方正黑体_GBK;font-size:14px;color:#ffffff;}");//QPushButton:hover{color:#666666;} background:transparent // QVBoxLayout *layout = new QVBoxLayout(); // layout->addWidget(title_bar);