!47 update new version 3.1.1
From: @peijiankang Reviewed-by: @dou33 Signed-off-by: @dou33
This commit is contained in:
commit
9e354ebc7f
3809
0001-4-wayland.patch
Normal file
3809
0001-4-wayland.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,19 +1,18 @@
|
||||
From e523ae71ada3db531df88679d25fb64580fd6678 Mon Sep 17 00:00:00 2001
|
||||
From: pei-jiankang <peijiankang@kylinos.cn>
|
||||
Date: Tue, 29 Mar 2022 17:29:46 +0800
|
||||
From b8df82788c21c4e768b55e9a09f6d61f44febd5f Mon Sep 17 00:00:00 2001
|
||||
From: peijiankang <peijiankang@kylinos.cn>
|
||||
Date: Wed, 1 Feb 2023 12:44:20 +0800
|
||||
Subject: [PATCH] fix uninstall failed issue
|
||||
|
||||
---
|
||||
src/RightClickMenu/rightclickmenu.cpp | 66 ++++++++++++++--------
|
||||
src/RightClickMenu/rightclickmenu.h | 4 ++
|
||||
translations/ukui-menu_zh_CN.ts | 79 ++++++++++++++++-----------
|
||||
3 files changed, 94 insertions(+), 55 deletions(-)
|
||||
.../RightClickMenu/rightclickmenu.cpp | 50 +++++++++-
|
||||
.../RightClickMenu/rightclickmenu.h | 6 ++
|
||||
3 files changed, 51 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/RightClickMenu/rightclickmenu.cpp b/src/RightClickMenu/rightclickmenu.cpp
|
||||
index 2e86f6f..a3af856 100644
|
||||
--- a/src/RightClickMenu/rightclickmenu.cpp
|
||||
+++ b/src/RightClickMenu/rightclickmenu.cpp
|
||||
@@ -19,11 +19,14 @@
|
||||
diff --git a/src/UserInterface/RightClickMenu/rightclickmenu.cpp b/src/UserInterface/RightClickMenu/rightclickmenu.cpp
|
||||
index 45f7b46..40d58e0 100755
|
||||
--- a/src/UserInterface/RightClickMenu/rightclickmenu.cpp
|
||||
+++ b/src/UserInterface/RightClickMenu/rightclickmenu.cpp
|
||||
@@ -19,11 +19,15 @@
|
||||
#include "rightclickmenu.h"
|
||||
#include "src/UtilityFunction/utility.h"
|
||||
#include <QDebug>
|
||||
@ -23,70 +22,53 @@ index 2e86f6f..a3af856 100644
|
||||
RightClickMenu::RightClickMenu(QWidget *parent):
|
||||
QWidget(parent)
|
||||
{
|
||||
m_cmdProc=new QProcess;
|
||||
m_cmdProc = new QProcess;
|
||||
+ connect(m_cmdProc , &QProcess::readyReadStandardOutput, this , &RightClickMenu::onReadOutput);
|
||||
|
||||
+
|
||||
m_whiteList.append("kylin-screenshot.desktop");
|
||||
m_whiteList.append("ukui-notebook.desktop");
|
||||
@@ -138,32 +141,49 @@ void RightClickMenu::addToDesktopActionTriggerSlot()
|
||||
m_whiteList.append("ukui-clock.desktop");
|
||||
@@ -141,14 +145,50 @@ void RightClickMenu::addToDesktopActionTriggerSlot()
|
||||
|
||||
void RightClickMenu::uninstallActionTriggerSlot()
|
||||
{
|
||||
-// if(!checkOsRelease())
|
||||
-// {
|
||||
- QString cmd=QString("kylin-uninstaller %1")
|
||||
- .arg(m_desktopfp.toLocal8Bit().data());
|
||||
- bool ret=QProcess::startDetached(cmd);
|
||||
- qDebug()<<"卸载:"<<cmd<<ret;
|
||||
- qDebug() << "kylin-uninstaller";
|
||||
-
|
||||
-// }
|
||||
-// else
|
||||
-// {
|
||||
-// QString cmd=QString("dpkg -S "+m_desktopfp);
|
||||
-// m_cmdProc->start("sh",QStringList()<<"-c"<<cmd);
|
||||
-// m_cmdProc->waitForFinished();
|
||||
-// QString output=m_cmdProc->readAllStandardOutput().trimmed();
|
||||
-// QString packageName=output.split(":").at(0);
|
||||
-// cmd.clear();
|
||||
-// cmd=QString("kylin-installer -remove %1")
|
||||
-// .arg(packageName.toLocal8Bit().data());
|
||||
-// bool ret=QProcess::startDetached(cmd);
|
||||
-// qDebug()<<"卸载:"<<cmd<<ret;
|
||||
-// qDebug() << "dpkg -S";
|
||||
-// }
|
||||
- QString cmd = QString("kylin-uninstaller %1")
|
||||
- .arg(m_desktopfp.toLocal8Bit().data());
|
||||
- bool ret = QProcess::startDetached(cmd);
|
||||
- myDebug() << "卸载:" << cmd << ret;
|
||||
- myDebug() << "kylin-uninstaller";
|
||||
+ QString cmd=QString("rpm -qf "+m_desktopfp);
|
||||
+ m_cmdProc->setReadChannel(QProcess::StandardOutput);
|
||||
+ m_cmdProc->start("sh",QStringList()<<"-c"<<cmd);
|
||||
+ m_cmdProc->waitForFinished();
|
||||
+ m_cmdProc->waitForReadyRead();
|
||||
+ m_cmdProc->close();
|
||||
m_actionNumber=6;
|
||||
m_actionNumber = 6;
|
||||
}
|
||||
|
||||
+void RightClickMenu::onReadOutput()
|
||||
+{
|
||||
+ QString packagestr=QString::fromLocal8Bit(m_cmdProc->readAllStandardOutput().data());
|
||||
+ QString packageName=packagestr.split(":").at(0);
|
||||
+
|
||||
+
|
||||
+ packageName = packageName.trimmed();
|
||||
+ QProcess tempProcess;
|
||||
+ QString cmd = QString("pkexec rpm -e %1").arg(packageName);
|
||||
+ tempProcess.start(cmd);
|
||||
+ tempProcess.waitForFinished();
|
||||
+
|
||||
+
|
||||
+ QString errorInfo1 = tempProcess.readAllStandardError().data();
|
||||
+ QString result1 = tempProcess.readAllStandardOutput().data();
|
||||
+ //check uninstall
|
||||
+ cmd = QString("rpm -qa");
|
||||
+ tempProcess.start(cmd);
|
||||
+ tempProcess.waitForFinished();
|
||||
+
|
||||
+
|
||||
+ QString errorInfo2 = tempProcess.readAllStandardError().data();
|
||||
+ QString result2 = tempProcess.readAllStandardOutput().data();
|
||||
+ bool bFail = false;
|
||||
+ bFail= result2.contains(packageName);
|
||||
+
|
||||
+ bFail= result2.contains(packageName);
|
||||
+
|
||||
+ if(!bFail)
|
||||
+ {
|
||||
+ QMessageBox::information(this,tr("infomation"),tr("Uninstall finished!"));
|
||||
@ -97,257 +79,28 @@ index 2e86f6f..a3af856 100644
|
||||
+ QKeyEvent event(QEvent::KeyPress, Qt::Key_Menu,Qt::NoModifier);
|
||||
+ QCoreApplication::sendEvent(this->parent(),&event);
|
||||
+}
|
||||
+
|
||||
+
|
||||
void RightClickMenu::attributeActionTriggerSlot()
|
||||
{
|
||||
char command[100];
|
||||
diff --git a/src/RightClickMenu/rightclickmenu.h b/src/RightClickMenu/rightclickmenu.h
|
||||
index 5760972..f2bed42 100644
|
||||
--- a/src/RightClickMenu/rightclickmenu.h
|
||||
+++ b/src/RightClickMenu/rightclickmenu.h
|
||||
@@ -144,6 +144,10 @@ private Q_SLOTS:
|
||||
* @brief Personalize this list
|
||||
diff --git a/src/UserInterface/RightClickMenu/rightclickmenu.h b/src/UserInterface/RightClickMenu/rightclickmenu.h
|
||||
index a96c65d..bba9cf1 100755
|
||||
--- a/src/UserInterface/RightClickMenu/rightclickmenu.h
|
||||
+++ b/src/UserInterface/RightClickMenu/rightclickmenu.h
|
||||
@@ -117,6 +117,12 @@ private Q_SLOTS:
|
||||
* @brief Uninstall
|
||||
*/
|
||||
void otherListActionTriggerSlot();
|
||||
void uninstallActionTriggerSlot();
|
||||
+
|
||||
+ /**
|
||||
+ * @brief Read command output
|
||||
+ */
|
||||
+ void onReadOutput();
|
||||
|
||||
public:
|
||||
Q_SIGNALS:
|
||||
diff --git a/translations/ukui-menu_zh_CN.ts b/translations/ukui-menu_zh_CN.ts
|
||||
index f4c522a..5737288 100644
|
||||
--- a/translations/ukui-menu_zh_CN.ts
|
||||
+++ b/translations/ukui-menu_zh_CN.ts
|
||||
@@ -62,57 +62,57 @@
|
||||
<context>
|
||||
<name>FunctionWidget</name>
|
||||
<message>
|
||||
- <location filename="../src/FunctionWidget/functionwidget.cpp" line="87"/>
|
||||
+ <location filename="../src/FunctionWidget/functionwidget.cpp" line="88"/>
|
||||
<source>Mobile</source>
|
||||
<translation>移动</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/FunctionWidget/functionwidget.cpp" line="93"/>
|
||||
+ <location filename="../src/FunctionWidget/functionwidget.cpp" line="94"/>
|
||||
<source>Internet</source>
|
||||
<translation>网络</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/FunctionWidget/functionwidget.cpp" line="99"/>
|
||||
+ <location filename="../src/FunctionWidget/functionwidget.cpp" line="100"/>
|
||||
<source>Social</source>
|
||||
<translation>社交</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/FunctionWidget/functionwidget.cpp" line="105"/>
|
||||
+ <location filename="../src/FunctionWidget/functionwidget.cpp" line="106"/>
|
||||
<source>Video</source>
|
||||
<translation>影音</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/FunctionWidget/functionwidget.cpp" line="111"/>
|
||||
+ <location filename="../src/FunctionWidget/functionwidget.cpp" line="112"/>
|
||||
<source>Development</source>
|
||||
<translation>开发</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/FunctionWidget/functionwidget.cpp" line="117"/>
|
||||
+ <location filename="../src/FunctionWidget/functionwidget.cpp" line="118"/>
|
||||
<source>Image</source>
|
||||
<translation>图像</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/FunctionWidget/functionwidget.cpp" line="123"/>
|
||||
+ <location filename="../src/FunctionWidget/functionwidget.cpp" line="124"/>
|
||||
<source>Game</source>
|
||||
<translation>游戏</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/FunctionWidget/functionwidget.cpp" line="129"/>
|
||||
+ <location filename="../src/FunctionWidget/functionwidget.cpp" line="130"/>
|
||||
<source>Office</source>
|
||||
<translation>办公</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/FunctionWidget/functionwidget.cpp" line="135"/>
|
||||
+ <location filename="../src/FunctionWidget/functionwidget.cpp" line="136"/>
|
||||
<source>Education</source>
|
||||
<translation>教育</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/FunctionWidget/functionwidget.cpp" line="142"/>
|
||||
+ <location filename="../src/FunctionWidget/functionwidget.cpp" line="143"/>
|
||||
<source>System</source>
|
||||
<translation>系统</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/FunctionWidget/functionwidget.cpp" line="148"/>
|
||||
+ <location filename="../src/FunctionWidget/functionwidget.cpp" line="149"/>
|
||||
<source>Others</source>
|
||||
<translation>其它</translation>
|
||||
</message>
|
||||
@@ -120,7 +120,7 @@
|
||||
<context>
|
||||
<name>MainViewWidget</name>
|
||||
<message>
|
||||
- <location filename="../src/MainViewWidget/mainviewwidget.cpp" line="226"/>
|
||||
+ <location filename="../src/MainViewWidget/mainviewwidget.cpp" line="256"/>
|
||||
<source>Search</source>
|
||||
<translation>搜索</translation>
|
||||
</message>
|
||||
@@ -175,32 +175,47 @@
|
||||
<context>
|
||||
<name>RightClickMenu</name>
|
||||
<message>
|
||||
- <location filename="../src/RightClickMenu/rightclickmenu.cpp" line="216"/>
|
||||
+ <location filename="../src/RightClickMenu/rightclickmenu.cpp" line="176"/>
|
||||
+ <source>infomation</source>
|
||||
+ <translation>提示</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/RightClickMenu/rightclickmenu.cpp" line="176"/>
|
||||
+ <source>Uninstall finished!</source>
|
||||
+ <translation>卸载成功!</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/RightClickMenu/rightclickmenu.cpp" line="179"/>
|
||||
+ <source>error</source>
|
||||
+ <translation>错误</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/RightClickMenu/rightclickmenu.cpp" line="247"/>
|
||||
<source>Pin to all</source>
|
||||
<translation>固定到“所有软件”</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/RightClickMenu/rightclickmenu.cpp" line="219"/>
|
||||
+ <location filename="../src/RightClickMenu/rightclickmenu.cpp" line="250"/>
|
||||
<source>Unpin from all</source>
|
||||
<translation>从“所有软件”取消固定</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/RightClickMenu/rightclickmenu.cpp" line="228"/>
|
||||
+ <location filename="../src/RightClickMenu/rightclickmenu.cpp" line="259"/>
|
||||
<source>Pin to taskbar</source>
|
||||
<translation>固定到任务栏</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/RightClickMenu/rightclickmenu.cpp" line="231"/>
|
||||
+ <location filename="../src/RightClickMenu/rightclickmenu.cpp" line="262"/>
|
||||
<source>Unpin from taskbar</source>
|
||||
<translation>从任务栏取消固定</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/RightClickMenu/rightclickmenu.cpp" line="234"/>
|
||||
+ <location filename="../src/RightClickMenu/rightclickmenu.cpp" line="265"/>
|
||||
<source>Add to desktop shortcuts</source>
|
||||
<translation>添加到桌面快捷方式</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/RightClickMenu/rightclickmenu.cpp" line="245"/>
|
||||
+ <location filename="../src/RightClickMenu/rightclickmenu.cpp" line="274"/>
|
||||
<source>Uninstall</source>
|
||||
<translation>卸载</translation>
|
||||
</message>
|
||||
@@ -209,7 +224,7 @@
|
||||
<translation type="vanished">休眠</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/RightClickMenu/rightclickmenu.cpp" line="259"/>
|
||||
+ <location filename="../src/RightClickMenu/rightclickmenu.cpp" line="291"/>
|
||||
<source>Sleep</source>
|
||||
<translation>睡眠</translation>
|
||||
</message>
|
||||
@@ -222,22 +237,22 @@
|
||||
<translation type="vanished">切换用户</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/RightClickMenu/rightclickmenu.cpp" line="261"/>
|
||||
+ <location filename="../src/RightClickMenu/rightclickmenu.cpp" line="293"/>
|
||||
<source>Log Out</source>
|
||||
<translation>注销</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/RightClickMenu/rightclickmenu.cpp" line="263"/>
|
||||
+ <location filename="../src/RightClickMenu/rightclickmenu.cpp" line="295"/>
|
||||
<source>Restart</source>
|
||||
<translation>重启</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/RightClickMenu/rightclickmenu.cpp" line="265"/>
|
||||
+ <location filename="../src/RightClickMenu/rightclickmenu.cpp" line="297"/>
|
||||
<source>Power Off</source>
|
||||
<translation>关机</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/RightClickMenu/rightclickmenu.cpp" line="292"/>
|
||||
+ <location filename="../src/RightClickMenu/rightclickmenu.cpp" line="327"/>
|
||||
<source>Personalize this list</source>
|
||||
<translation>设置开始菜单显示列表</translation>
|
||||
</message>
|
||||
@@ -245,42 +260,42 @@
|
||||
<context>
|
||||
<name>SideBarWidget</name>
|
||||
<message>
|
||||
- <location filename="../src/SideBarWidget/sidebarwidget.cpp" line="95"/>
|
||||
+ <location filename="../src/SideBarWidget/sidebarwidget.cpp" line="143"/>
|
||||
<source>All</source>
|
||||
<translation>所有软件</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/SideBarWidget/sidebarwidget.cpp" line="97"/>
|
||||
+ <location filename="../src/SideBarWidget/sidebarwidget.cpp" line="145"/>
|
||||
<source>Letter</source>
|
||||
<translation>字母排序</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/SideBarWidget/sidebarwidget.cpp" line="99"/>
|
||||
+ <location filename="../src/SideBarWidget/sidebarwidget.cpp" line="147"/>
|
||||
<source>Function</source>
|
||||
<translation>功能分类</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/SideBarWidget/sidebarwidget.cpp" line="113"/>
|
||||
+ <location filename="../src/SideBarWidget/sidebarwidget.cpp" line="161"/>
|
||||
<source>Trash</source>
|
||||
<translation>回收站</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/SideBarWidget/sidebarwidget.cpp" line="115"/>
|
||||
+ <location filename="../src/SideBarWidget/sidebarwidget.cpp" line="163"/>
|
||||
<source>Computer</source>
|
||||
<translation>计算机</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/SideBarWidget/sidebarwidget.cpp" line="469"/>
|
||||
+ <location filename="../src/SideBarWidget/sidebarwidget.cpp" line="521"/>
|
||||
<source>Max</source>
|
||||
<translation>放大</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/SideBarWidget/sidebarwidget.cpp" line="111"/>
|
||||
+ <location filename="../src/SideBarWidget/sidebarwidget.cpp" line="159"/>
|
||||
<source>Personal</source>
|
||||
<translation>个人</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/SideBarWidget/sidebarwidget.cpp" line="117"/>
|
||||
+ <location filename="../src/SideBarWidget/sidebarwidget.cpp" line="165"/>
|
||||
<source>Settings</source>
|
||||
<translation>设置</translation>
|
||||
</message>
|
||||
@@ -289,7 +304,7 @@
|
||||
<translation type="vanished">回收站</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/SideBarWidget/sidebarwidget.cpp" line="119"/>
|
||||
+ <location filename="../src/SideBarWidget/sidebarwidget.cpp" line="167"/>
|
||||
<source>Power</source>
|
||||
<translation>电源</translation>
|
||||
</message>
|
||||
+
|
||||
/**
|
||||
* @brief Attribute
|
||||
*/
|
||||
--
|
||||
2.33.0
|
||||
|
||||
|
||||
@ -0,0 +1,99 @@
|
||||
From: cckylin-cibot <cckylin-cibot@kylinos.cn>
|
||||
Date: Wed, 22 Jun 2022 07:02:54 +0000
|
||||
Subject: =?utf-8?b?ITUg5L+u5pS55LqGcGxhdGZvcm1OYW1l6I635Y+W5pe25py677yM6Kej?=
|
||||
=?utf-8?b?5Yaz6I635Y+W5Li656m655qE6Zeu6aKY77yb5aKe5Yqg5LqG5YWo5bGP56qX5Y+j?=
|
||||
=?utf-8?b?5pi+56S65pe25L2N572u6K6+572uICogdXBkYXRlIGRlYmlhbi9jaGFuZ2Vsb2cu?=
|
||||
=?utf-8?b?ICog6Kej5Yaz5Yay56qBICog6LCD5pW0cGxhdGZvcm1OYW1l6I635Y+W5L2N572u?=
|
||||
=?utf-8?b?77yM5L+u5pS55YWo5bGP56qX5Y+j5L2N572u6K6+572uICog5re75YqgY29udHJv?=
|
||||
=?utf-8?b?bOaWh+S7tuS+nei1liAqIOS/ruaUueWbvuagh+e8uuWksee8luivkeWksei0pQ==?=
|
||||
=?utf-8?b?6Zeu6aKYICogdXBkYXRlIHNyYy9VdGlsaXR5RnVuY3Rpb24vYWJzdHJhY3RJbnRl?=
|
||||
=?utf-8?b?cmZhY2UuaC4gKiAzLjIwd2F5bGFuZOS9jee9rumXrumimOino+WGsw==?=
|
||||
|
||||
---
|
||||
main.cpp | 2 +-
|
||||
src/UserInterface/mainwindow.cpp | 11 +++++++++++
|
||||
src/UserInterface/mainwindow.h | 1 +
|
||||
3 files changed, 13 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/main.cpp b/main.cpp
|
||||
index 68bb94d..4d4c558 100755
|
||||
--- a/main.cpp
|
||||
+++ b/main.cpp
|
||||
@@ -44,7 +44,6 @@ int main(int argc, char *argv[])
|
||||
initUkuiLog4qt("ukui-menu");
|
||||
g_projectCodeName = KDKGetPrjCodeName().c_str();
|
||||
g_subProjectCodeName = KDKGetOSRelease("SUB_PROJECT_CODENAME").c_str();
|
||||
- g_platform = QGuiApplication::platformName();
|
||||
|
||||
qRegisterMetaType<QVector<QStringList>>("QVector<QStringList>");
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
|
||||
@@ -56,6 +55,7 @@ int main(int argc, char *argv[])
|
||||
#endif
|
||||
QtSingleApplication app("ukui-menu", argc, argv);
|
||||
app.setQuitOnLastWindowClosed(false);
|
||||
+ g_platform = QGuiApplication::platformName();
|
||||
|
||||
if (app.isRunning()) {
|
||||
app.sendMessage("raise_window_noop");
|
||||
diff --git a/src/UserInterface/mainwindow.cpp b/src/UserInterface/mainwindow.cpp
|
||||
index ccc8fe1..984d9f0 100755
|
||||
--- a/src/UserInterface/mainwindow.cpp
|
||||
+++ b/src/UserInterface/mainwindow.cpp
|
||||
@@ -355,6 +355,7 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
m_viewWidget->setFocus();
|
||||
} else {
|
||||
m_fullWindow->show();
|
||||
+ setMaxWindowPos();
|
||||
// fullWindow->raise();
|
||||
m_fullWindow->activateWindow();
|
||||
pointDataStruct pointData;
|
||||
@@ -693,6 +694,7 @@ void MainWindow::maxAnimationFinished()
|
||||
{
|
||||
m_fullWindow->raise();
|
||||
m_fullWindow->showNormal();
|
||||
+ setMaxWindowPos();
|
||||
m_fullWindow->activateWindow();
|
||||
QEventLoop loop;
|
||||
QTimer::singleShot(100, &loop, SLOT(quit()));
|
||||
@@ -1217,6 +1219,7 @@ void MainWindow::showWindow()
|
||||
if (m_isFullScreen) {
|
||||
m_fullWindow->raise();
|
||||
m_fullWindow->showNormal();
|
||||
+ setMaxWindowPos();
|
||||
m_fullWindow->activateWindow();
|
||||
pointDataStruct pointData;
|
||||
pointData.module = "fullWindow";
|
||||
@@ -1238,6 +1241,7 @@ void MainWindow::showWindow()
|
||||
BuriedPointDataSend::getInstance()->setPoint(pointData);
|
||||
}
|
||||
}
|
||||
+
|
||||
void MainWindow::hideWindow()
|
||||
{
|
||||
if (m_fullWindow->isVisible()) {
|
||||
@@ -1296,6 +1300,13 @@ void MainWindow::setMinWindowPos()
|
||||
}
|
||||
}
|
||||
|
||||
+void MainWindow::setMaxWindowPos()
|
||||
+{
|
||||
+ if (g_platform.startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) {
|
||||
+ kdk::WindowManager::setGeometry(m_fullWindow->windowHandle(), QRect(0, 0, Style::m_availableScreenWidth, Style::m_availableScreenHeight));
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
void MainWindow::repaintWidget()
|
||||
{
|
||||
Style::initWidStyle();
|
||||
diff --git a/src/UserInterface/mainwindow.h b/src/UserInterface/mainwindow.h
|
||||
index 9c1bcad..7dede39 100755
|
||||
--- a/src/UserInterface/mainwindow.h
|
||||
+++ b/src/UserInterface/mainwindow.h
|
||||
@@ -107,6 +107,7 @@ protected:
|
||||
|
||||
void setMinWindowPos();
|
||||
|
||||
+ void setMaxWindowPos();
|
||||
public:
|
||||
Q_SIGNALS:
|
||||
void sendSearchKeyword(QString arg);
|
||||
52
0002-fix-coredump-of-ukui-menu.patch
Normal file
52
0002-fix-coredump-of-ukui-menu.patch
Normal file
@ -0,0 +1,52 @@
|
||||
From 443a316ff98be2cfb1c7cdb3725489789ac504b9 Mon Sep 17 00:00:00 2001
|
||||
From: peijiankang <peijiankang@kylinos.cn>
|
||||
Date: Fri, 10 Feb 2023 16:48:13 +0800
|
||||
Subject: [PATCH] fix coredump of ukui-menu
|
||||
|
||||
---
|
||||
src/UserInterface/ListView/klistview.cpp | 12 +++++++++---
|
||||
src/UserInterface/ListView/listview.cpp | 5 ++++-
|
||||
2 files changed, 13 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/UserInterface/ListView/klistview.cpp b/src/UserInterface/ListView/klistview.cpp
|
||||
index 012b52a..33c5bc0 100755
|
||||
--- a/src/UserInterface/ListView/klistview.cpp
|
||||
+++ b/src/UserInterface/ListView/klistview.cpp
|
||||
@@ -11,9 +11,15 @@ KListView::KListView(QWidget *parent):
|
||||
|
||||
KListView::~KListView()
|
||||
{
|
||||
- delete m_delegate;
|
||||
- delete listmodel;
|
||||
- delete pUkuiMenuInterface;
|
||||
+ if (m_delegate) {
|
||||
+ delete m_delegate;
|
||||
+ m_delegate = nullptr;
|
||||
+ }
|
||||
+
|
||||
+ if (listmodel) {
|
||||
+ delete listmodel;
|
||||
+ listmodel = nullptr;
|
||||
+ }
|
||||
}
|
||||
|
||||
void KListView::addData(QStringList data)
|
||||
diff --git a/src/UserInterface/ListView/listview.cpp b/src/UserInterface/ListView/listview.cpp
|
||||
index 9bd82c4..e6027b6 100755
|
||||
--- a/src/UserInterface/ListView/listview.cpp
|
||||
+++ b/src/UserInterface/ListView/listview.cpp
|
||||
@@ -37,7 +37,10 @@ ListView::ListView(QWidget *parent/*, int width, int height, int module*/):
|
||||
|
||||
ListView::~ListView()
|
||||
{
|
||||
- delete pUkuiMenuInterface;
|
||||
+ if (pUkuiMenuInterface) {
|
||||
+ delete pUkuiMenuInterface;
|
||||
+ pUkuiMenuInterface = nullptr;
|
||||
+ }
|
||||
}
|
||||
|
||||
void ListView::initWidget()
|
||||
--
|
||||
2.33.0
|
||||
|
||||
72
0003-.patch
Normal file
72
0003-.patch
Normal file
@ -0,0 +1,72 @@
|
||||
From: cckylin-cibot <cckylin-cibot@kylinos.cn>
|
||||
Date: Thu, 23 Jun 2022 09:23:21 +0000
|
||||
Subject: =?utf-8?b?5re75Yqg5bqU55So566h55CG5Zmo5o6l5Y+j?=
|
||||
|
||||
---
|
||||
src/UserInterface/tabletwindow.cpp | 2 +-
|
||||
src/UtilityFunction/utility.cpp | 36 +++++++++++++++++++++++-------------
|
||||
2 files changed, 24 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/src/UserInterface/tabletwindow.cpp b/src/UserInterface/tabletwindow.cpp
|
||||
index 4f26924..378ad1f 100755
|
||||
--- a/src/UserInterface/tabletwindow.cpp
|
||||
+++ b/src/UserInterface/tabletwindow.cpp
|
||||
@@ -615,7 +615,7 @@ void TabletWindow::execApplication(QString desktopfp)
|
||||
|
||||
if (!g_subProjectCodeName.contains("mavis")
|
||||
|| (g_subProjectCodeName.contains("mavis") && !QDBusReply<bool>(iface.call("LaunchApp", desktopfp)))) {
|
||||
- execApp(desktopfp);
|
||||
+// execApp(desktopfp);
|
||||
QString str;
|
||||
//打开文件.desktop
|
||||
GError **error = nullptr;
|
||||
diff --git a/src/UtilityFunction/utility.cpp b/src/UtilityFunction/utility.cpp
|
||||
index 3eee325..40c6f08 100755
|
||||
--- a/src/UtilityFunction/utility.cpp
|
||||
+++ b/src/UtilityFunction/utility.cpp
|
||||
@@ -710,22 +710,32 @@ bool deleteAppRecord(QString desktopfn)
|
||||
|
||||
void execApp(QString desktopfp)
|
||||
{
|
||||
- UkuiMenuInterface interface;
|
||||
|
||||
- if (interface.checkKreApp(desktopfp)) {
|
||||
- QProcess::startDetached(interface.getAppExec(desktopfp));
|
||||
- } else {
|
||||
- QString appName = interface.getAppExec(desktopfp);
|
||||
- QStringList strList = (appName.replace("\"", "")).split(" ");
|
||||
+ QDBusInterface iface("com.kylin.AppManager",
|
||||
+ "/com/kylin/AppManager",
|
||||
+ "com.kylin.AppManager",
|
||||
+ QDBusConnection::sessionBus());
|
||||
+ QDBusReply<bool> res = iface.call("LaunchApp", desktopfp);
|
||||
|
||||
- if (QString(strList.at(0)) == "kmplayer") {
|
||||
- QProcess::startDetached(strList.at(0));
|
||||
- return;
|
||||
- }
|
||||
+ if (!res.isValid() || !res) {
|
||||
|
||||
- GDesktopAppInfo *desktopAppInfo = g_desktop_app_info_new_from_filename(desktopfp.toLocal8Bit().data());
|
||||
- g_app_info_launch(G_APP_INFO(desktopAppInfo), nullptr, nullptr, nullptr);
|
||||
- g_object_unref(desktopAppInfo);
|
||||
+ UkuiMenuInterface interface;
|
||||
+
|
||||
+ if (interface.checkKreApp(desktopfp)) {
|
||||
+ QProcess::startDetached(interface.getAppExec(desktopfp));
|
||||
+ } else {
|
||||
+ QString appName = interface.getAppExec(desktopfp);
|
||||
+ QStringList strList = (appName.replace("\"", "")).split(" ");
|
||||
+
|
||||
+ if (QString(strList.at(0)) == "kmplayer") {
|
||||
+ QProcess::startDetached(strList.at(0));
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ GDesktopAppInfo *desktopAppInfo = g_desktop_app_info_new_from_filename(desktopfp.toLocal8Bit().data());
|
||||
+ g_app_info_launch(G_APP_INFO(desktopAppInfo), nullptr, nullptr, nullptr);
|
||||
+ g_object_unref(desktopAppInfo);
|
||||
+ }
|
||||
}
|
||||
|
||||
QFileInfo fileInfo(desktopfp);
|
||||
69
0003-add-ukui-log4qt.patch
Normal file
69
0003-add-ukui-log4qt.patch
Normal file
@ -0,0 +1,69 @@
|
||||
From 235bc6b01ac146485aff84d2db7fe9a81d8e7ff4 Mon Sep 17 00:00:00 2001
|
||||
From: peijiankang <peijiankang@kylinos.cn>
|
||||
Date: Wed, 15 Feb 2023 17:45:51 +0800
|
||||
Subject: [PATCH] add ukui-log4qt
|
||||
|
||||
---
|
||||
debian/control | 7 ++++---
|
||||
main.cpp | 2 ++
|
||||
ukui-menu.pro | 2 +-
|
||||
3 files changed, 7 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/debian/control b/debian/control
|
||||
index 2e3fd51..00568da 100755
|
||||
--- a/debian/control
|
||||
+++ b/debian/control
|
||||
@@ -19,7 +19,8 @@ Build-Depends: debhelper-compat (=12),
|
||||
libx11-dev,
|
||||
libukui-common0,
|
||||
libukui-common-dev,
|
||||
- libpeony-dev
|
||||
+ libpeony-dev,
|
||||
+ libkysdk-waylandhelper-dev
|
||||
Standards-Version: 4.5.0
|
||||
Rules-Requires-Root: no
|
||||
Homepage: https://github.com/ukui/ukui-menu
|
||||
@@ -33,9 +34,9 @@ Depends: ${shlibs:Depends},
|
||||
accountsservice,
|
||||
libgsettings-qt1,
|
||||
libqt5x11extras5,
|
||||
- bamfdaemon
|
||||
+ bamfdaemon,
|
||||
+ libkysdk-waylandhelper
|
||||
Suggests:kylin-status-manager,
|
||||
- kylin-daq
|
||||
Description: Advanced ukui menu
|
||||
UKUI menu provides start menu development library and advanced
|
||||
graphical user interface.
|
||||
diff --git a/main.cpp b/main.cpp
|
||||
index ed52069..f30ac71 100755
|
||||
--- a/main.cpp
|
||||
+++ b/main.cpp
|
||||
@@ -34,9 +34,11 @@
|
||||
#define UKUI_PATH "/org/gnome/SessionManager"
|
||||
#define UKUI_INTERFACE "org.gnome.SessionManager"
|
||||
|
||||
+#include <ukui-log4qt.h>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
+ initUkuiLog4qt("ukui-menu");
|
||||
g_projectCodeName = KDKGetPrjCodeName().c_str();
|
||||
qRegisterMetaType<QVector<QStringList>>("QVector<QStringList>");
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
|
||||
diff --git a/ukui-menu.pro b/ukui-menu.pro
|
||||
index 5fc48ba..9cf7362 100755
|
||||
--- a/ukui-menu.pro
|
||||
+++ b/ukui-menu.pro
|
||||
@@ -52,7 +52,7 @@ PKGCONFIG+=glib-2.0 gio-unix-2.0 gsettings-qt libbamf3 x11 xtst
|
||||
|
||||
CONFIG += no_keywords link_pkgconfig
|
||||
|
||||
-LIBS+=-pthread -luchardet -lukui-com4c -lukui-com4cxx -lpeony
|
||||
+LIBS+=-pthread -luchardet -lukui-log4qt -lukui-com4c -lukui-com4cxx -lpeony
|
||||
|
||||
desktop_file.files = ukui-menu.desktop
|
||||
desktop_file.path = /etc/xdg/autostart
|
||||
--
|
||||
2.33.0
|
||||
|
||||
2601
0004-7-close-cd-128489.patch
Normal file
2601
0004-7-close-cd-128489.patch
Normal file
File diff suppressed because it is too large
Load Diff
128
0005-8-wayland.patch
Normal file
128
0005-8-wayland.patch
Normal file
@ -0,0 +1,128 @@
|
||||
From: cckylin-cibot <cckylin-cibot@kylinos.cn>
|
||||
Date: Tue, 12 Jul 2022 08:55:07 +0000
|
||||
Subject: =?utf-8?b?ITgg6Kej5Yazd2F5bGFuZOeql+WPo+eKtuaAgemUmeivr+WvvOiHtA==?=
|
||||
=?utf-8?b?5byA5aeL6I+c5Y2V5Y2V5L6L5pi+56S66ZqQ6JeP5aSx6LSl6Zeu6aKY?=
|
||||
|
||||
---
|
||||
src/QtSingleApplication/qtsingleapplication.cpp | 24 +++++++++++-------------
|
||||
src/UserInterface/ListView/klistview.cpp | 1 +
|
||||
src/UserInterface/mainwindow.cpp | 13 ++++++++++++-
|
||||
src/UserInterface/mainwindow.h | 6 +++---
|
||||
4 files changed, 27 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/src/QtSingleApplication/qtsingleapplication.cpp b/src/QtSingleApplication/qtsingleapplication.cpp
|
||||
index e3ba444..d957182 100755
|
||||
--- a/src/QtSingleApplication/qtsingleapplication.cpp
|
||||
+++ b/src/QtSingleApplication/qtsingleapplication.cpp
|
||||
@@ -350,19 +350,17 @@ void QtSingleApplication::activateWindow()
|
||||
myDebug() << "单例触发activateWindow";
|
||||
if (!g_projectCodeName.contains("V10SP1-edu")) {
|
||||
MainWindow *w = qobject_cast<MainWindow *>(actWin);
|
||||
-
|
||||
- if (this->applicationState() & Qt::ApplicationInactive) {
|
||||
- myDebug() << "单例内触发开始菜单显示";
|
||||
- actWin->setWindowState(actWin->windowState() & ~Qt::WindowMinimized);
|
||||
- // actWin->raise();
|
||||
- // actWin->showNormal();
|
||||
- // actWin->activateWindow();
|
||||
- w->showWindow();
|
||||
- } else {
|
||||
- myDebug() << "单例内触发开始菜单隐藏";
|
||||
- actWin->setWindowState(actWin->windowState() & Qt::WindowMinimized);
|
||||
- w->hideWindow();
|
||||
- }
|
||||
+ w->windowOption();
|
||||
+
|
||||
+// if (this->applicationState() & Qt::ApplicationInactive) {
|
||||
+// myDebug() << "单例内触发开始菜单显示";
|
||||
+// actWin->setWindowState(actWin->windowState() & ~Qt::WindowMinimized);
|
||||
+// w->showWindow();
|
||||
+// } else {
|
||||
+// myDebug() << "单例内触发开始菜单隐藏";
|
||||
+// actWin->setWindowState(actWin->windowState() & Qt::WindowMinimized);
|
||||
+// w->hideWindow();
|
||||
+// }
|
||||
} else {
|
||||
TabletWindow *w = qobject_cast<TabletWindow *>(actWin);
|
||||
w->showPCMenu();
|
||||
diff --git a/src/UserInterface/ListView/klistview.cpp b/src/UserInterface/ListView/klistview.cpp
|
||||
index b927ba2..96a03e6 100755
|
||||
--- a/src/UserInterface/ListView/klistview.cpp
|
||||
+++ b/src/UserInterface/ListView/klistview.cpp
|
||||
@@ -63,6 +63,7 @@ void KListView::paintEvent(QPaintEvent *e)
|
||||
void KListView::mouseMoveEvent(QMouseEvent *e)
|
||||
{
|
||||
this->clearFocus();
|
||||
+ return QListView::mouseMoveEvent(e);
|
||||
}
|
||||
|
||||
void KListView::mousePressEvent(QMouseEvent *event)
|
||||
diff --git a/src/UserInterface/mainwindow.cpp b/src/UserInterface/mainwindow.cpp
|
||||
index d65d221..4a3f7d9 100755
|
||||
--- a/src/UserInterface/mainwindow.cpp
|
||||
+++ b/src/UserInterface/mainwindow.cpp
|
||||
@@ -181,7 +181,7 @@ void MainWindow::registDbusServer()
|
||||
} else {
|
||||
m_fullWindow->show();
|
||||
setMaxWindowPos();
|
||||
- // fullWindow->raise();
|
||||
+ m_fullWindow->raise();
|
||||
m_fullWindow->activateWindow();
|
||||
}
|
||||
}
|
||||
@@ -506,6 +506,15 @@ void MainWindow::initTabOrder()
|
||||
setTabOrder(m_minMaxChangeButton, m_powerOffButton);
|
||||
}
|
||||
|
||||
+void MainWindow::windowOption()
|
||||
+{
|
||||
+ if (this->isVisible() || m_fullWindow->isVisible()) {
|
||||
+ hideWindow();
|
||||
+ } else {
|
||||
+ showWindow();
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
void MainWindow::initUi()
|
||||
{
|
||||
qDebug() << "init UI";
|
||||
@@ -684,6 +693,7 @@ bool MainWindow::event(QEvent *event)
|
||||
if (QEvent::WindowDeactivate == event->type()) { //窗口停用
|
||||
if (QApplication::activeWindow() != this) {
|
||||
qDebug() << " * 鼠标点击窗口外部事件";
|
||||
+ this->setWindowState(this->windowState() & Qt::WindowMinimized);
|
||||
this->hide();
|
||||
m_topStackedWidget->setCurrentIndex(0);
|
||||
m_lineEdit->clear();
|
||||
@@ -1340,6 +1350,7 @@ void MainWindow::repaintWidget()
|
||||
m_fullWindow->setFixedSize(width, height);
|
||||
m_fullWindow->repaintWidget();
|
||||
}
|
||||
+
|
||||
void MainWindow::showNormalWindowSlot()
|
||||
{
|
||||
myDebug() << "Style::m_availableScreenWidth" << Style::m_availableScreenWidth << "Style::m_availableScreenHeight" << Style::m_availableScreenHeight;
|
||||
diff --git a/src/UserInterface/mainwindow.h b/src/UserInterface/mainwindow.h
|
||||
index 4f0baf3..30aa46b 100755
|
||||
--- a/src/UserInterface/mainwindow.h
|
||||
+++ b/src/UserInterface/mainwindow.h
|
||||
@@ -65,9 +65,7 @@ public:
|
||||
explicit MainWindow(QWidget *parent = nullptr);
|
||||
~MainWindow();
|
||||
|
||||
- void showWindow();
|
||||
-
|
||||
- void hideWindow();
|
||||
+ void windowOption();
|
||||
|
||||
protected:
|
||||
void initSearchUi();
|
||||
@@ -81,6 +79,8 @@ protected:
|
||||
void registDbusServer();
|
||||
void setTabletModeFlag();
|
||||
void initUi();
|
||||
+ void showWindow();
|
||||
+ void hideWindow();
|
||||
/**
|
||||
* @brief 处理外部点击事件和主窗口键盘控制
|
||||
* @param event
|
||||
249
0006-changelog.patch
Normal file
249
0006-changelog.patch
Normal file
@ -0,0 +1,249 @@
|
||||
From: lixueman <lixueman@kylinos.cn>
|
||||
Date: Mon, 18 Jul 2022 15:21:40 +0800
|
||||
Subject: =?utf-8?b?5pu05pawY2hhbmdlbG9n5L+h5oGv?=
|
||||
|
||||
---
|
||||
src/UserInterface/ListView/klistview.cpp | 1 +
|
||||
src/UserInterface/Widget/full_function_widget.cpp | 1 +
|
||||
src/UserInterface/Widget/full_function_widget.h | 2 ++
|
||||
src/UserInterface/Widget/full_letter_widget.cpp | 1 +
|
||||
src/UserInterface/Widget/full_letter_widget.h | 2 ++
|
||||
src/UserInterface/full_mainwindow.cpp | 23 ++++++++++++++-
|
||||
src/UserInterface/full_mainwindow.h | 1 +
|
||||
src/UserInterface/mainwindow.cpp | 34 +++++++++++++++++------
|
||||
8 files changed, 55 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/src/UserInterface/ListView/klistview.cpp b/src/UserInterface/ListView/klistview.cpp
|
||||
index 96a03e6..8151d04 100755
|
||||
--- a/src/UserInterface/ListView/klistview.cpp
|
||||
+++ b/src/UserInterface/ListView/klistview.cpp
|
||||
@@ -46,6 +46,7 @@ void KListView::onClicked(QModelIndex index)
|
||||
if (var.isValid()) {
|
||||
QString desktopfp = var.value<QString>();
|
||||
execApp(desktopfp);
|
||||
+ Q_EMIT sendHideMainWindowSignal();
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/UserInterface/Widget/full_function_widget.cpp b/src/UserInterface/Widget/full_function_widget.cpp
|
||||
index 253f210..fd124e4 100755
|
||||
--- a/src/UserInterface/Widget/full_function_widget.cpp
|
||||
+++ b/src/UserInterface/Widget/full_function_widget.cpp
|
||||
@@ -210,6 +210,7 @@ void FullFunctionWidget::insertAppList(QStringList desktopfplist)
|
||||
listview->addData(m_data);
|
||||
connect(listview, &FullListView::sendItemClickedSignal, this, &FullFunctionWidget::execApplication);
|
||||
connect(listview, &FullListView::sendHideMainWindowSignal, this, &FullFunctionWidget::sendHideMainWindowSignal);
|
||||
+ connect(listview, &FullListView::sendUpdateAppListSignal, this, &FullFunctionWidget::sendUpdateCommonView);
|
||||
}
|
||||
|
||||
/**
|
||||
diff --git a/src/UserInterface/Widget/full_function_widget.h b/src/UserInterface/Widget/full_function_widget.h
|
||||
index ead61ff..931104c 100755
|
||||
--- a/src/UserInterface/Widget/full_function_widget.h
|
||||
+++ b/src/UserInterface/Widget/full_function_widget.h
|
||||
@@ -195,6 +195,8 @@ Q_SIGNALS:
|
||||
|
||||
void changeScrollValue(int value, int maximumValue);
|
||||
|
||||
+ void sendUpdateCommonView();
|
||||
+
|
||||
};
|
||||
|
||||
#endif // FULLFUNCTIONWIDGET_H
|
||||
diff --git a/src/UserInterface/Widget/full_letter_widget.cpp b/src/UserInterface/Widget/full_letter_widget.cpp
|
||||
index 96daac2..45fb165 100755
|
||||
--- a/src/UserInterface/Widget/full_letter_widget.cpp
|
||||
+++ b/src/UserInterface/Widget/full_letter_widget.cpp
|
||||
@@ -210,6 +210,7 @@ void FullLetterWidget::fillAppList()
|
||||
listview->addData(m_data);
|
||||
connect(listview, &FullListView::sendItemClickedSignal, this, &FullLetterWidget::execApplication);
|
||||
connect(listview, &FullListView::sendHideMainWindowSignal, this, &FullLetterWidget::sendHideMainWindowSignal);
|
||||
+ connect(listview, &FullListView::sendUpdateAppListSignal, this, &FullLetterWidget::sendUpdateCommonView);
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/UserInterface/Widget/full_letter_widget.h b/src/UserInterface/Widget/full_letter_widget.h
|
||||
index 5f94658..662408b 100755
|
||||
--- a/src/UserInterface/Widget/full_letter_widget.h
|
||||
+++ b/src/UserInterface/Widget/full_letter_widget.h
|
||||
@@ -197,6 +197,8 @@ Q_SIGNALS:
|
||||
void selectFirstItem();
|
||||
|
||||
void changeScrollValue(int value, int maximumValue);
|
||||
+
|
||||
+ void sendUpdateCommonView();
|
||||
};
|
||||
|
||||
#endif // FULLLETTERWIDGET_H
|
||||
diff --git a/src/UserInterface/full_mainwindow.cpp b/src/UserInterface/full_mainwindow.cpp
|
||||
index 4e6ea9a..3c77fd5 100755
|
||||
--- a/src/UserInterface/full_mainwindow.cpp
|
||||
+++ b/src/UserInterface/full_mainwindow.cpp
|
||||
@@ -209,9 +209,12 @@ void FullMainWindow::initConnect()
|
||||
connect(this, &FullMainWindow::sendSetFocusToResult, m_fullResultPage, &FullSearchResultWidget::selectFirstItemTab);
|
||||
// connect(m_fullSelectMenuButton, &QToolButton::clicked, this, &FullMainWindow::on_fullSelectMenuButton_clicked);
|
||||
connect(m_fullCommonPage, &FullCommonUseWidget::sendUpdateOtherView, this, &FullMainWindow::sendUpdateOtherView);
|
||||
+ connect(m_fullFunctionPage, &FullFunctionWidget::sendUpdateCommonView, m_fullCommonPage, &FullCommonUseWidget::updateListViewSlot);
|
||||
+ connect(m_fullLetterPage, &FullLetterWidget::sendUpdateCommonView, m_fullCommonPage, &FullCommonUseWidget::updateListViewSlot);
|
||||
connect(m_fullCommonPage, &FullCommonUseWidget::sendHideMainWindowSignal, this, &FullMainWindow::fullWindowHide);
|
||||
connect(m_fullFunctionPage, &FullFunctionWidget::sendHideMainWindowSignal, this, &FullMainWindow::fullWindowHide);
|
||||
connect(m_fullLetterPage, &FullLetterWidget::sendHideMainWindowSignal, this, &FullMainWindow::fullWindowHide);
|
||||
+ connect(m_fullResultPage, &FullSearchResultWidget::sendHideMainWindowSignal, this, &FullMainWindow::fullWindowHide);
|
||||
connect(m_dropDownMenu, &MenuBox::triggered, this, &FullMainWindow::on_fullSelectMenuButton_triggered);
|
||||
connect(m_dropDownMenu, &MenuBox::sendMainWinActiveSignal, [ = ]() {
|
||||
selectIconAnimation(false);
|
||||
@@ -316,7 +319,7 @@ bool FullMainWindow::eventFilter(QObject *watched, QEvent *event)
|
||||
if (event->type() == QEvent::KeyPress) {
|
||||
QKeyEvent *ke = (QKeyEvent *)event;
|
||||
|
||||
- if (ke->key() == Qt::Key_Enter || ke->key() == Qt::Key_Return) {
|
||||
+ if (ke->key() == Qt::Key_Enter || ke->key() == Qt::Key_Return || ke->key() == Qt::Key_Down) {
|
||||
Q_EMIT sendSetFocusToResult();
|
||||
}
|
||||
}
|
||||
@@ -370,6 +373,23 @@ void FullMainWindow::iconAnimationFinished()
|
||||
-Style::DropMenuWidth, 45)));
|
||||
}
|
||||
|
||||
+void FullMainWindow::keyPressEvent(QKeyEvent *e)
|
||||
+{
|
||||
+ if (e->type() == QEvent::KeyPress) {
|
||||
+ if ((e->key() >= Qt::Key_0 && e->key() <= Qt::Key_9) || (e->key() >= Qt::Key_A && e->key() <= Qt::Key_Z)) {
|
||||
+ qDebug() << "void MainWindow::keyPressEvent(QKeyEvent *e)" << e->text();
|
||||
+ m_lineEdit->setFocus();
|
||||
+ m_lineEdit->setText(e->text());
|
||||
+ }
|
||||
+
|
||||
+ if (e->key() == Qt::Key_Backspace) {
|
||||
+ if (!m_lineEdit->text().isEmpty()) {
|
||||
+ m_lineEdit->setText("");
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
void FullMainWindow::selectIconAnimation(const bool &flag)
|
||||
{
|
||||
iconAnimation = new QPropertyAnimation(m_fullSelectMenuButton, "rotation", this);
|
||||
@@ -451,6 +471,7 @@ bool FullMainWindow::event(QEvent *event)
|
||||
}
|
||||
|
||||
if (keyEvent->key() == Qt::Key_Escape) {
|
||||
+ m_lineEdit->clear();
|
||||
this->hide();
|
||||
}
|
||||
}
|
||||
diff --git a/src/UserInterface/full_mainwindow.h b/src/UserInterface/full_mainwindow.h
|
||||
index 34a91ca..9592169 100755
|
||||
--- a/src/UserInterface/full_mainwindow.h
|
||||
+++ b/src/UserInterface/full_mainwindow.h
|
||||
@@ -63,6 +63,7 @@ protected:
|
||||
void initLayout();
|
||||
void selectIconAnimation(const bool &flag);
|
||||
void iconAnimationFinished();
|
||||
+ void keyPressEvent(QKeyEvent *e);
|
||||
|
||||
private:
|
||||
QAction *m_allAction = nullptr;
|
||||
diff --git a/src/UserInterface/mainwindow.cpp b/src/UserInterface/mainwindow.cpp
|
||||
index 4a3f7d9..1f09418 100755
|
||||
--- a/src/UserInterface/mainwindow.cpp
|
||||
+++ b/src/UserInterface/mainwindow.cpp
|
||||
@@ -319,6 +319,7 @@ void MainWindow::initSearchUi()
|
||||
m_lineEdit->setStyleSheet(QString::fromUtf8("border-radius: 13px; border:1px solid rgba(5, 151, 255, 1); background: transparent;"));
|
||||
m_lineEdit->setFrame(false);
|
||||
m_lineEdit->setPlaceholderText(tr("Search"));
|
||||
+ m_lineEdit->installEventFilter(this);
|
||||
m_cancelSearchPushButton = new QPushButton(m_minSearchPage);
|
||||
m_cancelSearchPushButton->setFixedSize(QSize(26, 26));
|
||||
// m_cancelSearchPushButton->setStyleSheet(m_buttonStyle.arg("QPushButton"));
|
||||
@@ -570,6 +571,7 @@ void MainWindow::initUi()
|
||||
connect(m_minFuncListView, &ListView::sendUpdateAppListSignal, this, &MainWindow::updateView);
|
||||
connect(m_minLetterListView, &ListView::sendUpdateAppListSignal, this, &MainWindow::updateView);
|
||||
connect(m_minSearchResultListView, &ListView::sendUpdateAppListSignal, this, &MainWindow::updateView);
|
||||
+ connect(m_collectListView, &RightListView::sendUpdateAppListSignal, this, &MainWindow::updateView);
|
||||
connect(m_minAllListView, &ListView::sendCollectViewUpdate, this, &MainWindow::updateCollectView);
|
||||
connect(m_minFuncListView, &ListView::sendCollectViewUpdate, this, &MainWindow::updateCollectView);
|
||||
connect(m_minSearchResultListView, &ListView::sendCollectViewUpdate, this, &MainWindow::updateCollectView);
|
||||
@@ -1012,6 +1014,13 @@ bool MainWindow::eventFilter(QObject *target, QEvent *event)
|
||||
}
|
||||
}
|
||||
|
||||
+ if (target == m_lineEdit) {
|
||||
+ if (ke->key() == Qt::Key_Down) {
|
||||
+ m_minSearchResultListView->setFocus();
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
if (target == m_minSelectButton) {
|
||||
if (ke->key() == Qt::Key_Down) {
|
||||
if (m_state == 0) {
|
||||
@@ -1099,6 +1108,7 @@ void MainWindow::recvSearchResult(QVector<QStringList> arg)
|
||||
m_searchAppThread->quit();
|
||||
QVector<QStringList> m_data;
|
||||
m_data.clear();
|
||||
+ m_minSearchResultListView->verticalScrollBar()->setSliderPosition(0);
|
||||
m_minSearchResultListView->addData(m_data, 3);
|
||||
|
||||
Q_FOREACH (QStringList appinfo, arg) {
|
||||
@@ -1240,14 +1250,16 @@ void MainWindow::on_minMaxChangeButton_clicked()
|
||||
m_canHide = true;
|
||||
m_isFullScreen = true;
|
||||
|
||||
- m_animationPage->show();
|
||||
if (g_platform.startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) {
|
||||
- kdk::WindowManager::setGeometry(m_animationPage->windowHandle(), QRect(this->x(), this->y(), Style::minw, Style::minh));
|
||||
+ m_maxAnimation->setDuration(1);
|
||||
} else {
|
||||
+ m_animationPage->show();
|
||||
m_animationPage->setGeometry(this->x(), this->y(), Style::minw, Style::minh);
|
||||
+ m_animationPage->raise();
|
||||
+ m_animationPage->repaint();
|
||||
+ m_maxAnimation->setDuration(260);
|
||||
}
|
||||
- m_animationPage->raise();
|
||||
- m_animationPage->repaint();
|
||||
+
|
||||
QEventLoop loop;
|
||||
QTimer::singleShot(100, &loop, SLOT(quit()));
|
||||
loop.exec();
|
||||
@@ -1255,7 +1267,7 @@ void MainWindow::on_minMaxChangeButton_clicked()
|
||||
// m_maxAnimation->setStartValue(QRect(Style::m_primaryScreenX, Style::m_primaryScreenY + Style::m_availableScreenHeight - Style::minh, Style::minw, Style::minh));
|
||||
m_maxAnimation->setStartValue(QRect(this->x(), this->y(), Style::minw, Style::minh));
|
||||
m_maxAnimation->setEndValue(QRect(0, 0, Style::m_availableScreenWidth, Style::m_availableScreenHeight));
|
||||
- m_maxAnimation->setDuration(260);
|
||||
+
|
||||
m_maxAnimation->start();
|
||||
this->hide();
|
||||
}
|
||||
@@ -1354,13 +1366,17 @@ void MainWindow::repaintWidget()
|
||||
void MainWindow::showNormalWindowSlot()
|
||||
{
|
||||
myDebug() << "Style::m_availableScreenWidth" << Style::m_availableScreenWidth << "Style::m_availableScreenHeight" << Style::m_availableScreenHeight;
|
||||
- m_animationPage->show();
|
||||
+
|
||||
if (g_platform.startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) {
|
||||
- kdk::WindowManager::setGeometry(m_animationPage->windowHandle(), QRect(0, 0, Style::m_availableScreenWidth, Style::m_availableScreenHeight));
|
||||
+ m_minAnimation->setDuration(1);
|
||||
} else {
|
||||
+ m_animationPage->show();
|
||||
m_animationPage->setGeometry(0, 0, Style::m_availableScreenWidth, Style::m_availableScreenHeight);
|
||||
+ m_animationPage->raise();
|
||||
+ m_animationPage->repaint();
|
||||
+ m_minAnimation->setDuration(260);
|
||||
}
|
||||
- m_animationPage->raise();
|
||||
+
|
||||
myDebug() << m_animationPage->rect();
|
||||
QEventLoop loop;
|
||||
QTimer::singleShot(100, &loop, SLOT(quit()));
|
||||
@@ -1369,7 +1385,7 @@ void MainWindow::showNormalWindowSlot()
|
||||
m_minAnimation->setEasingCurve(QEasingCurve::OutExpo);
|
||||
m_minAnimation->setStartValue(QRect(0, 0, Style::m_availableScreenWidth, Style::m_availableScreenHeight));
|
||||
m_minAnimation->setEndValue(QRect(this->x(), this->y(), Style::minw, Style::minh));
|
||||
- m_minAnimation->setDuration(260);
|
||||
+
|
||||
m_minAnimation->start();
|
||||
m_fullWindow->hide();
|
||||
}
|
||||
599
0007-changelog.patch
Normal file
599
0007-changelog.patch
Normal file
@ -0,0 +1,599 @@
|
||||
From: lixueman <lixueman@kylinos.cn>
|
||||
Date: Thu, 21 Jul 2022 14:00:38 +0800
|
||||
Subject: =?utf-8?b?5L+u5pS5Y2hhbmdlbG9n5L+h5oGv?=
|
||||
|
||||
---
|
||||
.../Button/function_classify_button.cpp | 83 +++++++++-------------
|
||||
.../Button/function_classify_button.h | 3 -
|
||||
.../Button/letter_classify_button.cpp | 55 ++++++++++----
|
||||
src/UserInterface/Button/letter_classify_button.h | 2 +-
|
||||
src/UserInterface/Widget/full_commonuse_widget.cpp | 14 ++--
|
||||
src/UserInterface/Widget/full_function_widget.cpp | 14 ++--
|
||||
src/UserInterface/Widget/full_letter_widget.cpp | 16 +++--
|
||||
.../Widget/full_searchresult_widget.cpp | 14 ++--
|
||||
.../Widget/function_button_widget.cpp | 6 +-
|
||||
src/UserInterface/Widget/letter_button_widget.cpp | 6 +-
|
||||
src/UserInterface/full_mainwindow.cpp | 14 ++--
|
||||
src/UserInterface/mainwindow.cpp | 35 ++++-----
|
||||
12 files changed, 146 insertions(+), 116 deletions(-)
|
||||
|
||||
diff --git a/src/UserInterface/Button/function_classify_button.cpp b/src/UserInterface/Button/function_classify_button.cpp
|
||||
index 2494be4..8ddabe1 100755
|
||||
--- a/src/UserInterface/Button/function_classify_button.cpp
|
||||
+++ b/src/UserInterface/Button/function_classify_button.cpp
|
||||
@@ -36,23 +36,11 @@ FunctionClassifyButton::FunctionClassifyButton(int width,
|
||||
m_iconSize(iconSize),
|
||||
m_category(category),
|
||||
m_fullscreen(fullscreen),
|
||||
- m_enabled(enabled),
|
||||
- m_iconLabel(new QLabel),
|
||||
- m_textLabel(new QLabel)
|
||||
+ m_enabled(enabled)
|
||||
{
|
||||
this->setFlat(true);
|
||||
this->setFixedSize(m_width, m_height);
|
||||
this->setFocusPolicy(Qt::NoFocus);
|
||||
- m_iconLabel->setFixedSize(m_iconSize, m_iconSize);
|
||||
- m_textLabel->adjustSize();
|
||||
- m_textLabel->setText(m_category);
|
||||
- m_textLabel->setAlignment(Qt::AlignCenter);
|
||||
-
|
||||
- if (m_fullscreen) {
|
||||
- QPalette pe = m_textLabel->palette();
|
||||
- pe.setColor(QPalette::ButtonText, Qt::white);
|
||||
- m_textLabel->setPalette(pe);
|
||||
- }
|
||||
|
||||
if (m_fullscreen) {
|
||||
updateIconState(Normal);
|
||||
@@ -67,12 +55,6 @@ FunctionClassifyButton::FunctionClassifyButton(int width,
|
||||
this->setCheckable(false);
|
||||
}
|
||||
|
||||
- QHBoxLayout *mainlayout = new QHBoxLayout;
|
||||
- mainlayout->setContentsMargins(0, 0, 0, 0);
|
||||
- mainlayout->setSpacing(Style::LeftSpaceIconText);
|
||||
- this->setLayout(mainlayout);
|
||||
-// mainlayout->addWidget(m_iconLabel);
|
||||
- mainlayout->addWidget(m_textLabel);
|
||||
connect(this, &FunctionClassifyButton::toggled, this, &FunctionClassifyButton::reactToToggle);
|
||||
connect(this, &FunctionClassifyButton::clicked, this, &FunctionClassifyButton::buttonClickedSlot);
|
||||
}
|
||||
@@ -115,6 +97,37 @@ void FunctionClassifyButton::paintEvent(QPaintEvent *e)
|
||||
painter.restore();
|
||||
}
|
||||
|
||||
+ if (!(option.state & QStyle::State_Enabled)) {
|
||||
+ painter.save();
|
||||
+ QColor color;
|
||||
+ if (!m_fullscreen) {
|
||||
+ if ( g_curStyle == "ukui-light") {
|
||||
+ color = Qt::black;
|
||||
+ } else {
|
||||
+ color = Qt::white;
|
||||
+ }
|
||||
+ color.setAlphaF(0.2);
|
||||
+ }
|
||||
+ painter.setPen(color);
|
||||
+ painter.drawText(option.rect, Qt::AlignCenter, m_category);
|
||||
+ painter.restore();
|
||||
+ }
|
||||
+
|
||||
+ if (option.state & QStyle::State_Enabled) {
|
||||
+ painter.save();
|
||||
+ QColor color;
|
||||
+
|
||||
+ if ( g_curStyle == "ukui-light") {
|
||||
+ color = Qt::black;
|
||||
+ } else {
|
||||
+ color = Qt::white;
|
||||
+ }
|
||||
+ color.setAlphaF(0.9);
|
||||
+ painter.setPen(color);
|
||||
+ painter.drawText(option.rect, Qt::AlignCenter, m_category);
|
||||
+ painter.restore();
|
||||
+ }
|
||||
+
|
||||
if (m_fullscreen && (option.state & QStyle::State_On)) {
|
||||
painter.save();
|
||||
painter.setPen(Qt::NoPen);
|
||||
@@ -265,37 +278,7 @@ void FunctionClassifyButton::updateIconState(const FunctionClassifyButton::State
|
||||
// }
|
||||
// pixmap.setDevicePixelRatio(qApp->devicePixelRatio());
|
||||
// m_iconLabel->setPixmap(pixmap);
|
||||
- updateTextState(state);
|
||||
+// updateTextState(state);
|
||||
}
|
||||
|
||||
-void FunctionClassifyButton::updateTextState(const FunctionClassifyButton::State state)
|
||||
-{
|
||||
- // QPalette p= m_textLabel->palette();
|
||||
- switch (state) {
|
||||
- case Enabled:
|
||||
- // p.setColor(QPalette::WindowText,QColor::fromRgbF(1, 1, 1));
|
||||
- // m_textLabel->setStyleSheet("background:transparent; color:rgba(255, 255, 255);");
|
||||
- break;
|
||||
-
|
||||
- case Disabled:
|
||||
- // p.setColor(QPalette::WindowText,QColor::fromRgbF(1, 1, 1, 0.25));
|
||||
- // m_textLabel->setStyleSheet("background:transparent; color:rgba(255, 255, 255, 25%);");
|
||||
- break;
|
||||
-
|
||||
- case Normal:
|
||||
- // p.setColor(QPalette::WindowText,QColor::fromRgbF(1, 1, 1, 0.50));
|
||||
- // m_textLabel->setStyleSheet("background:transparent; color:rgba(255, 255, 255, 50%);");
|
||||
- break;
|
||||
|
||||
- case Checked:
|
||||
- // p.setColor(QPalette::WindowText,QColor::fromRgbF(1, 1, 1));
|
||||
- // m_textLabel->setStyleSheet("background:transparent;color:rgba(255, 255, 255);");
|
||||
- break;
|
||||
-
|
||||
- default:
|
||||
- break;
|
||||
- }
|
||||
-
|
||||
- // p.setColor(QPalette::Window,Qt::transparent);
|
||||
- // m_textLabel->setPalette(p);
|
||||
-}
|
||||
diff --git a/src/UserInterface/Button/function_classify_button.h b/src/UserInterface/Button/function_classify_button.h
|
||||
index e99f2c3..6160fb9 100755
|
||||
--- a/src/UserInterface/Button/function_classify_button.h
|
||||
+++ b/src/UserInterface/Button/function_classify_button.h
|
||||
@@ -58,8 +58,6 @@ public:
|
||||
QString m_category;
|
||||
bool m_fullscreen;
|
||||
bool m_enabled;
|
||||
- QLabel *m_iconLabel = nullptr;
|
||||
- QLabel *m_textLabel = nullptr;
|
||||
State m_state = Checked;
|
||||
|
||||
void updateBtnState();
|
||||
@@ -70,7 +68,6 @@ protected:
|
||||
void leaveEvent(QEvent *e);
|
||||
void paintEvent(QPaintEvent *e);
|
||||
void updateIconState(const State state);
|
||||
- void updateTextState(const State state);
|
||||
|
||||
Q_SIGNALS:
|
||||
void buttonClicked();
|
||||
diff --git a/src/UserInterface/Button/letter_classify_button.cpp b/src/UserInterface/Button/letter_classify_button.cpp
|
||||
index 5bc882f..624c38e 100755
|
||||
--- a/src/UserInterface/Button/letter_classify_button.cpp
|
||||
+++ b/src/UserInterface/Button/letter_classify_button.cpp
|
||||
@@ -28,17 +28,17 @@ LetterClassifyButton::LetterClassifyButton(QWidget *parent,
|
||||
m_fullscreen(fullscreen)
|
||||
{
|
||||
this->setFlat(true);
|
||||
-
|
||||
- if (m_fullscreen) {
|
||||
- QFont font;
|
||||
- font.setPixelSize(Style::LeftLetterFontSize);
|
||||
- this->setFont(font);
|
||||
- QPalette pe = this->palette();
|
||||
- pe.setColor(QPalette::ButtonText, Qt::white);
|
||||
- this->setPalette(pe);
|
||||
- }
|
||||
-
|
||||
- this->setText(letter);
|
||||
+ m_letter = letter;
|
||||
+// if (m_fullscreen) {
|
||||
+// QFont font;
|
||||
+// font.setPixelSize(Style::LeftLetterFontSize);
|
||||
+// this->setFont(font);
|
||||
+// QPalette pe = this->palette();
|
||||
+// pe.setColor(QPalette::ButtonText, Qt::white);
|
||||
+// this->setPalette(pe);
|
||||
+// }
|
||||
+
|
||||
+// this->setText(letter);
|
||||
this->setFocusPolicy(Qt::NoFocus);
|
||||
this->setCheckable(true);
|
||||
this->setStyleSheet("padding: 0px;");
|
||||
@@ -82,6 +82,37 @@ void LetterClassifyButton::paintEvent(QPaintEvent *e)
|
||||
painter.restore();
|
||||
}
|
||||
|
||||
+ if (!(option.state & QStyle::State_Enabled)) {
|
||||
+ painter.save();
|
||||
+ QColor color;
|
||||
+ if (!m_fullscreen) {
|
||||
+ if ( g_curStyle == "ukui-light") {
|
||||
+ color = Qt::black;
|
||||
+ } else {
|
||||
+ color = Qt::white;
|
||||
+ }
|
||||
+ color.setAlphaF(0.2);
|
||||
+ }
|
||||
+ painter.setPen(color);
|
||||
+ painter.drawText(option.rect, Qt::AlignCenter, m_letter);
|
||||
+ painter.restore();
|
||||
+ }
|
||||
+
|
||||
+ if (option.state & QStyle::State_Enabled) {
|
||||
+ painter.save();
|
||||
+ QColor color;
|
||||
+
|
||||
+ if ( g_curStyle == "ukui-light") {
|
||||
+ color = Qt::black;
|
||||
+ } else {
|
||||
+ color = Qt::white;
|
||||
+ }
|
||||
+ color.setAlphaF(0.9);
|
||||
+ painter.setPen(color);
|
||||
+ painter.drawText(option.rect, Qt::AlignCenter, m_letter);
|
||||
+ painter.restore();
|
||||
+ }
|
||||
+
|
||||
if (m_fullscreen && (option.state & QStyle::State_On)) {
|
||||
painter.save();
|
||||
painter.setPen(Qt::NoPen);
|
||||
@@ -118,7 +149,7 @@ void LetterClassifyButton::enterEvent(QEvent *e)
|
||||
// this->setFixedSize(Style::LeftLetterBtnHeight*2,Style::LeftLetterBtnHeight*2);
|
||||
tooltip = new LetterToolTip();
|
||||
QPoint oPoint = this->mapToGlobal(QPoint(this->rect().x() + 35, this->rect().y() - 10));
|
||||
- tooltip->setText(this->text());
|
||||
+ tooltip->setText(m_letter);
|
||||
tooltip->raise();
|
||||
tooltip->move(oPoint);
|
||||
tooltip->show();
|
||||
diff --git a/src/UserInterface/Button/letter_classify_button.h b/src/UserInterface/Button/letter_classify_button.h
|
||||
index b6b2a3d..7235987 100755
|
||||
--- a/src/UserInterface/Button/letter_classify_button.h
|
||||
+++ b/src/UserInterface/Button/letter_classify_button.h
|
||||
@@ -35,7 +35,7 @@ public:
|
||||
);
|
||||
|
||||
bool is_pressed = false;
|
||||
-
|
||||
+ QString m_letter = QString();
|
||||
private:
|
||||
bool m_fullscreen = false;
|
||||
LetterToolTip *tooltip = nullptr;
|
||||
diff --git a/src/UserInterface/Widget/full_commonuse_widget.cpp b/src/UserInterface/Widget/full_commonuse_widget.cpp
|
||||
index c02f317..26d86b5 100755
|
||||
--- a/src/UserInterface/Widget/full_commonuse_widget.cpp
|
||||
+++ b/src/UserInterface/Widget/full_commonuse_widget.cpp
|
||||
@@ -119,13 +119,13 @@ void FullCommonUseWidget::initVerticalScrollBar()
|
||||
m_verticalScrollBar->show();
|
||||
}
|
||||
|
||||
- m_scrollBarStyle = QString("QScrollBar:vertical{width: %2px; background: rgba(12, 12, 12, 1); "
|
||||
+ m_scrollBarStyle = QString("QScrollBar:vertical{width: %2px; background: rgba(12, 12, 12, %4); "
|
||||
"margin: 0px,0px,0px,0px; border-radius: %3px;}"
|
||||
- "QScrollBar::handle:vertical{width: %2px; background: rgba(255, 255, 255, 1);"
|
||||
+ "QScrollBar::handle:vertical{width: %2px; background: rgba(255, 255, 255, %5);"
|
||||
"border-radius: %3px; min-height: %1;}"
|
||||
"QScrollBar::add-line:vertical{ height: 0px; width: 0px; subcontrol-position: bottom;}"
|
||||
"QScrollBar::sub-line:vertical{ height: 0px; width: 0px; subcontrol-position:top;}").arg(scrollBarSize);
|
||||
- m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(4).arg(2));
|
||||
+ m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(4).arg(2).arg(0.25).arg(0.6));
|
||||
}
|
||||
|
||||
void FullCommonUseWidget::on_powerOffButton_clicked()
|
||||
@@ -219,11 +219,15 @@ bool FullCommonUseWidget::eventFilter(QObject *watched, QEvent *event)
|
||||
|
||||
if (watched == m_verticalScrollBar) {
|
||||
if (event->type() == QEvent::Enter) {
|
||||
- m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(8).arg(4));
|
||||
+ m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(8).arg(4).arg(0.25).arg(0.78));
|
||||
}
|
||||
|
||||
if (event->type() == QEvent::Leave) {
|
||||
- m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(4).arg(2));
|
||||
+ m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(4).arg(2).arg(0.25).arg(0.6));
|
||||
+ }
|
||||
+
|
||||
+ if(event->type() == QEvent::MouseButtonPress) {
|
||||
+ m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(8).arg(4).arg(0.25).arg(0.9));
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/UserInterface/Widget/full_function_widget.cpp b/src/UserInterface/Widget/full_function_widget.cpp
|
||||
index fd124e4..7cc8464 100755
|
||||
--- a/src/UserInterface/Widget/full_function_widget.cpp
|
||||
+++ b/src/UserInterface/Widget/full_function_widget.cpp
|
||||
@@ -139,13 +139,13 @@ void FullFunctionWidget::initVerticalScrollBar()
|
||||
m_verticalScrollBar->show();
|
||||
}
|
||||
|
||||
- m_scrollBarStyle = QString("QScrollBar:vertical{width: %2px; background: rgba(12, 12, 12, 1); "
|
||||
+ m_scrollBarStyle = QString("QScrollBar:vertical{width: %2px; background: rgba(12, 12, 12, %4); "
|
||||
"margin: 0px,0px,0px,0px; border-radius: %3px;}"
|
||||
- "QScrollBar::handle:vertical{width: %2px; background: rgba(255, 255, 255, 1);"
|
||||
+ "QScrollBar::handle:vertical{width: %2px; background: rgba(255, 255, 255, %5);"
|
||||
"border-radius: %3px; min-height: %1;}"
|
||||
"QScrollBar::add-line:vertical{ height: 0px; width: 0px; subcontrol-position: bottom;}"
|
||||
"QScrollBar::sub-line:vertical{ height: 0px; width: 0px; subcontrol-position:top;}").arg(scrollBarSize);
|
||||
- m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(4).arg(2));
|
||||
+ m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(4).arg(2).arg(0.25).arg(0.6));
|
||||
}
|
||||
|
||||
void FullFunctionWidget::on_powerOffButton_clicked()
|
||||
@@ -505,11 +505,15 @@ bool FullFunctionWidget::eventFilter(QObject *watched, QEvent *event)
|
||||
if (watched == m_verticalScrollBar) {
|
||||
if (watched == m_verticalScrollBar) {
|
||||
if (event->type() == QEvent::Enter) {
|
||||
- m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(8).arg(4));
|
||||
+ m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(8).arg(4).arg(0.25).arg(0.78));
|
||||
}
|
||||
|
||||
if (event->type() == QEvent::Leave) {
|
||||
- m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(4).arg(2));
|
||||
+ m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(4).arg(2).arg(0.25).arg(0.6));
|
||||
+ }
|
||||
+
|
||||
+ if(event->type() == QEvent::MouseButtonPress) {
|
||||
+ m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(8).arg(4).arg(0.25).arg(0.9));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
diff --git a/src/UserInterface/Widget/full_letter_widget.cpp b/src/UserInterface/Widget/full_letter_widget.cpp
|
||||
index 45fb165..1ebc2c5 100755
|
||||
--- a/src/UserInterface/Widget/full_letter_widget.cpp
|
||||
+++ b/src/UserInterface/Widget/full_letter_widget.cpp
|
||||
@@ -133,13 +133,13 @@ void FullLetterWidget::initVerticalScrollBar()
|
||||
m_verticalScrollBar->show();
|
||||
}
|
||||
|
||||
- m_scrollBarStyle = QString("QScrollBar:vertical{width: %2px; background: rgba(12, 12, 12, 1); "
|
||||
+ m_scrollBarStyle = QString("QScrollBar:vertical{width: %2px; background: rgba(12, 12, 12, %4); "
|
||||
"margin: 0px,0px,0px,0px; border-radius: %3px;}"
|
||||
- "QScrollBar::handle:vertical{width: %2px; background: rgba(255, 255, 255, 1);"
|
||||
+ "QScrollBar::handle:vertical{width: %2px; background: rgba(255, 255, 255, %5);"
|
||||
"border-radius: %3px; min-height: %1;}"
|
||||
"QScrollBar::add-line:vertical{ height: 0px; width: 0px; subcontrol-position: bottom;}"
|
||||
"QScrollBar::sub-line:vertical{ height: 0px; width: 0px; subcontrol-position:top;}").arg(scrollBarSize);
|
||||
- m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(4).arg(2));
|
||||
+ m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(4).arg(2).arg(0.25).arg(0.6));
|
||||
}
|
||||
|
||||
void FullLetterWidget::on_powerOffButton_clicked()
|
||||
@@ -379,7 +379,7 @@ void FullLetterWidget::btnGroupClickedSlot(QAbstractButton *btn)
|
||||
if (m_btnGroup->id(btn) == m_buttonList.indexOf(button)) {
|
||||
letterbtn->setChecked(true);
|
||||
//此处需实现将被选定的字母包含的应用列表移动到applistWid界面最顶端
|
||||
- QString letterstr = letterbtn->text();
|
||||
+ QString letterstr = letterbtn->m_letter;
|
||||
int num = m_letterList.indexOf(letterstr);
|
||||
|
||||
if (num != -1) {
|
||||
@@ -531,11 +531,15 @@ bool FullLetterWidget::eventFilter(QObject *watched, QEvent *event)
|
||||
{
|
||||
if (watched == m_verticalScrollBar) {
|
||||
if (event->type() == QEvent::Enter) {
|
||||
- m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(8).arg(4));
|
||||
+ m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(8).arg(4).arg(0.25).arg(0.78));
|
||||
}
|
||||
|
||||
if (event->type() == QEvent::Leave) {
|
||||
- m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(4).arg(2));
|
||||
+ m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(4).arg(2).arg(0.25).arg(0.6));
|
||||
+ }
|
||||
+
|
||||
+ if(event->type() == QEvent::MouseButtonPress) {
|
||||
+ m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(8).arg(4).arg(0.25).arg(0.9));
|
||||
}
|
||||
} else {
|
||||
if (event->type() == QEvent::KeyPress) {
|
||||
diff --git a/src/UserInterface/Widget/full_searchresult_widget.cpp b/src/UserInterface/Widget/full_searchresult_widget.cpp
|
||||
index be5dd6b..efdee49 100755
|
||||
--- a/src/UserInterface/Widget/full_searchresult_widget.cpp
|
||||
+++ b/src/UserInterface/Widget/full_searchresult_widget.cpp
|
||||
@@ -108,13 +108,13 @@ void FullSearchResultWidget::initVerticalScrollBar()
|
||||
m_verticalScrollBar->show();
|
||||
}
|
||||
|
||||
- m_scrollBarStyle = QString("QScrollBar:vertical{width: %2px; background: rgba(12, 12, 12, 1); "
|
||||
+ m_scrollBarStyle = QString("QScrollBar:vertical{width: %2px; background: rgba(12, 12, 12, %4); "
|
||||
"margin: 0px,0px,0px,0px; border-radius: %3px;}"
|
||||
- "QScrollBar::handle:vertical{width: %2px; background: rgba(255, 255, 255, 1);"
|
||||
+ "QScrollBar::handle:vertical{width: %2px; background: rgba(255, 255, 255, %5);"
|
||||
"border-radius: %3px; min-height: %1;}"
|
||||
"QScrollBar::add-line:vertical{ height: 0px; width: 0px; subcontrol-position: bottom;}"
|
||||
"QScrollBar::sub-line:vertical{ height: 0px; width: 0px; subcontrol-position:top;}").arg(scrollBarSize);
|
||||
- m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(4).arg(2));
|
||||
+ m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(4).arg(2).arg(0.25).arg(0.6));
|
||||
}
|
||||
|
||||
void FullSearchResultWidget::on_powerOffButton_clicked()
|
||||
@@ -204,11 +204,15 @@ bool FullSearchResultWidget::eventFilter(QObject *watched, QEvent *event)
|
||||
|
||||
if (watched == m_verticalScrollBar) {
|
||||
if (event->type() == QEvent::Enter) {
|
||||
- m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(8).arg(4));
|
||||
+ m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(8).arg(4).arg(0.25).arg(0.78));
|
||||
}
|
||||
|
||||
if (event->type() == QEvent::Leave) {
|
||||
- m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(4).arg(2));
|
||||
+ m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(4).arg(2).arg(0.25).arg(0.6));
|
||||
+ }
|
||||
+
|
||||
+ if(event->type() == QEvent::MouseButtonPress) {
|
||||
+ m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(8).arg(4).arg(0.25).arg(0.9));
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/UserInterface/Widget/function_button_widget.cpp b/src/UserInterface/Widget/function_button_widget.cpp
|
||||
index cd7b8f8..dbb116c 100755
|
||||
--- a/src/UserInterface/Widget/function_button_widget.cpp
|
||||
+++ b/src/UserInterface/Widget/function_button_widget.cpp
|
||||
@@ -76,7 +76,7 @@ void FunctionButtonWidget::initUi()
|
||||
Q_FOREACH (QAbstractButton *btn, m_buttonList)
|
||||
{
|
||||
FunctionClassifyButton *fbtn = qobject_cast<FunctionClassifyButton *>(btn);
|
||||
- fbtn->updateIconState();
|
||||
+ fbtn->updateBtnState();
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -88,9 +88,7 @@ void FunctionButtonWidget::initUi()
|
||||
void FunctionButtonWidget::functionBtnClickedSlot()
|
||||
{
|
||||
FunctionClassifyButton *btn = dynamic_cast<FunctionClassifyButton *>(sender());
|
||||
- QWidget *wid = btn->layout()->itemAt(0)->widget();
|
||||
- QLabel *label = qobject_cast<QLabel *>(wid);
|
||||
- Q_EMIT sendFunctionBtnSignal(label->text());
|
||||
+ Q_EMIT sendFunctionBtnSignal(btn->m_category);
|
||||
}
|
||||
|
||||
void FunctionButtonWidget::hideEvent(QHideEvent *event)
|
||||
diff --git a/src/UserInterface/Widget/letter_button_widget.cpp b/src/UserInterface/Widget/letter_button_widget.cpp
|
||||
index 68e3a74..f110340 100755
|
||||
--- a/src/UserInterface/Widget/letter_button_widget.cpp
|
||||
+++ b/src/UserInterface/Widget/letter_button_widget.cpp
|
||||
@@ -47,7 +47,7 @@ void LetterButtonWidget::initUi()
|
||||
letterlist.append(QString(QChar(letter)));
|
||||
}
|
||||
|
||||
- letterlist.append("&&");
|
||||
+ letterlist.append("&");
|
||||
letterlist.append("#");
|
||||
|
||||
for (int row = 0; row < 6; row++) {
|
||||
@@ -78,7 +78,7 @@ void LetterButtonWidget::hideEvent(QHideEvent *event)
|
||||
void LetterButtonWidget::letterBtnClickedSlot()
|
||||
{
|
||||
LetterClassifyButton *btn = dynamic_cast<LetterClassifyButton *>(QObject::sender());
|
||||
- QString btnname = btn->text();
|
||||
+ QString btnname = btn->m_letter;
|
||||
Q_EMIT sendLetterBtnSignal(btnname);
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ void LetterButtonWidget::recvLetterBtnList(QStringList list)
|
||||
for (int col = 0; col < 4; col++) {
|
||||
QLayoutItem *item = gridLayout->itemAt(row * 4 + col);
|
||||
LetterClassifyButton *btn = static_cast<LetterClassifyButton *>(item->widget());
|
||||
- QString letterstr = btn->text();
|
||||
+ QString letterstr = btn->m_letter;
|
||||
|
||||
if (list.indexOf(letterstr.at(0)) == -1) {
|
||||
btn->setEnabled(false);
|
||||
diff --git a/src/UserInterface/full_mainwindow.cpp b/src/UserInterface/full_mainwindow.cpp
|
||||
index 3c77fd5..3ccb33f 100755
|
||||
--- a/src/UserInterface/full_mainwindow.cpp
|
||||
+++ b/src/UserInterface/full_mainwindow.cpp
|
||||
@@ -3,6 +3,7 @@
|
||||
#include <QAction>
|
||||
#include <QTranslator>
|
||||
#include "utility.h"
|
||||
+#include <QPalette>
|
||||
|
||||
FullMainWindow::FullMainWindow(QWidget *parent) :
|
||||
QMainWindow(parent)
|
||||
@@ -290,12 +291,15 @@ bool FullMainWindow::eventFilter(QObject *watched, QEvent *event)
|
||||
{
|
||||
if (watched == m_lineEdit) {
|
||||
m_isSearching = true;
|
||||
- char style[200];
|
||||
+ QString style;
|
||||
|
||||
if (event->type() == QEvent::FocusIn) {
|
||||
- sprintf(style, "QLineEdit{border:2px solid %s;background-color:%s;border-radius:17px;color:#ffffff;}",
|
||||
- QueryLineEditClickedBorder, QueryLineEditClickedBackground);
|
||||
+ QString highLightColor = QString::number(m_lineEdit->palette().color(QPalette::Highlight).rgba(), 16);
|
||||
+ QString color = highLightColor.mid(2, 6);
|
||||
+ style = QString("QLineEdit{border:2px solid #%1;background-color:%2;border-radius:17px;color:#ffffff;}")
|
||||
+ .arg(color).arg(QueryLineEditClickedBackground);
|
||||
m_lineEdit->setStyleSheet(style);
|
||||
+ myDebug() <<color << style;
|
||||
|
||||
if (m_lineEdit->text().isEmpty()) {
|
||||
qDebug() << "bool FullMainWindow::eventFilter(QObject *watched, QEvent *event)" << m_queryWid->layout()->count();
|
||||
@@ -310,8 +314,8 @@ bool FullMainWindow::eventFilter(QObject *watched, QEvent *event)
|
||||
m_lineEdit->setTextMargins(26, 0, 0, 0);
|
||||
}
|
||||
} else if (event->type() == QEvent::FocusOut && m_lineEdit->text().isEmpty()) {
|
||||
- sprintf(style, "QLineEdit{border:1px solid %s;background-color:%s;border-radius:17px;color:#ffffff;}",
|
||||
- QueryLineEditClickedBorderDefault, QueryLineEditClickedBackground);
|
||||
+ style = QString("QLineEdit{border:1px solid %1;background-color:%2;border-radius:17px;color:#ffffff;}")
|
||||
+ .arg(QueryLineEditClickedBorderDefault).arg(QueryLineEditClickedBackground);
|
||||
m_lineEdit->setStyleSheet(style);
|
||||
resetEditline();
|
||||
}
|
||||
diff --git a/src/UserInterface/mainwindow.cpp b/src/UserInterface/mainwindow.cpp
|
||||
index 1f09418..cc67dcb 100755
|
||||
--- a/src/UserInterface/mainwindow.cpp
|
||||
+++ b/src/UserInterface/mainwindow.cpp
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <QGroupBox>
|
||||
#include <QEventLoop>
|
||||
#include <QLabel>
|
||||
+#include <QPalette>
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent) :
|
||||
QMainWindow(parent)
|
||||
@@ -316,7 +317,10 @@ void MainWindow::initSearchUi()
|
||||
m_leftTopSearchHorizontalLayout->setContentsMargins(8, 0, 8, 0);
|
||||
m_lineEdit = new QLineEdit(m_minSearchPage);
|
||||
m_lineEdit->setMinimumSize(QSize(30, 26));
|
||||
- m_lineEdit->setStyleSheet(QString::fromUtf8("border-radius: 13px; border:1px solid rgba(5, 151, 255, 1); background: transparent;"));
|
||||
+ QString highLightColor = QString::number(m_lineEdit->palette().color(QPalette::Highlight).rgba(), 16);
|
||||
+ QString color = highLightColor.mid(2, 6);
|
||||
+ QString searchStyle = QString("border-radius: 13px; border:1px solid #%1; background: transparent;").arg(color);
|
||||
+ m_lineEdit->setStyleSheet(searchStyle);
|
||||
m_lineEdit->setFrame(false);
|
||||
m_lineEdit->setPlaceholderText(tr("Search"));
|
||||
m_lineEdit->installEventFilter(this);
|
||||
@@ -519,7 +523,7 @@ void MainWindow::windowOption()
|
||||
void MainWindow::initUi()
|
||||
{
|
||||
qDebug() << "init UI";
|
||||
- this->setWindowFlags(Qt::CustomizeWindowHint | Qt::FramelessWindowHint | Qt::X11BypassWindowManagerHint);
|
||||
+ this->setWindowFlags(Qt::CustomizeWindowHint | Qt::FramelessWindowHint | Qt::BypassWindowManagerHint);
|
||||
this->setAttribute(Qt::WA_TranslucentBackground, true);
|
||||
this->setAutoFillBackground(false);
|
||||
this->setFocusPolicy(Qt::NoFocus);
|
||||
@@ -558,11 +562,10 @@ void MainWindow::initUi()
|
||||
m_dropDownMenu->addAction(m_letterAction);
|
||||
m_dropDownMenu->addAction(m_funcAction);
|
||||
m_allAction->setChecked(true);
|
||||
- m_collectPushButton->setStyleSheet("color:#3790FA;");
|
||||
- QColor textColor = this->palette().color(QPalette::Text);
|
||||
- QRgb rgbDefault = qRgb(textColor.red(), textColor.green(), textColor.blue());
|
||||
- QString textColorDefault = "#" + QString::number(rgbDefault, 16);
|
||||
- m_recentPushButton->setStyleSheet(QString("color:%1;").arg(textColorDefault));
|
||||
+ QString textColorHightLight = QString::number(this->palette().color(QPalette::Highlight).rgba(), 16).mid(2, 6);
|
||||
+ m_collectPushButton->setStyleSheet(QString("color: #%1;").arg(textColorHightLight));
|
||||
+ QString textColorDefault = QString::number(this->palette().color(QPalette::Text).rgba(), 16).mid(2, 6);
|
||||
+ m_recentPushButton->setStyleSheet(QString("color: #%1;").arg(textColorDefault));
|
||||
QAction *action = new QAction();
|
||||
action->setIcon(getCurIcon(":/data/img/mainviewwidget/DM-icon-search.svg", true));
|
||||
m_lineEdit->addAction(action, QLineEdit::LeadingPosition);
|
||||
@@ -1209,13 +1212,12 @@ void MainWindow::on_collectPushButton_clicked()
|
||||
{
|
||||
m_rightStackedWidget->setCurrentIndex(0);
|
||||
|
||||
- m_collectPushButton->setStyleSheet("color:#3790FA;");
|
||||
+ QString textColorHightLight = QString::number(this->palette().color(QPalette::Highlight).rgba(), 16).mid(2, 6);
|
||||
+ m_collectPushButton->setStyleSheet(QString("color:#%1;").arg(textColorHightLight));
|
||||
QFont collectFont(QGuiApplication::font().family(), QGuiApplication::font().pointSize() + 2);
|
||||
m_collectPushButton->setFont(collectFont);
|
||||
- QColor textColor = this->palette().color(QPalette::Text);
|
||||
- QRgb rgbDefault = qRgb(textColor.red(), textColor.green(), textColor.blue());
|
||||
- QString textColorDefault = "#" + QString::number(rgbDefault, 16);
|
||||
- m_recentPushButton->setStyleSheet(QString("color:%1;").arg(textColorDefault));
|
||||
+ QString textColorDefault = QString::number(this->palette().color(QPalette::Text).rgba(), 16).mid(2, 6);
|
||||
+ m_recentPushButton->setStyleSheet(QString("color:#%1;").arg(textColorDefault));
|
||||
QFont recentFont(QGuiApplication::font().family(), QGuiApplication::font().pointSize());
|
||||
m_recentPushButton->setFont(recentFont);
|
||||
}
|
||||
@@ -1223,13 +1225,12 @@ void MainWindow::on_collectPushButton_clicked()
|
||||
void MainWindow::on_recentPushButton_clicked()
|
||||
{
|
||||
m_rightStackedWidget->setCurrentIndex(1);
|
||||
- QColor textColor = this->palette().color(QPalette::Text);
|
||||
- QRgb rgbDefault = qRgb(textColor.red(), textColor.green(), textColor.blue());
|
||||
- QString textColorDefault = "#" + QString::number(rgbDefault, 16);
|
||||
- m_collectPushButton->setStyleSheet(QString("color:%1").arg(textColorDefault));
|
||||
+ QString textColorDefault = QString::number(this->palette().color(QPalette::Text).rgba(), 16).mid(2, 6);
|
||||
+ m_collectPushButton->setStyleSheet(QString("color:#%1").arg(textColorDefault));
|
||||
QFont collectFont(QGuiApplication::font().family(), QGuiApplication::font().pointSize());
|
||||
m_collectPushButton->setFont(collectFont);
|
||||
- m_recentPushButton->setStyleSheet("color:#3790FA");
|
||||
+ QString textColorHightLight = QString::number(this->palette().color(QPalette::Highlight).rgba(), 16).mid(2, 6);
|
||||
+ m_recentPushButton->setStyleSheet(QString("color:#%1").arg(textColorHightLight));
|
||||
|
||||
QFont recentFont(QGuiApplication::font().family(), QGuiApplication::font().pointSize() + 2);
|
||||
m_recentPushButton->setFont(recentFont);
|
||||
129
0008-changelog.patch
Normal file
129
0008-changelog.patch
Normal file
@ -0,0 +1,129 @@
|
||||
From: lixueman <lixueman@kylinos.cn>
|
||||
Date: Thu, 21 Jul 2022 15:36:44 +0800
|
||||
Subject: =?utf-8?b?5pu05pawY2hhbmdlbG9n5L+h5oGv?=
|
||||
|
||||
---
|
||||
src/UserInterface/Button/function_classify_button.cpp | 11 ++++++++---
|
||||
src/UserInterface/Button/letter_classify_button.cpp | 11 ++++++++---
|
||||
src/UserInterface/full_mainwindow.cpp | 9 ++++++++-
|
||||
src/UserInterface/mainwindow.cpp | 18 +++++++++++++++++-
|
||||
4 files changed, 41 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/src/UserInterface/Button/function_classify_button.cpp b/src/UserInterface/Button/function_classify_button.cpp
|
||||
index 8ddabe1..ffed89c 100755
|
||||
--- a/src/UserInterface/Button/function_classify_button.cpp
|
||||
+++ b/src/UserInterface/Button/function_classify_button.cpp
|
||||
@@ -117,11 +117,16 @@ void FunctionClassifyButton::paintEvent(QPaintEvent *e)
|
||||
painter.save();
|
||||
QColor color;
|
||||
|
||||
- if ( g_curStyle == "ukui-light") {
|
||||
- color = Qt::black;
|
||||
+ if (m_fullscreen) {
|
||||
+ color = Qt::white;
|
||||
} else {
|
||||
- color = Qt::white;
|
||||
+ if ( g_curStyle == "ukui-light") {
|
||||
+ color = Qt::black;
|
||||
+ } else {
|
||||
+ color = Qt::white;
|
||||
+ }
|
||||
}
|
||||
+
|
||||
color.setAlphaF(0.9);
|
||||
painter.setPen(color);
|
||||
painter.drawText(option.rect, Qt::AlignCenter, m_category);
|
||||
diff --git a/src/UserInterface/Button/letter_classify_button.cpp b/src/UserInterface/Button/letter_classify_button.cpp
|
||||
index 624c38e..11073a8 100755
|
||||
--- a/src/UserInterface/Button/letter_classify_button.cpp
|
||||
+++ b/src/UserInterface/Button/letter_classify_button.cpp
|
||||
@@ -102,11 +102,16 @@ void LetterClassifyButton::paintEvent(QPaintEvent *e)
|
||||
painter.save();
|
||||
QColor color;
|
||||
|
||||
- if ( g_curStyle == "ukui-light") {
|
||||
- color = Qt::black;
|
||||
+ if (m_fullscreen) {
|
||||
+ color = Qt::white;
|
||||
} else {
|
||||
- color = Qt::white;
|
||||
+ if ( g_curStyle == "ukui-light") {
|
||||
+ color = Qt::black;
|
||||
+ } else {
|
||||
+ color = Qt::white;
|
||||
+ }
|
||||
}
|
||||
+
|
||||
color.setAlphaF(0.9);
|
||||
painter.setPen(color);
|
||||
painter.drawText(option.rect, Qt::AlignCenter, m_letter);
|
||||
diff --git a/src/UserInterface/full_mainwindow.cpp b/src/UserInterface/full_mainwindow.cpp
|
||||
index 3ccb33f..555c6a6 100755
|
||||
--- a/src/UserInterface/full_mainwindow.cpp
|
||||
+++ b/src/UserInterface/full_mainwindow.cpp
|
||||
@@ -123,6 +123,13 @@ void FullMainWindow::initSearchUI()
|
||||
if (key.contains(QString("styleName"))) {
|
||||
changeStyle();
|
||||
}
|
||||
+
|
||||
+ if (key.contains(QString("theme-color"))) {
|
||||
+ QString highLightColor = QString::number(this->palette().color(QPalette::Highlight).rgba(), 16);
|
||||
+ QString color = highLightColor.mid(2, 6);
|
||||
+ QString searchStyle = QString("border-radius: 13px; border:1px solid #%1; background: transparent;").arg(color);
|
||||
+ m_lineEdit->setStyleSheet(searchStyle);
|
||||
+ }
|
||||
});
|
||||
}
|
||||
|
||||
@@ -294,7 +301,7 @@ bool FullMainWindow::eventFilter(QObject *watched, QEvent *event)
|
||||
QString style;
|
||||
|
||||
if (event->type() == QEvent::FocusIn) {
|
||||
- QString highLightColor = QString::number(m_lineEdit->palette().color(QPalette::Highlight).rgba(), 16);
|
||||
+ QString highLightColor = QString::number(this->palette().color(QPalette::Highlight).rgba(), 16);
|
||||
QString color = highLightColor.mid(2, 6);
|
||||
style = QString("QLineEdit{border:2px solid #%1;background-color:%2;border-radius:17px;color:#ffffff;}")
|
||||
.arg(color).arg(QueryLineEditClickedBackground);
|
||||
diff --git a/src/UserInterface/mainwindow.cpp b/src/UserInterface/mainwindow.cpp
|
||||
index cc67dcb..355a8bd 100755
|
||||
--- a/src/UserInterface/mainwindow.cpp
|
||||
+++ b/src/UserInterface/mainwindow.cpp
|
||||
@@ -275,6 +275,13 @@ void MainWindow::initGsettings()
|
||||
if (key.contains(QString("styleName"))) {
|
||||
changeStyle();
|
||||
}
|
||||
+
|
||||
+ if (key.contains(QString("theme-color"))) {
|
||||
+ QString highLightColor = QString::number(this->palette().color(QPalette::Highlight).rgba(), 16);
|
||||
+ QString color = highLightColor.mid(2, 6);
|
||||
+ QString searchStyle = QString("border-radius: 13px; border:1px solid #%1; background: transparent;").arg(color);
|
||||
+ m_lineEdit->setStyleSheet(searchStyle);
|
||||
+ }
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -317,7 +324,7 @@ void MainWindow::initSearchUi()
|
||||
m_leftTopSearchHorizontalLayout->setContentsMargins(8, 0, 8, 0);
|
||||
m_lineEdit = new QLineEdit(m_minSearchPage);
|
||||
m_lineEdit->setMinimumSize(QSize(30, 26));
|
||||
- QString highLightColor = QString::number(m_lineEdit->palette().color(QPalette::Highlight).rgba(), 16);
|
||||
+ QString highLightColor = QString::number(this->palette().color(QPalette::Highlight).rgba(), 16);
|
||||
QString color = highLightColor.mid(2, 6);
|
||||
QString searchStyle = QString("border-radius: 13px; border:1px solid #%1; background: transparent;").arg(color);
|
||||
m_lineEdit->setStyleSheet(searchStyle);
|
||||
@@ -942,6 +949,15 @@ bool MainWindow::eventFilter(QObject *target, QEvent *event)
|
||||
}
|
||||
}
|
||||
|
||||
+ if (target == m_lineEdit) {
|
||||
+ if (event->type() == QEvent::FocusIn) {
|
||||
+ QString highLightColor = QString::number(this->palette().color(QPalette::Highlight).rgba(), 16);
|
||||
+ QString color = highLightColor.mid(2, 6);
|
||||
+ QString searchStyle = QString("border-radius: 13px; border:1px solid #%1; background: transparent;").arg(color);
|
||||
+ m_lineEdit->setStyleSheet(searchStyle);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
if (event->type() == QEvent::KeyPress) {
|
||||
QKeyEvent *ke = (QKeyEvent *)event;
|
||||
|
||||
Binary file not shown.
BIN
ukui-menu-3.1.1.tar.gz
Normal file
BIN
ukui-menu-3.1.1.tar.gz
Normal file
Binary file not shown.
@ -1,13 +1,21 @@
|
||||
%define debug_package %{nil}
|
||||
|
||||
Name: ukui-menu
|
||||
Version: 3.0.3
|
||||
Release: 2
|
||||
Version: 3.1.1
|
||||
Release: 10
|
||||
Summary: Advanced ukui menu
|
||||
License: GPL-3.0
|
||||
License: GPL-3.0-or-later
|
||||
URL: http://www.ukui.org
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
Patch1: 0001-fix-uninstall-failed-issue.patch
|
||||
Patch01: 0001-fix-uninstall-failed-issue.patch
|
||||
Patch02: 0002-fix-coredump-of-ukui-menu.patch
|
||||
patch03: 0003-add-ukui-log4qt.patch
|
||||
patch04: 0001-4-wayland.patch
|
||||
patch05: 0002-5-platformName-update-debian-changelog.-platformName.patch
|
||||
patch06: 0003-.patch
|
||||
patch07: 0004-7-close-cd-128489.patch
|
||||
patch08: 0005-8-wayland.patch
|
||||
patch09: 0006-changelog.patch
|
||||
patch10: 0007-changelog.patch
|
||||
patch11: 0008-changelog.patch
|
||||
|
||||
BuildRequires: qt5-qtbase-devel
|
||||
BuildRequires: libqtxdg-devel
|
||||
@ -20,12 +28,14 @@ BuildRequires: libXtst-devel
|
||||
BuildRequires: libX11-devel
|
||||
BuildRequires: qt5-qttools-devel
|
||||
BuildRequires: kf5-kwindowsystem-devel
|
||||
BuildRequires: uchardet-devel
|
||||
BuildRequires: uchardet-devel ukui-interface peony libpeony-dev
|
||||
BuildRequires: libkysdk-waylandhelper-devel
|
||||
|
||||
Requires: gsettings-qt
|
||||
Requires: qt5-qtx11extras
|
||||
Requires: bamf-daemon
|
||||
Requires: accountsservice
|
||||
Requires: libkysdk-waylandhelper
|
||||
|
||||
|
||||
#BuildArch: noarch
|
||||
@ -37,19 +47,17 @@ Requires: accountsservice
|
||||
The package contains executable file.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1 -p1
|
||||
%autosetup -n %{name}-%{version} -p1
|
||||
|
||||
%build
|
||||
mkdir build && cd build
|
||||
qmake-qt5 ..
|
||||
make
|
||||
%{qmake_qt5} ..
|
||||
%{make_build}
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
cd %{_builddir}/%{name}-%{version}/build
|
||||
make INSTALL_ROOT=%{buildroot} install
|
||||
#make DESTDIR=$RPM_BUILD_ROOT install
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
@ -60,11 +68,62 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_datadir}/ukui-menu/translations/
|
||||
|
||||
%changelog
|
||||
* Tue Mar 29 2022 pei-jiankang <peijiankang@kylinos.cn> - 3.0.3-2
|
||||
- fix uninstalled failed issue
|
||||
* Fri May 12 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.1-10
|
||||
- add 0006-changelog.patch 0007-changelog.patch 0008-changelog.patch
|
||||
|
||||
* Mon Oct 26 2020 huayadong <huayadong@kylinos.cn> - 3.0.3-1
|
||||
- update to upstream version 3.0.3-1
|
||||
* Tue Feb 21 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.1-9
|
||||
- add 0005-8-wayland.patch
|
||||
|
||||
* Mon Feb 20 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.1-8
|
||||
- add 0004-7-close-cd-128489.patch
|
||||
|
||||
* Fri Feb 17 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.1-7
|
||||
- add execapp
|
||||
|
||||
* Thu Feb 16 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.1-6
|
||||
- update platformName
|
||||
|
||||
* Wed Feb 15 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.1-5
|
||||
- add 0003-add-ukui-log4qt.patch
|
||||
|
||||
* Fri Feb 10 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.1-4
|
||||
- fix coredump of ukui-menu
|
||||
|
||||
* Wed Feb 1 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.1-3
|
||||
- fix uninstall failed issue
|
||||
|
||||
* Tue Jan 17 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.1-2
|
||||
- add build debuginfo and debugsource
|
||||
|
||||
* Thu Dec 01 2022 tanyulong <tanyulong@kylinos.cn> - 3.1.1-1
|
||||
- update upstream version 3.1.1
|
||||
|
||||
* Mon Aug 8 2022 huayadong <huayadong@kylinos.cn> - 3.0.2-11
|
||||
- Fixed application icon dragging problem
|
||||
|
||||
* Mon Aug 8 2022 huayadong <huayadong@kylinos.cn> - 3.0.2-10
|
||||
- Fixed right click exception popover problem
|
||||
|
||||
* Mon Aug 8 2022 huayadong <huayadong@kylinos.cn> - 3.0.2-9
|
||||
- add optimize the interaction strategy with the taskbar
|
||||
|
||||
* Wed Jun 29 2022 huayadong <huayadong@kylinos.cn> - 3.0.2-8
|
||||
- Fixed size problem with multiple screens
|
||||
|
||||
* Fri May 20 2022 tanyulong <tanyulong@kylinos.cn> - 3.0.2-7
|
||||
- Improve the project according to the requirements of compliance improvement
|
||||
|
||||
* Sat Apr 02 2022 tanyulong <tanyulong@kylinos.cn> - 3.0.2-6
|
||||
- modify yaml file error
|
||||
|
||||
* Mon Mar 28 2022 huayadong <huayadong@kylinos.cn> - 3.0.2-5
|
||||
- Fix crashes when installing or uninstalling software
|
||||
|
||||
* Fri Dec 10 2021 huayadong <huayadong@kylinos.cn> - 3.0.2-4
|
||||
- add patch:0262-Adapt-the-light-color-theme.patch
|
||||
|
||||
* Tue Dec 07 2021 huayadong <huayadong@kylinos.cn> - 3.0.2-3
|
||||
- add patch: 0001-Optimize-Chinese-search.patch
|
||||
|
||||
* Mon Oct 26 2020 douyan <douyan@kylinos.cn> - 3.0.2-2
|
||||
- fix uninstalled failed issue
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
version_control: github
|
||||
src_repo: https://github.com/ukui/ukui-menu.git
|
||||
src_repo: UKUI/ukui-menu
|
||||
tag_prefix: "v"
|
||||
seperator: "."
|
||||
separator: "."
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user