mirror of https://gitee.com/openkylin/quarkai.git
modify defaultExecutableIcon for ukui
This commit is contained in:
parent
67fa276bda
commit
971af2debd
|
@ -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);
|
||||
|
|
|
@ -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("/")) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include <QFileInfo>
|
||||
#include <QDirIterator>
|
||||
#include <QSet>
|
||||
//#include <QPollingFileSystemWatcherEngine>
|
||||
|
||||
#include <glib.h>
|
||||
#include <sys/stat.h>
|
||||
|
@ -155,14 +156,27 @@ QFileSystemWatcher *StartupWorker::createFileSystemMonitor(const QString &path)
|
|||
connect(m_fileSystemMonitor, &QFileSystemWatcher::directoryChanged, [=] (const QString &path) {
|
||||
//qDebug()<< "directoryChanged path===================="<<path;
|
||||
QStringList fileList;
|
||||
QDirIterator dir(path, QDirIterator::Subdirectories);
|
||||
QDir dir(path);
|
||||
foreach(QFileInfo info, dir.entryInfoList()) {
|
||||
if (info.isFile() && info.suffix() == "desktop") {
|
||||
fileList.append(info.absoluteFilePath());
|
||||
}
|
||||
}
|
||||
|
||||
/*QDirIterator dir(path, QDirIterator::Subdirectories);
|
||||
while(dir.hasNext()) {
|
||||
if (dir.fileInfo().suffix() == "desktop") {
|
||||
QString desktopFile = dir.filePath();
|
||||
fileList.append(desktopFile);
|
||||
if (file.exists()) {
|
||||
}
|
||||
QFileInfo info = dir.fileInfo();
|
||||
if (info.isFile()) {
|
||||
if (info.suffix() == "desktop") {
|
||||
// if (dir.fileInfo().suffix() == "desktop") {
|
||||
QString desktopFile = dir.filePath();
|
||||
fileList.append(desktopFile);
|
||||
}
|
||||
}
|
||||
dir.next();
|
||||
}
|
||||
}*/
|
||||
|
||||
this->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)
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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()) {
|
||||
|
|
|
@ -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;}");
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -225,6 +225,7 @@
|
|||
<file>res/wave_front_small.png</file>
|
||||
<file>res/wave_back.png</file>
|
||||
<file>res/wave_back_small.png</file>
|
||||
<file>res/autostart-default.png</file>
|
||||
</qresource>
|
||||
<qresource prefix="/sys">
|
||||
<file>res/sysBtn/close_button.png</file>
|
||||
|
|
10
src/main.cpp
10
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
|
||||
|
||||
|
||||
//单程序运行处理
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue