add patch from openkylin
(cherry picked from commit 49080eb14485c039ea6bdf00f09cff10c0c98c9f)
This commit is contained in:
parent
9e354ebc7f
commit
3eb98cb553
@ -1,18 +1,21 @@
|
||||
From b8df82788c21c4e768b55e9a09f6d61f44febd5f Mon Sep 17 00:00:00 2001
|
||||
From c4cdc73946990ddfb9aa24e8a394ab77a49baf3e 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
|
||||
Date: Wed, 24 May 2023 12:45:45 +0800
|
||||
Subject: [PATCH] fix-uninstall-failed-issue
|
||||
|
||||
---
|
||||
.../RightClickMenu/rightclickmenu.cpp | 50 +++++++++-
|
||||
.../RightClickMenu/rightclickmenu.h | 6 ++
|
||||
3 files changed, 51 insertions(+), 5 deletions(-)
|
||||
.../RightClickMenu/rightclickmenu.cpp | 62 +++-
|
||||
.../RightClickMenu/rightclickmenu.h | 4 +
|
||||
translations/ukui-menu_zh_CN.ts | 97 ++++--
|
||||
translations/ukui-menu_zh_CN.ts_back | 322 ++++++++++++++++++
|
||||
4 files changed, 442 insertions(+), 43 deletions(-)
|
||||
create mode 100755 translations/ukui-menu_zh_CN.ts_back
|
||||
|
||||
diff --git a/src/UserInterface/RightClickMenu/rightclickmenu.cpp b/src/UserInterface/RightClickMenu/rightclickmenu.cpp
|
||||
index 45f7b46..40d58e0 100755
|
||||
index de3cc85..3db1762 100755
|
||||
--- a/src/UserInterface/RightClickMenu/rightclickmenu.cpp
|
||||
+++ b/src/UserInterface/RightClickMenu/rightclickmenu.cpp
|
||||
@@ -19,11 +19,15 @@
|
||||
@@ -18,11 +18,15 @@
|
||||
#include "rightclickmenu.h"
|
||||
#include "src/UtilityFunction/utility.h"
|
||||
#include <QDebug>
|
||||
@ -28,7 +31,7 @@ index 45f7b46..40d58e0 100755
|
||||
m_whiteList.append("kylin-screenshot.desktop");
|
||||
m_whiteList.append("ukui-notebook.desktop");
|
||||
m_whiteList.append("ukui-clock.desktop");
|
||||
@@ -141,14 +145,50 @@ void RightClickMenu::addToDesktopActionTriggerSlot()
|
||||
@@ -177,14 +181,56 @@ void RightClickMenu::addToDesktopActionTriggerSlot()
|
||||
|
||||
void RightClickMenu::uninstallActionTriggerSlot()
|
||||
{
|
||||
@ -36,13 +39,14 @@ index 45f7b46..40d58e0 100755
|
||||
- .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();
|
||||
+ myDebug() << "卸载:" << cmd;
|
||||
myDebug() << "kylin-uninstaller";
|
||||
m_actionNumber = 6;
|
||||
}
|
||||
|
||||
@ -63,44 +67,619 @@ index 45f7b46..40d58e0 100755
|
||||
+ 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);
|
||||
+
|
||||
+ if(!bFail)
|
||||
+
|
||||
+ if(!result2.isEmpty() && !bFail)
|
||||
+ {
|
||||
+ QMessageBox::information(this,tr("infomation"),tr("Uninstall finished!"));
|
||||
+ }
|
||||
+ else {
|
||||
+ else if(result2.isEmpty()) {
|
||||
+ QMessageBox::information(this,tr("error"), tr("timeout!"));
|
||||
+ }
|
||||
+ else {
|
||||
+ QMessageBox::information(this,tr("error"), errorInfo1);
|
||||
+ }
|
||||
+
|
||||
+ QKeyEvent event(QEvent::KeyPress, Qt::Key_Menu,Qt::NoModifier);
|
||||
+ QCoreApplication::sendEvent(this->parent(),&event);
|
||||
+ tempProcess.close();
|
||||
+}
|
||||
+
|
||||
+
|
||||
void RightClickMenu::attributeActionTriggerSlot()
|
||||
{
|
||||
char command[100];
|
||||
@@ -286,9 +332,11 @@ int RightClickMenu::showAppBtnMenu(const QPoint &pos, QString desktopfp)
|
||||
|
||||
m_showAppMenu.addSeparator();
|
||||
|
||||
- if (!m_whiteList.contains(desktopfn))
|
||||
- m_showAppMenu.addAction(QIcon(getIconPixmap(":/data/img/mainviewwidget/uninstall.svg", 0)), tr("Uninstall"),
|
||||
- this, SLOT(uninstallActionTriggerSlot()));
|
||||
+ if(!g_isFullScreen){
|
||||
+ if (!m_whiteList.contains(desktopfn))
|
||||
+ m_showAppMenu.addAction(QIcon(getIconPixmap(":/data/img/mainviewwidget/uninstall.svg", 0)), tr("Uninstall"),
|
||||
+ this, SLOT(uninstallActionTriggerSlot()));
|
||||
+ }
|
||||
|
||||
m_showAppMenu.setAttribute(Qt::WA_TranslucentBackground);
|
||||
m_showAppMenu.setAttribute(Qt::WA_DeleteOnClose);
|
||||
diff --git a/src/UserInterface/RightClickMenu/rightclickmenu.h b/src/UserInterface/RightClickMenu/rightclickmenu.h
|
||||
index a96c65d..bba9cf1 100755
|
||||
index 573b08e..c4d5968 100755
|
||||
--- a/src/UserInterface/RightClickMenu/rightclickmenu.h
|
||||
+++ b/src/UserInterface/RightClickMenu/rightclickmenu.h
|
||||
@@ -117,6 +117,12 @@ private Q_SLOTS:
|
||||
@@ -119,6 +119,10 @@ private Q_SLOTS:
|
||||
* @brief Uninstall
|
||||
*/
|
||||
void uninstallActionTriggerSlot();
|
||||
+
|
||||
+ /**
|
||||
+ * @brief Read command output
|
||||
+ */
|
||||
+ void onReadOutput();
|
||||
+
|
||||
/**
|
||||
* @brief Attribute
|
||||
*/
|
||||
diff --git a/translations/ukui-menu_zh_CN.ts b/translations/ukui-menu_zh_CN.ts
|
||||
index 59aa5fd..e35f008 100755
|
||||
--- a/translations/ukui-menu_zh_CN.ts
|
||||
+++ b/translations/ukui-menu_zh_CN.ts
|
||||
@@ -43,18 +43,18 @@
|
||||
<translation type="vanished">打开字母排序菜单</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/UserInterface/ViewItem/itemdelegate.cpp" line="179"/>
|
||||
+ <location filename="../src/UserInterface/ViewItem/itemdelegate.cpp" line="178"/>
|
||||
<source>Open the function sort menu</source>
|
||||
<translation>打开功能排序菜单</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/UserInterface/ViewItem/itemdelegate.cpp" line="181"/>
|
||||
+ <location filename="../src/UserInterface/ViewItem/itemdelegate.cpp" line="180"/>
|
||||
<source>Open the alphabetical menu</source>
|
||||
<translation>打开字母排序菜单</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/UserInterface/ViewItem/itemdelegate.cpp" line="251"/>
|
||||
- <location filename="../src/UserInterface/ViewItem/itemdelegate.cpp" line="253"/>
|
||||
+ <location filename="../src/UserInterface/ViewItem/itemdelegate.cpp" line="250"/>
|
||||
+ <location filename="../src/UserInterface/ViewItem/itemdelegate.cpp" line="252"/>
|
||||
<source>path:</source>
|
||||
<translation>路径:</translation>
|
||||
</message>
|
||||
@@ -72,36 +72,36 @@
|
||||
<translation>搜索应用</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/UserInterface/mainwindow.cpp" line="452"/>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="453"/>
|
||||
<source>No recent files</source>
|
||||
<translation>暂无最近文件</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/UserInterface/mainwindow.cpp" line="312"/>
|
||||
- <location filename="../src/UserInterface/mainwindow.cpp" line="493"/>
|
||||
- <location filename="../src/UserInterface/mainwindow.cpp" line="562"/>
|
||||
- <location filename="../src/UserInterface/mainwindow.cpp" line="1161"/>
|
||||
- <location filename="../src/UserInterface/mainwindow.cpp" line="1162"/>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="494"/>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="563"/>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="1175"/>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="1176"/>
|
||||
<source>All</source>
|
||||
<translation>全部</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/UserInterface/mainwindow.cpp" line="500"/>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="501"/>
|
||||
<source>collection</source>
|
||||
<translation>收藏</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/UserInterface/mainwindow.cpp" line="501"/>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="502"/>
|
||||
<source>recent</source>
|
||||
<translation>最近</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/UserInterface/mainwindow.cpp" line="502"/>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="503"/>
|
||||
<source>Max</source>
|
||||
<translation>放大</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/UserInterface/mainwindow.cpp" line="504"/>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="505"/>
|
||||
<source>PowerOff</source>
|
||||
<translation>电源</translation>
|
||||
</message>
|
||||
@@ -110,16 +110,16 @@
|
||||
<translation type="vanished">搜索应用</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/UserInterface/mainwindow.cpp" line="564"/>
|
||||
- <location filename="../src/UserInterface/mainwindow.cpp" line="1170"/>
|
||||
- <location filename="../src/UserInterface/mainwindow.cpp" line="1171"/>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="565"/>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="1184"/>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="1185"/>
|
||||
<source>Letter</source>
|
||||
<translation>字母排序</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/UserInterface/mainwindow.cpp" line="566"/>
|
||||
- <location filename="../src/UserInterface/mainwindow.cpp" line="1179"/>
|
||||
- <location filename="../src/UserInterface/mainwindow.cpp" line="1180"/>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="567"/>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="1193"/>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="1194"/>
|
||||
<source>Function</source>
|
||||
<translation>功能分类</translation>
|
||||
</message>
|
||||
@@ -196,82 +196,103 @@
|
||||
<context>
|
||||
<name>RightClickMenu</name>
|
||||
<message>
|
||||
- <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="249"/>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="221"/>
|
||||
+ <source>infomation</source>
|
||||
+ <translation>提示</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="221"/>
|
||||
+ <source>Uninstall finished!</source>
|
||||
+ <translation>卸载成功!</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="224"/>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="227"/>
|
||||
+ <source>error</source>
|
||||
+ <translation>错误</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="224"/>
|
||||
+ <source>timeout!</source>
|
||||
+ <translation>超时!</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="296"/>
|
||||
<source>Pin to all</source>
|
||||
<translation>固定到“所有软件”</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="252"/>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="299"/>
|
||||
<source>Unpin from all</source>
|
||||
<translation>从“所有软件”取消固定</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="262"/>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="309"/>
|
||||
<source>Pin to taskbar</source>
|
||||
<translation>固定到任务栏</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="265"/>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="312"/>
|
||||
<source>Unpin from taskbar</source>
|
||||
<translation>从任务栏取消固定</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="268"/>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="315"/>
|
||||
<source>Add to desktop shortcuts</source>
|
||||
<translation>添加到桌面快捷方式</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="272"/>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="319"/>
|
||||
<source>Pin to collection</source>
|
||||
<translation>固定到收藏</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="275"/>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="322"/>
|
||||
<source>Remove from collection</source>
|
||||
<translation>从收藏移除</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="290"/>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="338"/>
|
||||
<source>Uninstall</source>
|
||||
<translation>卸载</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="310"/>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="359"/>
|
||||
<source>Switch user</source>
|
||||
<translation>切换用户</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="317"/>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="366"/>
|
||||
<source>Hibernate</source>
|
||||
<translation>休眠</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="324"/>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="373"/>
|
||||
<source>Sleep</source>
|
||||
<translation>睡眠</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="328"/>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="377"/>
|
||||
<source>Lock Screen</source>
|
||||
<translation>锁屏</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="333"/>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="382"/>
|
||||
<source>Log Out</source>
|
||||
<translation>注销</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="340"/>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="389"/>
|
||||
<source>Restart</source>
|
||||
<translation>重启</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="347"/>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="396"/>
|
||||
<source>Power Off</source>
|
||||
<translation>关机</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="383"/>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="432"/>
|
||||
<source>Personalize this list</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@@ -295,8 +316,12 @@
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/UserInterface/RightClickMenu/tabletrightclickmenu.cpp" line="247"/>
|
||||
+ <source>Uninstall2</source>
|
||||
+ <translation type="unfinished"></translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
<source>Uninstall</source>
|
||||
- <translation>卸载</translation>
|
||||
+ <translation type="vanished">卸载</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
diff --git a/translations/ukui-menu_zh_CN.ts_back b/translations/ukui-menu_zh_CN.ts_back
|
||||
new file mode 100755
|
||||
index 0000000..8ce304a
|
||||
--- /dev/null
|
||||
+++ b/translations/ukui-menu_zh_CN.ts_back
|
||||
@@ -0,0 +1,322 @@
|
||||
+<?xml version="1.0" encoding="utf-8"?>
|
||||
+<!DOCTYPE TS>
|
||||
+<TS version="2.1" language="zh_CN">
|
||||
+<context>
|
||||
+ <name>FullMainWindow</name>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/full_mainwindow.cpp" line="162"/>
|
||||
+ <source>Search</source>
|
||||
+ <translation>搜索应用</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/full_mainwindow.cpp" line="200"/>
|
||||
+ <source>All</source>
|
||||
+ <translation>全部</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/full_mainwindow.cpp" line="202"/>
|
||||
+ <source>Letter</source>
|
||||
+ <translation>字母排序</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/full_mainwindow.cpp" line="204"/>
|
||||
+ <source>Function</source>
|
||||
+ <translation>功能分类</translation>
|
||||
+ </message>
|
||||
+</context>
|
||||
+<context>
|
||||
+ <name>FunctionWidget</name>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/Widget/function_Widget.cpp" line="215"/>
|
||||
+ <source>Search</source>
|
||||
+ <translation>全局搜索</translation>
|
||||
+ </message>
|
||||
+</context>
|
||||
+<context>
|
||||
+ <name>ItemDelegate</name>
|
||||
+ <message>
|
||||
+ <source>Open feature sort list</source>
|
||||
+ <translation type="vanished">打开功能排序菜单</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <source>Open alphabetical list</source>
|
||||
+ <translation type="vanished">打开字母排序菜单</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/ViewItem/itemdelegate.cpp" line="178"/>
|
||||
+ <source>Open the function sort menu</source>
|
||||
+ <translation>打开功能排序菜单</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/ViewItem/itemdelegate.cpp" line="180"/>
|
||||
+ <source>Open the alphabetical menu</source>
|
||||
+ <translation>打开字母排序菜单</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/ViewItem/itemdelegate.cpp" line="250"/>
|
||||
+ <location filename="../src/UserInterface/ViewItem/itemdelegate.cpp" line="252"/>
|
||||
+ <source>path:</source>
|
||||
+ <translation>路径:</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <source>path</source>
|
||||
+ <translation type="obsolete">路径</translation>
|
||||
+ </message>
|
||||
+</context>
|
||||
+<context>
|
||||
+ <name>MainWindow</name>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="308"/>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="333"/>
|
||||
+ <source>Search</source>
|
||||
+ <translation>搜索应用</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="453"/>
|
||||
+ <source>No recent files</source>
|
||||
+ <translation>暂无最近文件</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="312"/>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="494"/>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="563"/>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="1175"/>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="1176"/>
|
||||
+ <source>All</source>
|
||||
+ <translation>全部</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="501"/>
|
||||
+ <source>collection</source>
|
||||
+ <translation>收藏</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="502"/>
|
||||
+ <source>recent</source>
|
||||
+ <translation>最近</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="503"/>
|
||||
+ <source>Max</source>
|
||||
+ <translation>放大</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="505"/>
|
||||
+ <source>PowerOff</source>
|
||||
+ <translation>电源</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <source>Search application</source>
|
||||
+ <translation type="vanished">搜索应用</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="565"/>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="1184"/>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="1185"/>
|
||||
+ <source>Letter</source>
|
||||
+ <translation>字母排序</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="567"/>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="1193"/>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="1194"/>
|
||||
+ <source>Function</source>
|
||||
+ <translation>功能分类</translation>
|
||||
+ </message>
|
||||
+</context>
|
||||
+<context>
|
||||
+ <name>QObject</name>
|
||||
+ <message>
|
||||
+ <location filename="../src/BackProcess/Interface/ukuimenuinterface.cpp" line="72"/>
|
||||
+ <location filename="../src/UserInterface/Widget/function_button_widget.cpp" line="28"/>
|
||||
+ <source>Office</source>
|
||||
+ <translation>办公</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/BackProcess/Interface/ukuimenuinterface.cpp" line="73"/>
|
||||
+ <location filename="../src/UserInterface/Widget/function_button_widget.cpp" line="29"/>
|
||||
+ <source>Development</source>
|
||||
+ <translation>开发</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/BackProcess/Interface/ukuimenuinterface.cpp" line="74"/>
|
||||
+ <location filename="../src/UserInterface/Widget/function_button_widget.cpp" line="30"/>
|
||||
+ <source>Image</source>
|
||||
+ <translation>图像</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/BackProcess/Interface/ukuimenuinterface.cpp" line="75"/>
|
||||
+ <location filename="../src/UserInterface/Widget/function_button_widget.cpp" line="31"/>
|
||||
+ <source>Video</source>
|
||||
+ <translation>影音</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/BackProcess/Interface/ukuimenuinterface.cpp" line="76"/>
|
||||
+ <location filename="../src/UserInterface/Widget/function_button_widget.cpp" line="32"/>
|
||||
+ <source>Internet</source>
|
||||
+ <translation>网络</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/BackProcess/Interface/ukuimenuinterface.cpp" line="77"/>
|
||||
+ <location filename="../src/UserInterface/Widget/function_button_widget.cpp" line="33"/>
|
||||
+ <source>Game</source>
|
||||
+ <translation>游戏</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/BackProcess/Interface/ukuimenuinterface.cpp" line="78"/>
|
||||
+ <location filename="../src/UserInterface/Widget/function_button_widget.cpp" line="34"/>
|
||||
+ <source>Education</source>
|
||||
+ <translation>教育</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/BackProcess/Interface/ukuimenuinterface.cpp" line="79"/>
|
||||
+ <location filename="../src/UserInterface/Widget/function_button_widget.cpp" line="35"/>
|
||||
+ <source>Social</source>
|
||||
+ <translation>社交</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/BackProcess/Interface/ukuimenuinterface.cpp" line="80"/>
|
||||
+ <location filename="../src/UserInterface/Widget/function_button_widget.cpp" line="36"/>
|
||||
+ <source>System</source>
|
||||
+ <translation>系统</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/BackProcess/Interface/ukuimenuinterface.cpp" line="81"/>
|
||||
+ <location filename="../src/UserInterface/Widget/function_button_widget.cpp" line="37"/>
|
||||
+ <source>Safe</source>
|
||||
+ <translation>安全</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/BackProcess/Interface/ukuimenuinterface.cpp" line="82"/>
|
||||
+ <location filename="../src/UserInterface/Widget/function_button_widget.cpp" line="38"/>
|
||||
+ <source>Others</source>
|
||||
+ <translation>其他</translation>
|
||||
+ </message>
|
||||
+</context>
|
||||
+<context>
|
||||
+ <name>RightClickMenu</name>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="220"/>
|
||||
+ <source>infomation</source>
|
||||
+ <translation>提示</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="220"/>
|
||||
+ <source>Uninstall finished!</source>
|
||||
+ <translation>卸载成功!</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="223"/>
|
||||
+ <source>error</source>
|
||||
+ <translation>错误</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="223"/>
|
||||
+ <source>timeout!</source>
|
||||
+ <translation>超时!</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="290"/>
|
||||
+ <source>Pin to all</source>
|
||||
+ <translation>固定到“所有软件”</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="293"/>
|
||||
+ <source>Unpin from all</source>
|
||||
+ <translation>从“所有软件”取消固定</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="303"/>
|
||||
+ <source>Pin to taskbar</source>
|
||||
+ <translation>固定到任务栏</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="306"/>
|
||||
+ <source>Unpin from taskbar</source>
|
||||
+ <translation>从任务栏取消固定</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="309"/>
|
||||
+ <source>Add to desktop shortcuts</source>
|
||||
+ <translation>添加到桌面快捷方式</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="313"/>
|
||||
+ <source>Pin to collection</source>
|
||||
+ <translation>固定到收藏</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="316"/>
|
||||
+ <source>Remove from collection</source>
|
||||
+ <translation>从收藏移除</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="331"/>
|
||||
+ <source>Uninstall</source>
|
||||
+ <translation>卸载</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="351"/>
|
||||
+ <source>Switch user</source>
|
||||
+ <translation>切换用户</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="358"/>
|
||||
+ <source>Hibernate</source>
|
||||
+ <translation>休眠</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="365"/>
|
||||
+ <source>Sleep</source>
|
||||
+ <translation>睡眠</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="369"/>
|
||||
+ <source>Lock Screen</source>
|
||||
+ <translation>锁屏</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="374"/>
|
||||
+ <source>Log Out</source>
|
||||
+ <translation>注销</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="381"/>
|
||||
+ <source>Restart</source>
|
||||
+ <translation>重启</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="388"/>
|
||||
+ <source>Power Off</source>
|
||||
+ <translation>关机</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="424"/>
|
||||
+ <source>Personalize this list</source>
|
||||
+ <translation type="unfinished"></translation>
|
||||
+ </message>
|
||||
+</context>
|
||||
+<context>
|
||||
+ <name>TabletRightClickMenu</name>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/tabletrightclickmenu.cpp" line="219"/>
|
||||
+ <source>Pin to taskbar</source>
|
||||
+ <translation>固定到任务栏</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/tabletrightclickmenu.cpp" line="222"/>
|
||||
+ <source>Unpin from taskbar</source>
|
||||
+ <translation>从任务栏取消固定</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/tabletrightclickmenu.cpp" line="228"/>
|
||||
+ <source>Add to desktop shortcuts</source>
|
||||
+ <translation>固定到桌面快捷方式</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/tabletrightclickmenu.cpp" line="247"/>
|
||||
+ <source>Uninstall</source>
|
||||
+ <translation>卸载</translation>
|
||||
+ </message>
|
||||
+</context>
|
||||
+</TS>
|
||||
--
|
||||
2.33.0
|
||||
2.39.1
|
||||
|
||||
|
||||
@ -1,52 +0,0 @@
|
||||
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
|
||||
|
||||
38
0009-win.patch
Normal file
38
0009-win.patch
Normal file
@ -0,0 +1,38 @@
|
||||
From: lixueman <lixueman@kylinos.cn>
|
||||
Date: Mon, 25 Jul 2022 09:22:34 +0800
|
||||
Subject: =?utf-8?b?5L+u5pS55bmz5p2/5qih5byP5LiLd2lu6ZSu6IO95aSf5omT5byA5byA?=
|
||||
=?utf-8?b?5aeL6I+c5Y2V6Zeu6aKY?=
|
||||
|
||||
---
|
||||
src/UserInterface/mainwindow.cpp | 5 +++++
|
||||
src/UserInterface/mainwindow.h | 1 +
|
||||
2 files changed, 6 insertions(+)
|
||||
|
||||
diff --git a/src/UserInterface/mainwindow.cpp b/src/UserInterface/mainwindow.cpp
|
||||
index 355a8bd..147ddae 100755
|
||||
--- a/src/UserInterface/mainwindow.cpp
|
||||
+++ b/src/UserInterface/mainwindow.cpp
|
||||
@@ -117,6 +117,11 @@ void MainWindow::setTabletModeFlag()
|
||||
}
|
||||
}
|
||||
|
||||
+void MainWindow::tabletModeChangeSlot(bool flag)
|
||||
+{
|
||||
+ m_isTabletMode = flag;
|
||||
+}
|
||||
+
|
||||
void MainWindow::registDbusServer()
|
||||
{
|
||||
m_dbus = new DBus;
|
||||
diff --git a/src/UserInterface/mainwindow.h b/src/UserInterface/mainwindow.h
|
||||
index 30aa46b..1b5363d 100755
|
||||
--- a/src/UserInterface/mainwindow.h
|
||||
+++ b/src/UserInterface/mainwindow.h
|
||||
@@ -143,6 +143,7 @@ public Q_SLOTS:
|
||||
void maxAnimationFinished();
|
||||
void iconAnimationFinished();
|
||||
void changeStyle();
|
||||
+ void tabletModeChangeSlot(bool flag);
|
||||
private Q_SLOTS:
|
||||
void on_selectMenuButton_triggered(QAction *arg1);
|
||||
|
||||
684
0010-hover.patch
Normal file
684
0010-hover.patch
Normal file
@ -0,0 +1,684 @@
|
||||
From: lixueman <lixueman@kylinos.cn>
|
||||
Date: Thu, 28 Jul 2022 08:54:03 +0800
|
||||
Subject: =?utf-8?b?5L+u5pS55YiG57G75LiL5ouJ6YCJ5oup5qGG5a695bqm77yM6Kej5Yaz?=
|
||||
=?utf-8?b?5pyA5aSn5Y+35a2X5L2TaG92ZXLotoXlh7rovrnnlYzpl67popg=?=
|
||||
|
||||
---
|
||||
src/UserInterface/ListView/klistview.cpp | 2 +-
|
||||
src/UserInterface/ListView/listview.cpp | 2 +-
|
||||
src/UserInterface/full_mainwindow.cpp | 3 +-
|
||||
src/UserInterface/mainwindow.cpp | 3 +-
|
||||
translations/ukui-menu_bo.ts | 280 -----------------------------
|
||||
translations/ukui-menu_bo_CN.ts | 292 +++++++++++++++++++++++++++++++
|
||||
ukui-menu.pro | 2 +-
|
||||
7 files changed, 297 insertions(+), 287 deletions(-)
|
||||
delete mode 100755 translations/ukui-menu_bo.ts
|
||||
create mode 100644 translations/ukui-menu_bo_CN.ts
|
||||
|
||||
diff --git a/src/UserInterface/ListView/klistview.cpp b/src/UserInterface/ListView/klistview.cpp
|
||||
index 8151d04..3954bc9 100755
|
||||
--- a/src/UserInterface/ListView/klistview.cpp
|
||||
+++ b/src/UserInterface/ListView/klistview.cpp
|
||||
@@ -45,8 +45,8 @@ void KListView::onClicked(QModelIndex index)
|
||||
|
||||
if (var.isValid()) {
|
||||
QString desktopfp = var.value<QString>();
|
||||
- execApp(desktopfp);
|
||||
Q_EMIT sendHideMainWindowSignal();
|
||||
+ execApp(desktopfp);
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/UserInterface/ListView/listview.cpp b/src/UserInterface/ListView/listview.cpp
|
||||
index 78ed0a3..368f25a 100755
|
||||
--- a/src/UserInterface/ListView/listview.cpp
|
||||
+++ b/src/UserInterface/ListView/listview.cpp
|
||||
@@ -107,8 +107,8 @@ void ListView::onClicked(QModelIndex index)
|
||||
if (var.value<QStringList>().at(1).toInt() == 0) {
|
||||
Q_EMIT sendAppClassificationBtnClicked();
|
||||
} else {
|
||||
- execApp(desktopfp);
|
||||
Q_EMIT sendHideMainWindowSignal();
|
||||
+ execApp(desktopfp);
|
||||
}
|
||||
}
|
||||
}
|
||||
diff --git a/src/UserInterface/full_mainwindow.cpp b/src/UserInterface/full_mainwindow.cpp
|
||||
index 555c6a6..dfd692f 100755
|
||||
--- a/src/UserInterface/full_mainwindow.cpp
|
||||
+++ b/src/UserInterface/full_mainwindow.cpp
|
||||
@@ -177,7 +177,6 @@ void FullMainWindow::initAppListUI()
|
||||
void FullMainWindow::initMenu()
|
||||
{
|
||||
m_dropDownMenu = new MenuBox(this);
|
||||
- m_dropDownMenu->setFixedWidth(Style::DropMenuWidth);
|
||||
m_allAction = new QAction(m_dropDownMenu);
|
||||
m_letterAction = new QAction(m_dropDownMenu);
|
||||
m_funcAction = new QAction(m_dropDownMenu);
|
||||
@@ -381,7 +380,7 @@ void FullMainWindow::iconAnimationFinished()
|
||||
{
|
||||
m_dropDownMenu->raise();
|
||||
m_dropDownMenu->exec(m_fullSelectMenuButton->mapToGlobal(QPoint(m_fullSelectMenuButton->width()
|
||||
- -Style::DropMenuWidth, 45)));
|
||||
+ - m_dropDownMenu->sizeHint().width(), 45)));
|
||||
}
|
||||
|
||||
void FullMainWindow::keyPressEvent(QKeyEvent *e)
|
||||
diff --git a/src/UserInterface/mainwindow.cpp b/src/UserInterface/mainwindow.cpp
|
||||
index 147ddae..8427b34 100755
|
||||
--- a/src/UserInterface/mainwindow.cpp
|
||||
+++ b/src/UserInterface/mainwindow.cpp
|
||||
@@ -560,7 +560,6 @@ void MainWindow::initUi()
|
||||
}
|
||||
|
||||
m_dropDownMenu = new MenuBox(this);
|
||||
- m_dropDownMenu->setFixedWidth(Style::DropMenuWidth);
|
||||
m_allAction = new QAction(m_dropDownMenu);
|
||||
m_letterAction = new QAction(m_dropDownMenu);
|
||||
m_funcAction = new QAction(m_dropDownMenu);
|
||||
@@ -783,7 +782,7 @@ void MainWindow::iconAnimationFinished()
|
||||
{
|
||||
m_dropDownMenu->raise();
|
||||
m_dropDownMenu->exec(m_selectMenuButton->mapToGlobal(QPoint(m_selectMenuButton->width()
|
||||
- -Style::DropMenuWidth + 5, 29)));
|
||||
+ - m_dropDownMenu->sizeHint().width() + 5, 29)));
|
||||
}
|
||||
|
||||
void MainWindow::maxAnimationFinished()
|
||||
diff --git a/translations/ukui-menu_bo.ts b/translations/ukui-menu_bo.ts
|
||||
deleted file mode 100755
|
||||
index 370c9d8..0000000
|
||||
--- a/translations/ukui-menu_bo.ts
|
||||
+++ /dev/null
|
||||
@@ -1,280 +0,0 @@
|
||||
-<?xml version="1.0" encoding="utf-8"?>
|
||||
-<!DOCTYPE TS>
|
||||
-<TS version="2.1">
|
||||
-<context>
|
||||
- <name>FullMainWindow</name>
|
||||
- <message>
|
||||
- <location filename="../src/UserInterface/full_mainwindow.cpp" line="87"/>
|
||||
- <source>Search</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
- <message>
|
||||
- <location filename="../src/UserInterface/full_mainwindow.cpp" line="145"/>
|
||||
- <source>All</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
- <message>
|
||||
- <location filename="../src/UserInterface/full_mainwindow.cpp" line="147"/>
|
||||
- <source>Letter</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
- <message>
|
||||
- <location filename="../src/UserInterface/full_mainwindow.cpp" line="149"/>
|
||||
- <source>Function</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
-</context>
|
||||
-<context>
|
||||
- <name>FunctionWidget</name>
|
||||
- <message>
|
||||
- <location filename="../src/UserInterface/Widget/function_Widget.cpp" line="199"/>
|
||||
- <source>Search</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
-</context>
|
||||
-<context>
|
||||
- <name>ItemDelegate</name>
|
||||
- <message>
|
||||
- <location filename="../src/UserInterface/ViewItem/itemdelegate.cpp" line="176"/>
|
||||
- <source>Open the function sort menu</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
- <message>
|
||||
- <location filename="../src/UserInterface/ViewItem/itemdelegate.cpp" line="178"/>
|
||||
- <source>Open the alphabetical menu</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
-</context>
|
||||
-<context>
|
||||
- <name>MainWindow</name>
|
||||
- <message>
|
||||
- <location filename="../src/UserInterface/mainwindow.cpp" line="497"/>
|
||||
- <source>collection</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
- <message>
|
||||
- <location filename="../src/UserInterface/mainwindow.cpp" line="313"/>
|
||||
- <location filename="../src/UserInterface/mainwindow.cpp" line="490"/>
|
||||
- <location filename="../src/UserInterface/mainwindow.cpp" line="551"/>
|
||||
- <location filename="../src/UserInterface/mainwindow.cpp" line="1119"/>
|
||||
- <location filename="../src/UserInterface/mainwindow.cpp" line="1120"/>
|
||||
- <source>All</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
- <message>
|
||||
- <location filename="../src/UserInterface/mainwindow.cpp" line="309"/>
|
||||
- <location filename="../src/UserInterface/mainwindow.cpp" line="331"/>
|
||||
- <source>Search</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
- <message>
|
||||
- <location filename="../src/UserInterface/mainwindow.cpp" line="449"/>
|
||||
- <source>No recent files</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
- <message>
|
||||
- <location filename="../src/UserInterface/mainwindow.cpp" line="498"/>
|
||||
- <source>recent</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
- <message>
|
||||
- <location filename="../src/UserInterface/mainwindow.cpp" line="499"/>
|
||||
- <source>Max</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
- <message>
|
||||
- <location filename="../src/UserInterface/mainwindow.cpp" line="501"/>
|
||||
- <source>PowerOff</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
- <message>
|
||||
- <location filename="../src/UserInterface/mainwindow.cpp" line="553"/>
|
||||
- <location filename="../src/UserInterface/mainwindow.cpp" line="1132"/>
|
||||
- <location filename="../src/UserInterface/mainwindow.cpp" line="1133"/>
|
||||
- <source>Letter</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
- <message>
|
||||
- <location filename="../src/UserInterface/mainwindow.cpp" line="555"/>
|
||||
- <location filename="../src/UserInterface/mainwindow.cpp" line="1145"/>
|
||||
- <location filename="../src/UserInterface/mainwindow.cpp" line="1146"/>
|
||||
- <source>Function</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
-</context>
|
||||
-<context>
|
||||
- <name>QObject</name>
|
||||
- <message>
|
||||
- <location filename="../src/BackProcess/Interface/ukuimenuinterface.cpp" line="73"/>
|
||||
- <location filename="../src/UserInterface/Widget/function_button_widget.cpp" line="29"/>
|
||||
- <source>Office</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
- <message>
|
||||
- <location filename="../src/BackProcess/Interface/ukuimenuinterface.cpp" line="74"/>
|
||||
- <location filename="../src/UserInterface/Widget/function_button_widget.cpp" line="30"/>
|
||||
- <source>Development</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
- <message>
|
||||
- <location filename="../src/BackProcess/Interface/ukuimenuinterface.cpp" line="75"/>
|
||||
- <location filename="../src/UserInterface/Widget/function_button_widget.cpp" line="31"/>
|
||||
- <source>Image</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
- <message>
|
||||
- <location filename="../src/BackProcess/Interface/ukuimenuinterface.cpp" line="76"/>
|
||||
- <location filename="../src/UserInterface/Widget/function_button_widget.cpp" line="32"/>
|
||||
- <source>Video</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
- <message>
|
||||
- <location filename="../src/BackProcess/Interface/ukuimenuinterface.cpp" line="77"/>
|
||||
- <location filename="../src/UserInterface/Widget/function_button_widget.cpp" line="33"/>
|
||||
- <source>Internet</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
- <message>
|
||||
- <location filename="../src/BackProcess/Interface/ukuimenuinterface.cpp" line="78"/>
|
||||
- <location filename="../src/UserInterface/Widget/function_button_widget.cpp" line="34"/>
|
||||
- <source>Game</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
- <message>
|
||||
- <location filename="../src/BackProcess/Interface/ukuimenuinterface.cpp" line="79"/>
|
||||
- <location filename="../src/UserInterface/Widget/function_button_widget.cpp" line="35"/>
|
||||
- <source>Education</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
- <message>
|
||||
- <location filename="../src/BackProcess/Interface/ukuimenuinterface.cpp" line="80"/>
|
||||
- <location filename="../src/UserInterface/Widget/function_button_widget.cpp" line="36"/>
|
||||
- <source>Social</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
- <message>
|
||||
- <location filename="../src/BackProcess/Interface/ukuimenuinterface.cpp" line="81"/>
|
||||
- <location filename="../src/UserInterface/Widget/function_button_widget.cpp" line="37"/>
|
||||
- <source>System</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
- <message>
|
||||
- <location filename="../src/BackProcess/Interface/ukuimenuinterface.cpp" line="82"/>
|
||||
- <location filename="../src/UserInterface/Widget/function_button_widget.cpp" line="38"/>
|
||||
- <source>Safe</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
- <message>
|
||||
- <location filename="../src/BackProcess/Interface/ukuimenuinterface.cpp" line="83"/>
|
||||
- <location filename="../src/UserInterface/Widget/function_button_widget.cpp" line="39"/>
|
||||
- <source>Others</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
-</context>
|
||||
-<context>
|
||||
- <name>RightClickMenu</name>
|
||||
- <message>
|
||||
- <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="213"/>
|
||||
- <source>Pin to all</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
- <message>
|
||||
- <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="216"/>
|
||||
- <source>Unpin from all</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
- <message>
|
||||
- <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="226"/>
|
||||
- <source>Pin to taskbar</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
- <message>
|
||||
- <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="229"/>
|
||||
- <source>Unpin from taskbar</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
- <message>
|
||||
- <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="232"/>
|
||||
- <source>Add to desktop shortcuts</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
- <message>
|
||||
- <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="236"/>
|
||||
- <source>Pin to collection</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
- <message>
|
||||
- <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="239"/>
|
||||
- <source>Remove from collection</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
- <message>
|
||||
- <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="254"/>
|
||||
- <source>Uninstall</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
- <message>
|
||||
- <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="274"/>
|
||||
- <source>Switch user</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
- <message>
|
||||
- <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="281"/>
|
||||
- <source>Hibernate</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
- <message>
|
||||
- <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="288"/>
|
||||
- <source>Sleep</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
- <message>
|
||||
- <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="292"/>
|
||||
- <source>Lock Screen</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
- <message>
|
||||
- <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="297"/>
|
||||
- <source>Log Out</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
- <message>
|
||||
- <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="304"/>
|
||||
- <source>Restart</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
- <message>
|
||||
- <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="311"/>
|
||||
- <source>Power Off</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
- <message>
|
||||
- <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="342"/>
|
||||
- <source>Personalize this list</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
-</context>
|
||||
-<context>
|
||||
- <name>TabletRightClickMenu</name>
|
||||
- <message>
|
||||
- <location filename="../src/UserInterface/RightClickMenu/tabletrightclickmenu.cpp" line="220"/>
|
||||
- <source>Pin to taskbar</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
- <message>
|
||||
- <location filename="../src/UserInterface/RightClickMenu/tabletrightclickmenu.cpp" line="223"/>
|
||||
- <source>Unpin from taskbar</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
- <message>
|
||||
- <location filename="../src/UserInterface/RightClickMenu/tabletrightclickmenu.cpp" line="229"/>
|
||||
- <source>Add to desktop shortcuts</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
- <message>
|
||||
- <location filename="../src/UserInterface/RightClickMenu/tabletrightclickmenu.cpp" line="248"/>
|
||||
- <source>Uninstall</source>
|
||||
- <translation type="unfinished"></translation>
|
||||
- </message>
|
||||
-</context>
|
||||
-</TS>
|
||||
diff --git a/translations/ukui-menu_bo_CN.ts b/translations/ukui-menu_bo_CN.ts
|
||||
new file mode 100644
|
||||
index 0000000..d92f153
|
||||
--- /dev/null
|
||||
+++ b/translations/ukui-menu_bo_CN.ts
|
||||
@@ -0,0 +1,292 @@
|
||||
+<?xml version="1.0" encoding="utf-8"?>
|
||||
+<!DOCTYPE TS>
|
||||
+<TS version="2.1" language="bo_CN">
|
||||
+<context>
|
||||
+ <name>FullMainWindow</name>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/full_mainwindow.cpp" line="87"/>
|
||||
+ <source>Search</source>
|
||||
+ <translation>འཚོལ་ཞིབ།</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/full_mainwindow.cpp" line="145"/>
|
||||
+ <source>All</source>
|
||||
+ <translation>ཚང་མ།</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/full_mainwindow.cpp" line="147"/>
|
||||
+ <source>Letter</source>
|
||||
+ <translation>འཕྲིན་ཡིག</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/full_mainwindow.cpp" line="149"/>
|
||||
+ <source>Function</source>
|
||||
+ <translation>བྱེད་ནུས།</translation>
|
||||
+ </message>
|
||||
+</context>
|
||||
+<context>
|
||||
+ <name>FunctionWidget</name>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/Widget/function_Widget.cpp" line="199"/>
|
||||
+ <source>Search</source>
|
||||
+ <translation>འཚོལ་ཞིབ།</translation>
|
||||
+ </message>
|
||||
+</context>
|
||||
+<context>
|
||||
+ <name>ItemDelegate</name>
|
||||
+ <message>
|
||||
+ <source>Open feature sort list</source>
|
||||
+ <translation type="vanished">打开功能排序菜单</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <source>Open alphabetical list</source>
|
||||
+ <translation type="vanished">打开字母排序菜单</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/ViewItem/itemdelegate.cpp" line="176"/>
|
||||
+ <source>Open the function sort menu</source>
|
||||
+ <translation>བྱེད་ལས་རིགས་ཀྱི་ཟས་ཐོའི་ཁ་ཕྱེ་བ།</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/ViewItem/itemdelegate.cpp" line="178"/>
|
||||
+ <source>Open the alphabetical menu</source>
|
||||
+ <translation>དབྱངས་གསལ་ཡི་གེའི་ཟས་ཐོའི་ཁ་ཕྱེ་བ།</translation>
|
||||
+ </message>
|
||||
+</context>
|
||||
+<context>
|
||||
+ <name>MainWindow</name>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="309"/>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="331"/>
|
||||
+ <source>Search</source>
|
||||
+ <translation>འཚོལ་ཞིབ།</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="449"/>
|
||||
+ <source>No recent files</source>
|
||||
+ <translation>ཉེ་དུས་ཀྱི་ཡིག་ཆ་མེད།</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="313"/>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="490"/>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="551"/>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="1119"/>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="1120"/>
|
||||
+ <source>All</source>
|
||||
+ <translation>ཚང་མ།</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="497"/>
|
||||
+ <source>collection</source>
|
||||
+ <translation>བསྡུ་ཉར།</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="498"/>
|
||||
+ <source>recent</source>
|
||||
+ <translation>ཉེ་ཆར།</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="499"/>
|
||||
+ <source>Max</source>
|
||||
+ <translation>མའེ་ཁེ་སི།</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="501"/>
|
||||
+ <source>PowerOff</source>
|
||||
+ <translation>སྒུལ་ཤུགས་ཀྱི་ནུས་པ།</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <source>Search application</source>
|
||||
+ <translation type="vanished">搜索应用</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="553"/>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="1132"/>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="1133"/>
|
||||
+ <source>Letter</source>
|
||||
+ <translation>འཕྲིན་ཡིག</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="555"/>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="1145"/>
|
||||
+ <location filename="../src/UserInterface/mainwindow.cpp" line="1146"/>
|
||||
+ <source>Function</source>
|
||||
+ <translation>བྱེད་ནུས།</translation>
|
||||
+ </message>
|
||||
+</context>
|
||||
+<context>
|
||||
+ <name>QObject</name>
|
||||
+ <message>
|
||||
+ <location filename="../src/BackProcess/Interface/ukuimenuinterface.cpp" line="73"/>
|
||||
+ <location filename="../src/UserInterface/Widget/function_button_widget.cpp" line="29"/>
|
||||
+ <source>Office</source>
|
||||
+ <translation>གཞུང་ལས་ཁང་།</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/BackProcess/Interface/ukuimenuinterface.cpp" line="74"/>
|
||||
+ <location filename="../src/UserInterface/Widget/function_button_widget.cpp" line="30"/>
|
||||
+ <source>Development</source>
|
||||
+ <translation>འཕེལ་རྒྱས་</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/BackProcess/Interface/ukuimenuinterface.cpp" line="75"/>
|
||||
+ <location filename="../src/UserInterface/Widget/function_button_widget.cpp" line="31"/>
|
||||
+ <source>Image</source>
|
||||
+ <translation>པར་རིས།</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/BackProcess/Interface/ukuimenuinterface.cpp" line="76"/>
|
||||
+ <location filename="../src/UserInterface/Widget/function_button_widget.cpp" line="32"/>
|
||||
+ <source>Video</source>
|
||||
+ <translation>བརྙན་ཕབ།</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/BackProcess/Interface/ukuimenuinterface.cpp" line="77"/>
|
||||
+ <location filename="../src/UserInterface/Widget/function_button_widget.cpp" line="33"/>
|
||||
+ <source>Internet</source>
|
||||
+ <translation>དྲ་སྦྲེལ།</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/BackProcess/Interface/ukuimenuinterface.cpp" line="78"/>
|
||||
+ <location filename="../src/UserInterface/Widget/function_button_widget.cpp" line="34"/>
|
||||
+ <source>Game</source>
|
||||
+ <translation>རོལ་རྩེད།</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/BackProcess/Interface/ukuimenuinterface.cpp" line="79"/>
|
||||
+ <location filename="../src/UserInterface/Widget/function_button_widget.cpp" line="35"/>
|
||||
+ <source>Education</source>
|
||||
+ <translation>སློབ་གསོ།</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/BackProcess/Interface/ukuimenuinterface.cpp" line="80"/>
|
||||
+ <location filename="../src/UserInterface/Widget/function_button_widget.cpp" line="36"/>
|
||||
+ <source>Social</source>
|
||||
+ <translation>སྤྱི་ཚོགས།</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/BackProcess/Interface/ukuimenuinterface.cpp" line="81"/>
|
||||
+ <location filename="../src/UserInterface/Widget/function_button_widget.cpp" line="37"/>
|
||||
+ <source>System</source>
|
||||
+ <translation>ལམ་ལུགས།</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/BackProcess/Interface/ukuimenuinterface.cpp" line="82"/>
|
||||
+ <location filename="../src/UserInterface/Widget/function_button_widget.cpp" line="38"/>
|
||||
+ <source>Safe</source>
|
||||
+ <translation>བདེ་འཇགས།</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/BackProcess/Interface/ukuimenuinterface.cpp" line="83"/>
|
||||
+ <location filename="../src/UserInterface/Widget/function_button_widget.cpp" line="39"/>
|
||||
+ <source>Others</source>
|
||||
+ <translation>དེ་མིན་ད་དུང་</translation>
|
||||
+ </message>
|
||||
+</context>
|
||||
+<context>
|
||||
+ <name>RightClickMenu</name>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="213"/>
|
||||
+ <source>Pin to all</source>
|
||||
+ <translation>མི་ཚང་མར་ཁབ་རྒྱག་པ།</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="216"/>
|
||||
+ <source>Unpin from all</source>
|
||||
+ <translation>མི་ཚང་མའི་ཁྲོད་ནས་བཀག་འགོག་བྱེད་</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="226"/>
|
||||
+ <source>Pin to taskbar</source>
|
||||
+ <translation>ལས་འགན་སྒྲུབ་པར་ཁབ་རྒྱག་པ།</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="229"/>
|
||||
+ <source>Unpin from taskbar</source>
|
||||
+ <translation>ལས་འགན་སྒྲུབ་ས་ནས་ཁ་པར་གཏོང་བ།</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="232"/>
|
||||
+ <source>Add to desktop shortcuts</source>
|
||||
+ <translation>ཅོག་ཙེའི་སྟེང་གི་མགྱོགས་ལམ་ཁ་སྣོན་བྱས་ཡོད།</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="236"/>
|
||||
+ <source>Pin to collection</source>
|
||||
+ <translation>འཚོལ་སྡུད་བྱེད་པའི་ཁབ་སྐུད།</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="239"/>
|
||||
+ <source>Remove from collection</source>
|
||||
+ <translation>བསྡུ་ཉར་དངོས་རྫས་ཁྲོད་ནས་ཕྱིར་</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="254"/>
|
||||
+ <source>Uninstall</source>
|
||||
+ <translation>སྒྲིག་སྦྱོར་བྱས་མེད་པ།</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="274"/>
|
||||
+ <source>Switch user</source>
|
||||
+ <translation>གློག་སྒོ་འབྱེད་པའི་སྤྱོད་མཁན</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="281"/>
|
||||
+ <source>Hibernate</source>
|
||||
+ <translation>ཧིན་རྡུ་ཉི་ཞི་ཡ།</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="288"/>
|
||||
+ <source>Sleep</source>
|
||||
+ <translation>གཉིད་ཁུག་པ།</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="292"/>
|
||||
+ <source>Lock Screen</source>
|
||||
+ <translation>སྒོ་ལྕགས་ཀྱི་བརྙན་ཤེལ།</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="297"/>
|
||||
+ <source>Log Out</source>
|
||||
+ <translation>ཕྱིར་འཐེན་བྱ་དགོས།</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="304"/>
|
||||
+ <source>Restart</source>
|
||||
+ <translation>ཡང་བསྐྱར་འགོ་འཛུགས་</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="311"/>
|
||||
+ <source>Power Off</source>
|
||||
+ <translation>གློག་ཆད་པ།</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/rightclickmenu.cpp" line="342"/>
|
||||
+ <source>Personalize this list</source>
|
||||
+ <translation>མིང་ཐོ་འདི་རང་གཤིས་ཅན་དུ་བསྒྱུར</translation>
|
||||
+ </message>
|
||||
+</context>
|
||||
+<context>
|
||||
+ <name>TabletRightClickMenu</name>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/tabletrightclickmenu.cpp" line="220"/>
|
||||
+ <source>Pin to taskbar</source>
|
||||
+ <translation>ལས་འགན་སྒྲུབ་པར་ཁབ་རྒྱག་པ།</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/tabletrightclickmenu.cpp" line="223"/>
|
||||
+ <source>Unpin from taskbar</source>
|
||||
+ <translation>ལས་འགན་སྒྲུབ་ས་ནས་ཁ་པར་གཏོང་བ།</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/tabletrightclickmenu.cpp" line="229"/>
|
||||
+ <source>Add to desktop shortcuts</source>
|
||||
+ <translation>ཅོག་ཙེའི་སྟེང་གི་མགྱོགས་ལམ་ཁ་སྣོན་བྱས་ཡོད།</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/UserInterface/RightClickMenu/tabletrightclickmenu.cpp" line="248"/>
|
||||
+ <source>Uninstall</source>
|
||||
+ <translation>སྒྲིག་སྦྱོར་བྱས་མེད་པ།</translation>
|
||||
+ </message>
|
||||
+</context>
|
||||
+</TS>
|
||||
diff --git a/ukui-menu.pro b/ukui-menu.pro
|
||||
index c249692..1ca9797 100755
|
||||
--- a/ukui-menu.pro
|
||||
+++ b/ukui-menu.pro
|
||||
@@ -20,7 +20,7 @@ TEMPLATE = app
|
||||
target.path = /usr/bin
|
||||
|
||||
TRANSLATIONS+=\
|
||||
- translations/ukui-menu_bo.ts \
|
||||
+ translations/ukui-menu_bo_CN.ts \
|
||||
translations/ukui-menu_zh_CN.ts \
|
||||
translations/ukui-menu_tr.ts
|
||||
|
||||
430
0011-.patch
Normal file
430
0011-.patch
Normal file
@ -0,0 +1,430 @@
|
||||
From: lixueman <lixueman@kylinos.cn>
|
||||
Date: Thu, 18 Aug 2022 11:40:49 +0800
|
||||
Subject: =?utf-8?b?5L+u5pS55YWo5bGP5byA5aeL6I+c5Y2V5Zu65a6a5Yiw5pS26JeP5LiN?=
|
||||
=?utf-8?b?55Sf5pWI6Zeu6aKY?=
|
||||
|
||||
---
|
||||
.../FileWatcher/convert_winid_to_desktop.cpp | 1 -
|
||||
src/UserInterface/ListView/klistview.cpp | 13 ++++++++++---
|
||||
src/UserInterface/ListView/klistview.h | 1 +
|
||||
src/UserInterface/Other/scrollarea.cpp | 20 +++++---------------
|
||||
src/UserInterface/Widget/full_commonuse_widget.cpp | 9 +++++----
|
||||
src/UserInterface/Widget/full_commonuse_widget.h | 1 +
|
||||
src/UserInterface/Widget/full_function_widget.cpp | 7 ++++---
|
||||
src/UserInterface/Widget/full_function_widget.h | 1 +
|
||||
src/UserInterface/Widget/full_letter_widget.cpp | 14 +++++++-------
|
||||
src/UserInterface/Widget/full_letter_widget.h | 2 ++
|
||||
.../Widget/full_searchresult_widget.cpp | 5 +++--
|
||||
src/UserInterface/Widget/full_searchresult_widget.h | 1 +
|
||||
src/UserInterface/full_mainwindow.cpp | 11 ++++++++++-
|
||||
src/UserInterface/full_mainwindow.h | 2 ++
|
||||
src/UserInterface/mainwindow.cpp | 1 +
|
||||
src/UtilityFunction/Style/style.cpp | 6 ++++--
|
||||
src/UtilityFunction/Style/style.h | 1 +
|
||||
17 files changed, 58 insertions(+), 38 deletions(-)
|
||||
|
||||
diff --git a/src/BackProcess/FileWatcher/convert_winid_to_desktop.cpp b/src/BackProcess/FileWatcher/convert_winid_to_desktop.cpp
|
||||
index cf17b36..f7bc939 100755
|
||||
--- a/src/BackProcess/FileWatcher/convert_winid_to_desktop.cpp
|
||||
+++ b/src/BackProcess/FileWatcher/convert_winid_to_desktop.cpp
|
||||
@@ -18,7 +18,6 @@
|
||||
|
||||
#include "convert_winid_to_desktop.h"
|
||||
#include "utility.h"
|
||||
-#include <KWindowSystem>
|
||||
#include <QFile>
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
diff --git a/src/UserInterface/ListView/klistview.cpp b/src/UserInterface/ListView/klistview.cpp
|
||||
index 3954bc9..fcf4480 100755
|
||||
--- a/src/UserInterface/ListView/klistview.cpp
|
||||
+++ b/src/UserInterface/ListView/klistview.cpp
|
||||
@@ -69,14 +69,21 @@ void KListView::mouseMoveEvent(QMouseEvent *e)
|
||||
|
||||
void KListView::mousePressEvent(QMouseEvent *event)
|
||||
{
|
||||
- if (!(this->indexAt(event->pos()).isValid()) && event->button() == Qt::LeftButton) {
|
||||
- Q_EMIT sendHideMainWindowSignal();
|
||||
- } else {
|
||||
+ if ((this->indexAt(event->pos()).isValid()) && event->button() == Qt::LeftButton) {
|
||||
pressApp = listmodel->data(this->indexAt(event->pos()), Qt::DisplayRole);
|
||||
}
|
||||
return QListView::mousePressEvent(event);
|
||||
}
|
||||
|
||||
+void KListView::mouseReleaseEvent(QMouseEvent *e)
|
||||
+{
|
||||
+ if (!(this->indexAt(e->pos()).isValid()) && e->button() == Qt::LeftButton) {
|
||||
+ Q_EMIT sendHideMainWindowSignal();
|
||||
+ } else {
|
||||
+ return QListView::mouseReleaseEvent(e);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
void KListView::rightClickedSlot(const QPoint &pos)
|
||||
{
|
||||
if (!(this->selectionModel()->selectedIndexes().isEmpty())) {
|
||||
diff --git a/src/UserInterface/ListView/klistview.h b/src/UserInterface/ListView/klistview.h
|
||||
index e932fd2..37359b7 100755
|
||||
--- a/src/UserInterface/ListView/klistview.h
|
||||
+++ b/src/UserInterface/ListView/klistview.h
|
||||
@@ -24,6 +24,7 @@ protected:
|
||||
void paintEvent(QPaintEvent *e);
|
||||
void mousePressEvent(QMouseEvent *event);
|
||||
void mouseMoveEvent(QMouseEvent *e);
|
||||
+ void mouseReleaseEvent(QMouseEvent *e);
|
||||
public:
|
||||
void addData(QStringList data);
|
||||
void updateData(QStringList data);
|
||||
diff --git a/src/UserInterface/Other/scrollarea.cpp b/src/UserInterface/Other/scrollarea.cpp
|
||||
index 65c26e5..2bb4d2d 100755
|
||||
--- a/src/UserInterface/Other/scrollarea.cpp
|
||||
+++ b/src/UserInterface/Other/scrollarea.cpp
|
||||
@@ -74,23 +74,13 @@ void ScrollAreaWid::paintEvent(QPaintEvent *event)
|
||||
|
||||
ScrollArea::ScrollArea()
|
||||
{
|
||||
- // this->verticalScrollBar()->setVisible(false);
|
||||
- // this->setFocusPolicy(Qt::NoFocus);
|
||||
- //// this->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
|
||||
- this->setFixedWidth(1330);
|
||||
- // this->verticalScrollBar()->setContextMenuPolicy(Qt::NoContextMenu);
|
||||
+ this->setFocusPolicy(Qt::NoFocus);
|
||||
+ this->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
|
||||
+ this->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
|
||||
this->setFrameShape(QFrame::NoFrame);
|
||||
- // this->verticalScrollBar()->setProperty("drawScrollBarGroove",false);
|
||||
- // this->verticalScrollBar()->setAttribute(Qt::WA_TranslucentBackground, false);
|
||||
- this->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
- this->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
this->verticalScrollBar()->setVisible(false);
|
||||
- //滚动条设置
|
||||
- QPalette p = this->verticalScrollBar()->palette();
|
||||
- QColor color(255, 255, 255);
|
||||
- color.setAlphaF(0.25);
|
||||
- p.setColor(QPalette::Active, QPalette::Button, color);
|
||||
- this->verticalScrollBar()->setPalette(p);
|
||||
+ this->horizontalScrollBar()->setVisible(false);
|
||||
+ this->setStyleSheet("QWidget{background:transparent;}");
|
||||
}
|
||||
|
||||
void ScrollArea::setFocusToNextChild()
|
||||
diff --git a/src/UserInterface/Widget/full_commonuse_widget.cpp b/src/UserInterface/Widget/full_commonuse_widget.cpp
|
||||
index 26d86b5..6f138f1 100755
|
||||
--- a/src/UserInterface/Widget/full_commonuse_widget.cpp
|
||||
+++ b/src/UserInterface/Widget/full_commonuse_widget.cpp
|
||||
@@ -48,11 +48,11 @@ void FullCommonUseWidget::initUi()
|
||||
m_scrollArea = new ScrollArea();
|
||||
m_scrollAreaWid = new ScrollAreaWid(this);
|
||||
m_scrollAreaWid->setAttribute(Qt::WA_TranslucentBackground);
|
||||
- m_scrollArea->setFixedSize(Style::m_applistWidWidth, Style::m_applistWidHeight);
|
||||
+ m_scrollArea->setFixedSize(Style::m_applistAreaWidth, Style::m_applistWidHeight);
|
||||
m_scrollArea->setWidget(m_scrollAreaWid);
|
||||
+ m_scrollArea->setAlignment(Qt::AlignCenter);
|
||||
m_scrollArea->setStyleSheet("QWidget{background:transparent;}");
|
||||
m_scrollArea->setWidgetResizable(true);
|
||||
- m_scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
m_scrollAreaWidLayout = new QVBoxLayout(m_scrollAreaWid);
|
||||
m_scrollAreaWidLayout->setContentsMargins(0, 0, 0, 0);
|
||||
m_scrollAreaWidLayout->setSpacing(10);
|
||||
@@ -146,9 +146,10 @@ void FullCommonUseWidget::initAppListWidget()
|
||||
m_listView = new FullListView(this, 0);
|
||||
m_listView->installEventFilter(this);
|
||||
m_scrollAreaWidLayout->addWidget(m_listView);
|
||||
- m_listView->setFixedWidth(m_scrollArea->width());
|
||||
+ m_listView->setFixedWidth(m_scrollAreaWid->width());
|
||||
connect(m_listView, &FullListView::sendItemClickedSignal, this, &FullCommonUseWidget::execApplication);
|
||||
connect(m_listView, &FullListView::sendUpdateAppListSignal, this, &FullCommonUseWidget::updateListViewSlot);
|
||||
+ connect(m_listView, &FullListView::sendCollectViewUpdate, this, &FullCommonUseWidget::sendCollectViewUpdate);
|
||||
connect(m_listView, &FullListView::sendHideMainWindowSignal, this, &FullCommonUseWidget::sendHideMainWindowSignal);
|
||||
connect(m_listView, &FullListView::sendSetslidebar, this, &FullCommonUseWidget::onSetSlider);
|
||||
}
|
||||
@@ -281,7 +282,7 @@ void FullCommonUseWidget::updateListView()
|
||||
|
||||
void FullCommonUseWidget::repaintWidget()
|
||||
{
|
||||
- m_scrollArea->setFixedSize(Style::m_applistWidWidth, Style::m_applistWidHeight);
|
||||
+ m_scrollArea->setFixedSize(Style::m_applistAreaWidth, Style::m_applistWidHeight);
|
||||
m_scrollAreaWidLayout->removeWidget(m_listView);
|
||||
m_listView->setParent(nullptr);
|
||||
delete m_listView;
|
||||
diff --git a/src/UserInterface/Widget/full_commonuse_widget.h b/src/UserInterface/Widget/full_commonuse_widget.h
|
||||
index 9f60538..d13ad45 100755
|
||||
--- a/src/UserInterface/Widget/full_commonuse_widget.h
|
||||
+++ b/src/UserInterface/Widget/full_commonuse_widget.h
|
||||
@@ -134,6 +134,7 @@ Q_SIGNALS:
|
||||
void changeScrollValue(int value, int maximumValue);
|
||||
void setFocusToSideWin();
|
||||
void sendUpdateOtherView();
|
||||
+ void sendCollectViewUpdate();
|
||||
};
|
||||
|
||||
#endif // FULLCOMMONUSEWIDGET_H
|
||||
diff --git a/src/UserInterface/Widget/full_function_widget.cpp b/src/UserInterface/Widget/full_function_widget.cpp
|
||||
index 7cc8464..b07133f 100755
|
||||
--- a/src/UserInterface/Widget/full_function_widget.cpp
|
||||
+++ b/src/UserInterface/Widget/full_function_widget.cpp
|
||||
@@ -45,7 +45,7 @@ void FullFunctionWidget::initUi()
|
||||
m_iconListWid = new QWidget(this);
|
||||
m_iconListWid->setAttribute(Qt::WA_TranslucentBackground);
|
||||
m_iconListWid->setAutoFillBackground(false);
|
||||
- m_applistWid->setFixedSize(Style::m_applistWidWidth, Style::m_applistWidHeight);
|
||||
+ m_applistWid->setFixedSize(Style::m_applistAreaWidth, Style::m_applistWidHeight);
|
||||
m_iconListWid->setFixedSize(Style::m_leftWidWidth, Style::m_applistWidHeight);
|
||||
m_verticalScrollBar = new QScrollBar(m_scrollArea);
|
||||
m_verticalScrollBar->installEventFilter(this);
|
||||
@@ -111,10 +111,10 @@ void FullFunctionWidget::initAppListWidget()
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
m_applistWid->setLayout(layout);
|
||||
m_scrollArea = new ScrollArea;
|
||||
- m_scrollArea->setStyleSheet("background:transparent");
|
||||
m_scrollAreaWid = new ScrollAreaWid(this);
|
||||
m_scrollAreaWid->setAttribute(Qt::WA_TranslucentBackground);
|
||||
m_scrollArea->setFixedSize(m_applistWid->width(), m_applistWid->height());
|
||||
+ m_scrollAreaWid->adjustSize();
|
||||
m_scrollArea->setWidget(m_scrollAreaWid);
|
||||
m_scrollArea->setWidgetResizable(true);
|
||||
m_scrollAreaWidLayout = new QVBoxLayout(m_scrollAreaWid);
|
||||
@@ -211,6 +211,7 @@ void FullFunctionWidget::insertAppList(QStringList desktopfplist)
|
||||
connect(listview, &FullListView::sendItemClickedSignal, this, &FullFunctionWidget::execApplication);
|
||||
connect(listview, &FullListView::sendHideMainWindowSignal, this, &FullFunctionWidget::sendHideMainWindowSignal);
|
||||
connect(listview, &FullListView::sendUpdateAppListSignal, this, &FullFunctionWidget::sendUpdateCommonView);
|
||||
+ connect(listview, &FullListView::sendCollectViewUpdate, this, &FullFunctionWidget::sendCollectViewUpdate);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -473,7 +474,7 @@ void FullFunctionWidget::setFunctionBtnGeometry()
|
||||
|
||||
void FullFunctionWidget::repaintWidget()
|
||||
{
|
||||
- m_applistWid->setFixedSize(Style::m_applistWidWidth, Style::m_applistWidHeight);
|
||||
+ m_applistWid->setFixedSize(Style::m_applistAreaWidth, Style::m_applistWidHeight);
|
||||
m_iconListWid->setFixedSize(Style::m_leftWidWidth, Style::m_applistWidHeight);
|
||||
m_scrollArea->setFixedSize(m_applistWid->width(), m_applistWid->height());
|
||||
updateAppListView();
|
||||
diff --git a/src/UserInterface/Widget/full_function_widget.h b/src/UserInterface/Widget/full_function_widget.h
|
||||
index 931104c..22e2a99 100755
|
||||
--- a/src/UserInterface/Widget/full_function_widget.h
|
||||
+++ b/src/UserInterface/Widget/full_function_widget.h
|
||||
@@ -197,6 +197,7 @@ Q_SIGNALS:
|
||||
|
||||
void sendUpdateCommonView();
|
||||
|
||||
+ void sendCollectViewUpdate();
|
||||
};
|
||||
|
||||
#endif // FULLFUNCTIONWIDGET_H
|
||||
diff --git a/src/UserInterface/Widget/full_letter_widget.cpp b/src/UserInterface/Widget/full_letter_widget.cpp
|
||||
index 1ebc2c5..64e7537 100755
|
||||
--- a/src/UserInterface/Widget/full_letter_widget.cpp
|
||||
+++ b/src/UserInterface/Widget/full_letter_widget.cpp
|
||||
@@ -77,12 +77,10 @@ void FullLetterWidget::initAppListWidget()
|
||||
// layout->setContentsMargins(0,0,0,0);
|
||||
// m_applistWid->setLayout(layout);
|
||||
m_scrollArea = new ScrollArea();
|
||||
- m_scrollArea->setStyleSheet("background:transparent");
|
||||
m_scrollAreaWid = new ScrollAreaWid(this);
|
||||
m_scrollArea->setWidget(m_scrollAreaWid);
|
||||
- m_scrollArea->setFixedSize(Style::m_applistWidWidth, Style::m_applistWidHeight);
|
||||
- m_scrollArea->setWidgetResizable(true);
|
||||
- // m_scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
+ m_scrollAreaWid->setFixedWidth(Style::m_applistWidWidth);
|
||||
+ m_scrollArea->setFixedSize(Style::m_applistAreaWidth, Style::m_applistWidHeight);
|
||||
m_scrollAreaWidLayout = new QVBoxLayout;
|
||||
m_scrollAreaWidLayout->setContentsMargins(0, 0, 0, 0);
|
||||
m_scrollAreaWidLayout->setSpacing(10);
|
||||
@@ -211,6 +209,7 @@ void FullLetterWidget::fillAppList()
|
||||
connect(listview, &FullListView::sendItemClickedSignal, this, &FullLetterWidget::execApplication);
|
||||
connect(listview, &FullListView::sendHideMainWindowSignal, this, &FullLetterWidget::sendHideMainWindowSignal);
|
||||
connect(listview, &FullListView::sendUpdateAppListSignal, this, &FullLetterWidget::sendUpdateCommonView);
|
||||
+ connect(listview, &FullListView::sendCollectViewUpdate, this, &FullLetterWidget::sendCollectViewUpdate);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -304,12 +303,12 @@ void FullLetterWidget::resizeScrollAreaControls()
|
||||
rowcount = listview->model()->rowCount() / dividend;
|
||||
}
|
||||
|
||||
- listview->setFixedSize(m_scrollArea->width(), listview->gridSize().height()*rowcount);
|
||||
+ listview->setFixedHeight(listview->gridSize().height()*rowcount);
|
||||
areaHeight += listview->height() + 50;
|
||||
row++;
|
||||
}
|
||||
|
||||
- m_scrollArea->widget()->setFixedSize(m_scrollArea->width(), areaHeight - 10);
|
||||
+ m_scrollArea->widget()->setFixedHeight(areaHeight - 10);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -480,7 +479,8 @@ void FullLetterWidget::setLetterBtnGeometry()
|
||||
void FullLetterWidget::repaintWidget()
|
||||
{
|
||||
m_letterListWid->setFixedSize(Style::m_leftWidWidth, Style::m_applistWidHeight);
|
||||
- m_scrollArea->setFixedSize(Style::m_applistWidWidth, Style::m_applistWidHeight);
|
||||
+ m_scrollArea->setFixedSize(Style::m_applistAreaWidth, Style::m_applistWidHeight);
|
||||
+ m_scrollAreaWid->setFixedWidth(Style::m_applistWidWidth);
|
||||
updateAppListView();
|
||||
}
|
||||
|
||||
diff --git a/src/UserInterface/Widget/full_letter_widget.h b/src/UserInterface/Widget/full_letter_widget.h
|
||||
index 662408b..9799ee4 100755
|
||||
--- a/src/UserInterface/Widget/full_letter_widget.h
|
||||
+++ b/src/UserInterface/Widget/full_letter_widget.h
|
||||
@@ -199,6 +199,8 @@ Q_SIGNALS:
|
||||
void changeScrollValue(int value, int maximumValue);
|
||||
|
||||
void sendUpdateCommonView();
|
||||
+
|
||||
+ void sendCollectViewUpdate();
|
||||
};
|
||||
|
||||
#endif // FULLLETTERWIDGET_H
|
||||
diff --git a/src/UserInterface/Widget/full_searchresult_widget.cpp b/src/UserInterface/Widget/full_searchresult_widget.cpp
|
||||
index efdee49..e42d151 100755
|
||||
--- a/src/UserInterface/Widget/full_searchresult_widget.cpp
|
||||
+++ b/src/UserInterface/Widget/full_searchresult_widget.cpp
|
||||
@@ -47,7 +47,7 @@ void FullSearchResultWidget::initUi()
|
||||
m_scrollArea->setStyleSheet("background:transparent");
|
||||
m_scrollAreaWid = new ScrollAreaWid(this);
|
||||
m_scrollAreaWid->setAttribute(Qt::WA_TranslucentBackground);
|
||||
- m_scrollArea->setFixedSize(Style::m_applistWidWidth, Style::m_applistWidHeight);
|
||||
+ m_scrollArea->setFixedSize(Style::m_applistAreaWidth, Style::m_applistWidHeight);
|
||||
m_scrollArea->setWidget(m_scrollAreaWid);
|
||||
m_scrollArea->setWidgetResizable(true);
|
||||
m_scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
@@ -139,6 +139,7 @@ void FullSearchResultWidget::initAppListWidget()
|
||||
connect(m_listView, &FullListView::sendItemClickedSignal, this, &FullSearchResultWidget::execApplication);
|
||||
connect(m_listView, &FullListView::sendHideMainWindowSignal, this, &FullSearchResultWidget::sendHideMainWindowSignal);
|
||||
connect(m_listView, &FullListView::sendSetslidebar, this, &FullSearchResultWidget::onSetSlider);
|
||||
+ connect(m_listView, &FullListView::sendCollectViewUpdate, this, &FullSearchResultWidget::sendCollectViewUpdate);
|
||||
}
|
||||
|
||||
void FullSearchResultWidget::fillAppList()
|
||||
@@ -228,7 +229,7 @@ void FullSearchResultWidget::selectFirstItemTab()
|
||||
|
||||
void FullSearchResultWidget::repaintWidget()
|
||||
{
|
||||
- m_scrollArea->setFixedSize(Style::m_applistWidWidth, Style::m_applistWidHeight);
|
||||
+ m_scrollArea->setFixedSize(Style::m_applistAreaWidth, Style::m_applistWidHeight);
|
||||
resizeScrollAreaControls();
|
||||
m_scrollAreaWidHeight = m_scrollAreaWid->height() + 1;
|
||||
initVerticalScrollBar();
|
||||
diff --git a/src/UserInterface/Widget/full_searchresult_widget.h b/src/UserInterface/Widget/full_searchresult_widget.h
|
||||
index 43c1955..e557b7d 100755
|
||||
--- a/src/UserInterface/Widget/full_searchresult_widget.h
|
||||
+++ b/src/UserInterface/Widget/full_searchresult_widget.h
|
||||
@@ -114,6 +114,7 @@ Q_SIGNALS:
|
||||
*/
|
||||
void sendHideMainWindowSignal();
|
||||
void setFocusToSideWin();
|
||||
+ void sendCollectViewUpdate();
|
||||
};
|
||||
|
||||
#endif // FULLSEARCHRESULTWIDGET_H
|
||||
diff --git a/src/UserInterface/full_mainwindow.cpp b/src/UserInterface/full_mainwindow.cpp
|
||||
index dfd692f..3a3e2cd 100755
|
||||
--- a/src/UserInterface/full_mainwindow.cpp
|
||||
+++ b/src/UserInterface/full_mainwindow.cpp
|
||||
@@ -216,11 +216,15 @@ 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_fullCommonPage, &FullCommonUseWidget::sendCollectViewUpdate, this, &FullMainWindow::sendCollectViewUpdate);
|
||||
connect(m_fullFunctionPage, &FullFunctionWidget::sendUpdateCommonView, m_fullCommonPage, &FullCommonUseWidget::updateListViewSlot);
|
||||
+ connect(m_fullFunctionPage, &FullFunctionWidget::sendCollectViewUpdate, this, &FullMainWindow::sendCollectViewUpdate);
|
||||
connect(m_fullLetterPage, &FullLetterWidget::sendUpdateCommonView, m_fullCommonPage, &FullCommonUseWidget::updateListViewSlot);
|
||||
+ connect(m_fullLetterPage, &FullLetterWidget::sendCollectViewUpdate, this, &FullMainWindow::sendCollectViewUpdate);
|
||||
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::sendCollectViewUpdate, this, &FullMainWindow::sendCollectViewUpdate);
|
||||
connect(m_fullResultPage, &FullSearchResultWidget::sendHideMainWindowSignal, this, &FullMainWindow::fullWindowHide);
|
||||
connect(m_dropDownMenu, &MenuBox::triggered, this, &FullMainWindow::on_fullSelectMenuButton_triggered);
|
||||
connect(m_dropDownMenu, &MenuBox::sendMainWinActiveSignal, [ = ]() {
|
||||
@@ -511,10 +515,15 @@ void FullMainWindow::searchAppSlot(QString arg)
|
||||
void FullMainWindow::mousePressEvent(QMouseEvent *event)
|
||||
{
|
||||
resetEditline();
|
||||
+ return QMainWindow::mousePressEvent(event);
|
||||
+}
|
||||
+
|
||||
+void FullMainWindow::mouseReleaseEvent(QMouseEvent *event)
|
||||
+{
|
||||
if (event->button() == Qt::LeftButton) {
|
||||
this->hide();
|
||||
}
|
||||
- return QMainWindow::mousePressEvent(event);
|
||||
+ return QMainWindow::mouseReleaseEvent(event);
|
||||
}
|
||||
|
||||
void FullMainWindow::recvSearchResult(QVector<QStringList> arg)
|
||||
diff --git a/src/UserInterface/full_mainwindow.h b/src/UserInterface/full_mainwindow.h
|
||||
index 9592169..1f7bc24 100755
|
||||
--- a/src/UserInterface/full_mainwindow.h
|
||||
+++ b/src/UserInterface/full_mainwindow.h
|
||||
@@ -35,6 +35,7 @@ Q_SIGNALS:
|
||||
void sendSetFocusToLet();
|
||||
void sendSetFocusToResult();
|
||||
void sendUpdateOtherView();
|
||||
+ void sendCollectViewUpdate();
|
||||
|
||||
private Q_SLOTS:
|
||||
|
||||
@@ -53,6 +54,7 @@ protected:
|
||||
bool event(QEvent *event);
|
||||
bool eventFilter(QObject *watched, QEvent *event);
|
||||
void mousePressEvent(QMouseEvent *event);
|
||||
+ void mouseReleaseEvent(QMouseEvent *event);
|
||||
void changeStyle();
|
||||
void initConnect();
|
||||
void initTabOrder();
|
||||
diff --git a/src/UserInterface/mainwindow.cpp b/src/UserInterface/mainwindow.cpp
|
||||
index 8427b34..c45be17 100755
|
||||
--- a/src/UserInterface/mainwindow.cpp
|
||||
+++ b/src/UserInterface/mainwindow.cpp
|
||||
@@ -216,6 +216,7 @@ void MainWindow::initSignalConnect()
|
||||
connect(m_searchAppThread, &SearchAppThread::sendSearchResult, this, &MainWindow::recvSearchResult);
|
||||
connect(m_fullWindow, &FullMainWindow::showNormalWindow, this, &MainWindow::showNormalWindowSlot);
|
||||
connect(m_fullWindow, &FullMainWindow::sendUpdateOtherView, this, &MainWindow::updateMinAllView);
|
||||
+ connect(m_fullWindow, &FullMainWindow::sendCollectViewUpdate, this, &MainWindow::updateCollectView);
|
||||
connect(m_minSelectButton, &QToolButton::clicked, this, &MainWindow::on_minSelectButton_clicked);
|
||||
connect(m_dropDownMenu, &MenuBox::triggered, this, &MainWindow::on_selectMenuButton_triggered);
|
||||
connect(m_dropDownMenu, &MenuBox::sendMainWinActiveSignal, [ = ]() {
|
||||
diff --git a/src/UtilityFunction/Style/style.cpp b/src/UtilityFunction/Style/style.cpp
|
||||
index 53378bd..70198af 100755
|
||||
--- a/src/UtilityFunction/Style/style.cpp
|
||||
+++ b/src/UtilityFunction/Style/style.cpp
|
||||
@@ -56,6 +56,7 @@ int Style::LeftSpaceIconText = 0;
|
||||
int Style::LeftSpaceBetweenItem = 0;
|
||||
//应用列表栏
|
||||
int Style::m_applistWidWidth = 0;
|
||||
+int Style::m_applistAreaWidth = 0;
|
||||
int Style::m_applistWidHeight = 0;
|
||||
int Style::AppListIconSize = 0;
|
||||
int Style::AppListBigIconSize = 0;
|
||||
@@ -217,10 +218,11 @@ void Style::initWidStyle()
|
||||
rightViewHeight = 470;
|
||||
LeftSpaceIconText = 14;
|
||||
m_applistWidWidth = m_availableScreenWidth / 1.25;
|
||||
- m_applistWidWidth = m_applistWidWidth - (m_applistWidWidth % m_applistGridSizeWidth) + 1;
|
||||
+ m_applistWidWidth = m_applistWidWidth - (m_applistWidWidth % m_applistGridSizeWidth) + 2;
|
||||
m_applistWidHeight = m_availableScreenHeight - 120;
|
||||
- m_applistWidHeight = m_applistWidHeight - (m_applistWidHeight % m_applistGridSizeWidth) + 1;
|
||||
+ m_applistWidHeight = m_applistWidHeight - (m_applistWidHeight % m_applistGridSizeWidth);
|
||||
m_leftWidWidth = (m_availableScreenWidth - m_applistWidWidth) / 2 + 1;
|
||||
+ m_applistAreaWidth = m_applistWidWidth + 20;
|
||||
} else {
|
||||
ScreenWidth = QApplication::primaryScreen()->geometry().width();
|
||||
ScreenHeight = QApplication::primaryScreen()->geometry().height();
|
||||
diff --git a/src/UtilityFunction/Style/style.h b/src/UtilityFunction/Style/style.h
|
||||
index a74e0da..547a072 100755
|
||||
--- a/src/UtilityFunction/Style/style.h
|
||||
+++ b/src/UtilityFunction/Style/style.h
|
||||
@@ -111,6 +111,7 @@ public:
|
||||
static int LeftSpaceBetweenItem; //item间距
|
||||
//应用列表栏
|
||||
static int m_applistWidWidth; //宽度
|
||||
+ static int m_applistAreaWidth;
|
||||
static int m_applistWidHeight; //高度
|
||||
static int AppListIconSize; //图标大小
|
||||
static int AppListBigIconSize;
|
||||
303
0012-16-wayland.patch
Normal file
303
0012-16-wayland.patch
Normal file
@ -0,0 +1,303 @@
|
||||
From: zhaikangning <857458455@qq.com>
|
||||
Date: Fri, 2 Sep 2022 08:20:29 +0000
|
||||
Subject: =?utf-8?b?ITE2IOino+WGs3dheWxhbmTkuIvlupTnlKjmiZPlvIDov4fnqIvkuK0=?=
|
||||
=?utf-8?b?6Zi75aGe5byA5aeL6I+c5Y2V6Zeu6aKYIE1lcmdlIHB1bGwgcmVxdWVzdCAhMTYg?=
|
||||
=?utf-8?b?ZnJvbSBsaXh1ZW1hbi9vcGVua3lsaW4veWFuZ3R6ZQ==?=
|
||||
|
||||
---
|
||||
src/UserInterface/ListView/klistview.cpp | 4 ++--
|
||||
src/UserInterface/ListView/listview.cpp | 3 ++-
|
||||
src/UserInterface/ListView/rightlistview.cpp | 5 +++--
|
||||
src/UserInterface/Widget/full_commonuse_widget.cpp | 10 ----------
|
||||
src/UserInterface/Widget/full_commonuse_widget.h | 5 -----
|
||||
src/UserInterface/Widget/full_function_widget.cpp | 10 ----------
|
||||
src/UserInterface/Widget/full_function_widget.h | 5 -----
|
||||
src/UserInterface/Widget/full_letter_widget.cpp | 10 ----------
|
||||
src/UserInterface/Widget/full_letter_widget.h | 5 -----
|
||||
src/UserInterface/Widget/full_searchresult_widget.cpp | 9 ---------
|
||||
src/UserInterface/Widget/full_searchresult_widget.h | 5 -----
|
||||
src/UtilityFunction/utility.cpp | 17 ++++++++++-------
|
||||
12 files changed, 17 insertions(+), 71 deletions(-)
|
||||
|
||||
diff --git a/src/UserInterface/ListView/klistview.cpp b/src/UserInterface/ListView/klistview.cpp
|
||||
index fcf4480..1588014 100755
|
||||
--- a/src/UserInterface/ListView/klistview.cpp
|
||||
+++ b/src/UserInterface/ListView/klistview.cpp
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "klistview.h"
|
||||
#include "utility.h"
|
||||
#include <QScrollBar>
|
||||
+#include <QtConcurrent/QtConcurrent>
|
||||
#include "rightclickmenu.h"
|
||||
|
||||
KListView::KListView(QWidget *parent):
|
||||
@@ -42,11 +43,10 @@ void KListView::updateData(QStringList data)
|
||||
void KListView::onClicked(QModelIndex index)
|
||||
{
|
||||
QVariant var = listmodel->data(index, Qt::DisplayRole);
|
||||
-
|
||||
if (var.isValid()) {
|
||||
QString desktopfp = var.value<QString>();
|
||||
Q_EMIT sendHideMainWindowSignal();
|
||||
- execApp(desktopfp);
|
||||
+ QtConcurrent::run(execApp, QString(desktopfp));
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/UserInterface/ListView/listview.cpp b/src/UserInterface/ListView/listview.cpp
|
||||
index 368f25a..ea511c2 100755
|
||||
--- a/src/UserInterface/ListView/listview.cpp
|
||||
+++ b/src/UserInterface/ListView/listview.cpp
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "utility.h"
|
||||
#include <QDebug>
|
||||
#include <QDesktopServices>
|
||||
+#include <QtConcurrent/QtConcurrent>
|
||||
|
||||
ListView::ListView(QWidget *parent/*, int width, int height, int module*/):
|
||||
KListView(parent)
|
||||
@@ -108,7 +109,7 @@ void ListView::onClicked(QModelIndex index)
|
||||
Q_EMIT sendAppClassificationBtnClicked();
|
||||
} else {
|
||||
Q_EMIT sendHideMainWindowSignal();
|
||||
- execApp(desktopfp);
|
||||
+ QtConcurrent::run(execApp, QString(desktopfp));
|
||||
}
|
||||
}
|
||||
}
|
||||
diff --git a/src/UserInterface/ListView/rightlistview.cpp b/src/UserInterface/ListView/rightlistview.cpp
|
||||
index 7725222..5a456bb 100755
|
||||
--- a/src/UserInterface/ListView/rightlistview.cpp
|
||||
+++ b/src/UserInterface/ListView/rightlistview.cpp
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <syslog.h>
|
||||
#include <QPushButton>
|
||||
#include <QGSettings>
|
||||
+#include <QtConcurrent/QtConcurrent>
|
||||
|
||||
RightListView::RightListView(QWidget *parent):
|
||||
KListView(parent)
|
||||
@@ -128,12 +129,12 @@ void RightListView::keyPressEvent(QKeyEvent *e)
|
||||
|
||||
void RightListView::onClicked(QModelIndex index)
|
||||
{
|
||||
- Q_EMIT sendHideMainWindowSignal();
|
||||
QVariant var = listmodel->data(index, Qt::DisplayRole);
|
||||
QString desktopfp = var.value<QStringList>().at(0);
|
||||
if (var.isValid()) {
|
||||
QString desktopfp = var.value<QString>();
|
||||
- execApp(desktopfp);
|
||||
+ Q_EMIT sendHideMainWindowSignal();
|
||||
+ QtConcurrent::run(execApp, QString(desktopfp));
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/UserInterface/Widget/full_commonuse_widget.cpp b/src/UserInterface/Widget/full_commonuse_widget.cpp
|
||||
index 6f138f1..05d9d14 100755
|
||||
--- a/src/UserInterface/Widget/full_commonuse_widget.cpp
|
||||
+++ b/src/UserInterface/Widget/full_commonuse_widget.cpp
|
||||
@@ -147,7 +147,6 @@ void FullCommonUseWidget::initAppListWidget()
|
||||
m_listView->installEventFilter(this);
|
||||
m_scrollAreaWidLayout->addWidget(m_listView);
|
||||
m_listView->setFixedWidth(m_scrollAreaWid->width());
|
||||
- connect(m_listView, &FullListView::sendItemClickedSignal, this, &FullCommonUseWidget::execApplication);
|
||||
connect(m_listView, &FullListView::sendUpdateAppListSignal, this, &FullCommonUseWidget::updateListViewSlot);
|
||||
connect(m_listView, &FullListView::sendCollectViewUpdate, this, &FullCommonUseWidget::sendCollectViewUpdate);
|
||||
connect(m_listView, &FullListView::sendHideMainWindowSignal, this, &FullCommonUseWidget::sendHideMainWindowSignal);
|
||||
@@ -185,15 +184,6 @@ void FullCommonUseWidget::fillAppList()
|
||||
resizeScrollAreaControls();
|
||||
}
|
||||
|
||||
-/**
|
||||
- * 执行应用程序
|
||||
- */
|
||||
-void FullCommonUseWidget::execApplication(QString desktopfp)
|
||||
-{
|
||||
- Q_EMIT sendHideMainWindowSignal();
|
||||
- execApp(desktopfp);
|
||||
-}
|
||||
-
|
||||
void FullCommonUseWidget::selectFirstItem()
|
||||
{
|
||||
m_listView->setCurrentIndex(m_listView->model()->index(0, 0));
|
||||
diff --git a/src/UserInterface/Widget/full_commonuse_widget.h b/src/UserInterface/Widget/full_commonuse_widget.h
|
||||
index d13ad45..cfce3da 100755
|
||||
--- a/src/UserInterface/Widget/full_commonuse_widget.h
|
||||
+++ b/src/UserInterface/Widget/full_commonuse_widget.h
|
||||
@@ -102,11 +102,6 @@ protected:
|
||||
bool eventFilter(QObject *watched, QEvent *event);
|
||||
|
||||
public Q_SLOTS:
|
||||
- /**
|
||||
- * @brief Open the application
|
||||
- * @param arg: Desktop file path
|
||||
- */
|
||||
- void execApplication(QString desktopfp);
|
||||
/**
|
||||
* @brief Update the application list slot function
|
||||
*/
|
||||
diff --git a/src/UserInterface/Widget/full_function_widget.cpp b/src/UserInterface/Widget/full_function_widget.cpp
|
||||
index b07133f..09cc615 100755
|
||||
--- a/src/UserInterface/Widget/full_function_widget.cpp
|
||||
+++ b/src/UserInterface/Widget/full_function_widget.cpp
|
||||
@@ -208,21 +208,11 @@ 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);
|
||||
connect(listview, &FullListView::sendCollectViewUpdate, this, &FullFunctionWidget::sendCollectViewUpdate);
|
||||
}
|
||||
|
||||
-/**
|
||||
- * 执行应用程序
|
||||
- */
|
||||
-void FullFunctionWidget::execApplication(QString desktopfp)
|
||||
-{
|
||||
- Q_EMIT sendHideMainWindowSignal();
|
||||
- execApp(desktopfp);
|
||||
-}
|
||||
-
|
||||
void FullFunctionWidget::on_setAreaScrollBarValue(int value)
|
||||
{
|
||||
// m_scrollArea->verticalScrollBar()->setMaximum(maxmumValue);
|
||||
diff --git a/src/UserInterface/Widget/full_function_widget.h b/src/UserInterface/Widget/full_function_widget.h
|
||||
index 22e2a99..88493a0 100755
|
||||
--- a/src/UserInterface/Widget/full_function_widget.h
|
||||
+++ b/src/UserInterface/Widget/full_function_widget.h
|
||||
@@ -142,11 +142,6 @@ protected:
|
||||
bool eventFilter(QObject *watched, QEvent *event);
|
||||
|
||||
public Q_SLOTS:
|
||||
- /**
|
||||
- * @brief Open the application
|
||||
- * @param arg: Desktop file path
|
||||
- */
|
||||
- void execApplication(QString desktopfp);
|
||||
/**
|
||||
* @brief Respond to button click
|
||||
* @param btn: QButtonGroup button
|
||||
diff --git a/src/UserInterface/Widget/full_letter_widget.cpp b/src/UserInterface/Widget/full_letter_widget.cpp
|
||||
index 64e7537..bd51f38 100755
|
||||
--- a/src/UserInterface/Widget/full_letter_widget.cpp
|
||||
+++ b/src/UserInterface/Widget/full_letter_widget.cpp
|
||||
@@ -206,7 +206,6 @@ 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);
|
||||
connect(listview, &FullListView::sendCollectViewUpdate, this, &FullLetterWidget::sendCollectViewUpdate);
|
||||
@@ -216,15 +215,6 @@ void FullLetterWidget::fillAppList()
|
||||
resizeScrollAreaControls();
|
||||
}
|
||||
|
||||
-/**
|
||||
- * 执行应用程序
|
||||
- */
|
||||
-void FullLetterWidget::execApplication(QString desktopfp)
|
||||
-{
|
||||
- Q_EMIT sendHideMainWindowSignal();
|
||||
- execApp(desktopfp);
|
||||
-}
|
||||
-
|
||||
void FullLetterWidget::on_setAreaScrollBarValue(int value)
|
||||
{
|
||||
// m_scrollArea->verticalScrollBar()->setMaximum(maxmumValue);
|
||||
diff --git a/src/UserInterface/Widget/full_letter_widget.h b/src/UserInterface/Widget/full_letter_widget.h
|
||||
index 9799ee4..72c25a0 100755
|
||||
--- a/src/UserInterface/Widget/full_letter_widget.h
|
||||
+++ b/src/UserInterface/Widget/full_letter_widget.h
|
||||
@@ -147,11 +147,6 @@ public Q_SLOTS:
|
||||
* @param btn: QButtonGroup button
|
||||
*/
|
||||
void btnGroupClickedSlot(QAbstractButton *btn);
|
||||
- /**
|
||||
- * @brief Open the application
|
||||
- * @param arg: Desktop file path
|
||||
- */
|
||||
- void execApplication(QString desktopfp);
|
||||
/**
|
||||
* @brief Update application list slot function
|
||||
*/
|
||||
diff --git a/src/UserInterface/Widget/full_searchresult_widget.cpp b/src/UserInterface/Widget/full_searchresult_widget.cpp
|
||||
index e42d151..a37fc83 100755
|
||||
--- a/src/UserInterface/Widget/full_searchresult_widget.cpp
|
||||
+++ b/src/UserInterface/Widget/full_searchresult_widget.cpp
|
||||
@@ -136,7 +136,6 @@ void FullSearchResultWidget::initAppListWidget()
|
||||
m_listView->installEventFilter(this);
|
||||
m_scrollAreaWidLayout->addWidget(m_listView);
|
||||
m_listView->setFixedWidth(m_scrollArea->width());
|
||||
- connect(m_listView, &FullListView::sendItemClickedSignal, this, &FullSearchResultWidget::execApplication);
|
||||
connect(m_listView, &FullListView::sendHideMainWindowSignal, this, &FullSearchResultWidget::sendHideMainWindowSignal);
|
||||
connect(m_listView, &FullListView::sendSetslidebar, this, &FullSearchResultWidget::onSetSlider);
|
||||
connect(m_listView, &FullListView::sendCollectViewUpdate, this, &FullSearchResultWidget::sendCollectViewUpdate);
|
||||
@@ -148,14 +147,6 @@ void FullSearchResultWidget::fillAppList()
|
||||
m_listView->addData(m_data);
|
||||
resizeScrollAreaControls();
|
||||
}
|
||||
-/**
|
||||
- * 执行应用程序
|
||||
- */
|
||||
-void FullSearchResultWidget::execApplication(QString desktopfp)
|
||||
-{
|
||||
- Q_EMIT sendHideMainWindowSignal();
|
||||
- execApp(desktopfp);
|
||||
-}
|
||||
|
||||
void FullSearchResultWidget::updateAppListView(QVector<QStringList> arg)
|
||||
{
|
||||
diff --git a/src/UserInterface/Widget/full_searchresult_widget.h b/src/UserInterface/Widget/full_searchresult_widget.h
|
||||
index e557b7d..73a42df 100755
|
||||
--- a/src/UserInterface/Widget/full_searchresult_widget.h
|
||||
+++ b/src/UserInterface/Widget/full_searchresult_widget.h
|
||||
@@ -90,11 +90,6 @@ protected:
|
||||
bool eventFilter(QObject *watched, QEvent *event);
|
||||
|
||||
public Q_SLOTS:
|
||||
- /**
|
||||
- * @brief Open the application
|
||||
- * @param arg: Desktop file path
|
||||
- */
|
||||
- void execApplication(QString desktopfp);
|
||||
|
||||
void selectFirstItemTab();
|
||||
|
||||
diff --git a/src/UtilityFunction/utility.cpp b/src/UtilityFunction/utility.cpp
|
||||
index 40c6f08..1e320a3 100755
|
||||
--- a/src/UtilityFunction/utility.cpp
|
||||
+++ b/src/UtilityFunction/utility.cpp
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <QApplication>
|
||||
#include <QDBusInterface>
|
||||
#include <QScreen>
|
||||
+#include <QtConcurrent/QtConcurrent>
|
||||
#include "ukuimenuinterface.h"
|
||||
|
||||
#define DATABASENAME QDir::homePath()+"/.config/ukui/"+"UkuiMenu.db"
|
||||
@@ -710,14 +711,16 @@ bool deleteAppRecord(QString desktopfn)
|
||||
|
||||
void execApp(QString desktopfp)
|
||||
{
|
||||
+ QDBusReply<bool> result;
|
||||
+ if (QDBusConnection::connectToBus(QDBusConnection::SessionBus, QString("com.kylin.AppManager")).isConnected()) {
|
||||
+ QDBusInterface iface("com.kylin.AppManager", "/com/kylin/AppManager", "com.kylin.AppManager");
|
||||
+ if (iface.isValid()) {
|
||||
+ result = iface.call("LaunchApp", desktopfp);
|
||||
+ myDebug() << "LaunchApp desktopFile:" << desktopfp;
|
||||
+ }
|
||||
+ }
|
||||
|
||||
- QDBusInterface iface("com.kylin.AppManager",
|
||||
- "/com/kylin/AppManager",
|
||||
- "com.kylin.AppManager",
|
||||
- QDBusConnection::sessionBus());
|
||||
- QDBusReply<bool> res = iface.call("LaunchApp", desktopfp);
|
||||
-
|
||||
- if (!res.isValid() || !res) {
|
||||
+ if (!result.isValid() || !result) {
|
||||
|
||||
UkuiMenuInterface interface;
|
||||
|
||||
48
0013-21-.pro-openKylin-0.7.5.patch
Normal file
48
0013-21-.pro-openKylin-0.7.5.patch
Normal file
@ -0,0 +1,48 @@
|
||||
From: lixueman <lixueman@kylinos.cn>
|
||||
Date: Mon, 10 Oct 2022 03:15:52 +0000
|
||||
Subject: =?utf-8?b?ITIxIOS/ruaUueaehOW7uuaWh+aho+WSjC5wcm/lt6XnqIvmlofku7Y=?=
|
||||
=?utf-8?b?77yM6Kej5Yaz5ZyoIG9wZW5LeWxpbiAwLjcuNSDkuIrnvJbor5HlpLHotKXnmoQ=?=
|
||||
=?utf-8?b?6Zeu6aKYIE1lcmdlIHB1bGwgcmVxdWVzdCAhMjEgZnJvbSDogIHomY7kvJrmuLg=?=
|
||||
=?utf-8?b?5rOzL29wZW5reWxpbi95YW5ndHpl?=
|
||||
|
||||
---
|
||||
README.md | 2 +-
|
||||
ukui-menu.desktop | 0
|
||||
ukui-menu.pro | 4 ++--
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
mode change 100755 => 100644 ukui-menu.desktop
|
||||
|
||||
diff --git a/README.md b/README.md
|
||||
index ff12dc9..f6ddfbd 100755
|
||||
--- a/README.md
|
||||
+++ b/README.md
|
||||
@@ -46,7 +46,7 @@ bugfixes for this package.
|
||||
## Preparation
|
||||
You can build pre-depends with such command:
|
||||
|
||||
-`sudo apt install libglib2.0-dev qtbase5-dev libqt5svg5-dev libqt5x11extras5-dev libgsettings-qt-dev libbamf3-dev libxrandr-dev libxtst-dev libx11-dev`
|
||||
+`sudo apt install g++ qtbase5-dev qttools5-dev-tools libglib2.0-dev libqt5svg5-dev libqt5x11extras5-dev libgsettings-qt-dev libbamf3-dev libxrandr-dev libxtst-dev libx11-dev libkf5windowsystem-dev libuchardet-dev libpeony-dev libkysdk-waylandhelper-dev libukui-common-dev`
|
||||
|
||||
Note: build-depends references the paragraph in debian/control.
|
||||
|
||||
diff --git a/ukui-menu.desktop b/ukui-menu.desktop
|
||||
old mode 100755
|
||||
new mode 100644
|
||||
diff --git a/ukui-menu.pro b/ukui-menu.pro
|
||||
index 1ca9797..e7e5283 100755
|
||||
--- a/ukui-menu.pro
|
||||
+++ b/ukui-menu.pro
|
||||
@@ -48,11 +48,11 @@ INSTALLS += qm_files
|
||||
# So we can access it from main.cpp
|
||||
DEFINES += QM_FILES_INSTALL_PATH='\\"$${QM_FILES_INSTALL_PATH}\\"'
|
||||
|
||||
-PKGCONFIG+=glib-2.0 gio-unix-2.0 gsettings-qt libbamf3 x11 xtst kysdk-waylandhelper
|
||||
+PKGCONFIG+=glib-2.0 gio-unix-2.0 gsettings-qt libbamf3 x11 kysdk-waylandhelper
|
||||
|
||||
CONFIG += no_keywords link_pkgconfig
|
||||
|
||||
-LIBS+=-pthread -luchardet -lukui-log4qt -lukui-com4c -lukui-com4cxx -lpeony
|
||||
+LIBS+=-pthread -luchardet -lukui-log4qt -lukui-com4c -lukui-com4cxx -lpeony -lXtst
|
||||
|
||||
desktop_file.files = ukui-menu.desktop
|
||||
desktop_file.path = /etc/xdg/autostart
|
||||
7082
0014-19.patch
Normal file
7082
0014-19.patch
Normal file
File diff suppressed because it is too large
Load Diff
189
0015-22.patch
Normal file
189
0015-22.patch
Normal file
@ -0,0 +1,189 @@
|
||||
From: lixueman <lixueman@kylinos.cn>
|
||||
Date: Thu, 20 Oct 2022 01:21:06 +0000
|
||||
Subject: =?utf-8?b?ITIyIOm7mOiupOeql+WPo+WinuWKoOmYtOW9sSBNZXJnZSBwdWxsIHJl?=
|
||||
=?utf-8?b?cXVlc3QgITIyIGZyb20gbGl4dWVtYW4vb3Blbmt5bGluL3lhbmd0emU=?=
|
||||
|
||||
---
|
||||
src/UserInterface/ListView/listview.cpp | 26 +++++++++++++++++++---
|
||||
src/UserInterface/ListView/listview.h | 3 ++-
|
||||
src/UserInterface/Widget/main_view_widget.cpp | 15 ++-----------
|
||||
src/UserInterface/mainwindow.cpp | 32 ++++++++++++++-------------
|
||||
4 files changed, 44 insertions(+), 32 deletions(-)
|
||||
|
||||
diff --git a/src/UserInterface/ListView/listview.cpp b/src/UserInterface/ListView/listview.cpp
|
||||
index f781921..89be87b 100755
|
||||
--- a/src/UserInterface/ListView/listview.cpp
|
||||
+++ b/src/UserInterface/ListView/listview.cpp
|
||||
@@ -29,6 +29,7 @@ ListView::ListView(QWidget *parent/*, int width, int height, int module*/):
|
||||
this->h = 540;
|
||||
this->module = 1;
|
||||
initWidget();
|
||||
+ setAttribute(Qt::WA_AcceptTouchEvents);
|
||||
m_listmodel = new QStandardItemModel(this);
|
||||
this->setModel(m_listmodel);
|
||||
m_ukuiMenuInterface = new UkuiMenuInterface;
|
||||
@@ -95,6 +96,21 @@ void ListView::updateData(QVector<QStringList> data)
|
||||
}
|
||||
}
|
||||
|
||||
+bool ListView::event(QEvent *e)
|
||||
+{
|
||||
+ switch (e->type()) {
|
||||
+ case QEvent::TouchBegin:
|
||||
+ m_scrollbarState = false;
|
||||
+ break;
|
||||
+ case QEvent::ChildRemoved:
|
||||
+ m_scrollbarState = true;
|
||||
+ break;
|
||||
+ default:
|
||||
+ break;
|
||||
+ }
|
||||
+ return QListView::event(e);
|
||||
+}
|
||||
+
|
||||
void ListView::onClicked(QModelIndex index)
|
||||
{
|
||||
QVariant var = m_listmodel->data(index, Qt::DisplayRole);
|
||||
@@ -119,14 +135,18 @@ void ListView::onClicked(QModelIndex index)
|
||||
void ListView::enterEvent(QEvent *e)
|
||||
{
|
||||
Q_UNUSED(e);
|
||||
- this->selectionModel()->clear();
|
||||
- this->verticalScrollBar()->setVisible(true);
|
||||
+ if (m_scrollbarState) {
|
||||
+ this->selectionModel()->clear();
|
||||
+ verticalScrollBar()->setVisible(true);
|
||||
+ }
|
||||
}
|
||||
|
||||
void ListView::leaveEvent(QEvent *e)
|
||||
{
|
||||
Q_UNUSED(e);
|
||||
- this->verticalScrollBar()->setVisible(false);
|
||||
+ if (m_scrollbarState) {
|
||||
+ verticalScrollBar()->setVisible(false);
|
||||
+ }
|
||||
}
|
||||
|
||||
void ListView::paintEvent(QPaintEvent *e)
|
||||
diff --git a/src/UserInterface/ListView/listview.h b/src/UserInterface/ListView/listview.h
|
||||
index ff39d9b..f9125e8 100755
|
||||
--- a/src/UserInterface/ListView/listview.h
|
||||
+++ b/src/UserInterface/ListView/listview.h
|
||||
@@ -49,11 +49,12 @@ protected:
|
||||
void leaveEvent(QEvent *e) Q_DECL_OVERRIDE;
|
||||
void paintEvent(QPaintEvent *e) override;
|
||||
void keyPressEvent(QKeyEvent *e);
|
||||
-
|
||||
+ bool event(QEvent *e);
|
||||
private:
|
||||
int w = 0;
|
||||
int h = 0;
|
||||
int m_preRowCount;
|
||||
+ bool m_scrollbarState = true;
|
||||
|
||||
|
||||
private Q_SLOTS:
|
||||
diff --git a/src/UserInterface/Widget/main_view_widget.cpp b/src/UserInterface/Widget/main_view_widget.cpp
|
||||
index c459745..c53fc53 100755
|
||||
--- a/src/UserInterface/Widget/main_view_widget.cpp
|
||||
+++ b/src/UserInterface/Widget/main_view_widget.cpp
|
||||
@@ -54,23 +54,12 @@ void MainViewWidget::styleChangeSlot(const QString &style)
|
||||
|
||||
void MainViewWidget::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
-// double transparency = getTransparency();
|
||||
- QRect rect = this->rect();
|
||||
+ QRect rect = this->rect().adjusted(5, 5, 0, -5);
|
||||
QPainterPath path;
|
||||
QPainter painter(this);
|
||||
+ path.addRoundedRect(rect, 10, 10);
|
||||
painter.setRenderHint(QPainter::Antialiasing); // 反锯齿;
|
||||
painter.setPen(Qt::transparent);
|
||||
- qreal radius = 10;
|
||||
- path.moveTo(rect.topRight() - QPointF(radius, 0));
|
||||
- path.lineTo(rect.topLeft() + QPointF(radius, 0));
|
||||
- path.quadTo(rect.topLeft(), rect.topLeft() + QPointF(0, radius));
|
||||
- path.lineTo(rect.bottomLeft() + QPointF(0, -radius));
|
||||
- path.quadTo(rect.bottomLeft(), rect.bottomLeft() + QPointF(radius, 0));
|
||||
- path.lineTo(rect.bottomRight() - QPointF(radius, 0));
|
||||
- path.quadTo(rect.bottomRight(), rect.bottomRight() + QPointF(0, -radius));
|
||||
- path.lineTo(rect.topRight() + QPointF(0, radius));
|
||||
- path.quadTo(rect.topRight(), rect.topRight() + QPointF(-radius, -0));
|
||||
- painter.setPen(Qt::transparent);
|
||||
painter.setOpacity(0.58);
|
||||
painter.fillPath(path, m_backColor);
|
||||
QWidget::paintEvent(event);
|
||||
diff --git a/src/UserInterface/mainwindow.cpp b/src/UserInterface/mainwindow.cpp
|
||||
index 53451fd..0c07b15 100755
|
||||
--- a/src/UserInterface/mainwindow.cpp
|
||||
+++ b/src/UserInterface/mainwindow.cpp
|
||||
@@ -674,27 +674,29 @@ void MainWindow::paintEvent(QPaintEvent *event)
|
||||
if ( transparency == 1) {
|
||||
curColor.setAlpha(255);
|
||||
}
|
||||
- QRect rect = this->rect();
|
||||
+ QRect rect = this->rect().adjusted(5, 5, -5, -5);
|
||||
QPainterPath path;
|
||||
- // rect.setTopLeft(QPoint(rect.x()+320,rect.y()));
|
||||
QPainter painter(this);
|
||||
painter.setRenderHint(QPainter::Antialiasing); // 反锯齿;
|
||||
+ painter.save();
|
||||
painter.setPen(Qt::transparent);
|
||||
- qreal radius = 10;
|
||||
- path.moveTo(rect.topRight() - QPointF(radius, 0));
|
||||
- path.lineTo(rect.topLeft() + QPointF(radius, 0));
|
||||
- path.quadTo(rect.topLeft(), rect.topLeft() + QPointF(0, radius));
|
||||
- path.lineTo(rect.bottomLeft() + QPointF(0, -radius));
|
||||
- path.quadTo(rect.bottomLeft(), rect.bottomLeft() + QPointF(radius, 0));
|
||||
- path.lineTo(rect.bottomRight() - QPointF(radius, 0));
|
||||
- path.quadTo(rect.bottomRight(), rect.bottomRight() + QPointF(0, -radius));
|
||||
- path.lineTo(rect.topRight() + QPointF(0, radius));
|
||||
- path.quadTo(rect.topRight(), rect.topRight() + QPointF(-radius, -0));
|
||||
+ path.addRoundedRect(rect, 10, 10);
|
||||
painter.setBrush(curColor);
|
||||
painter.setPen(Qt::transparent);
|
||||
painter.setOpacity(transparency);
|
||||
painter.drawPath(path);
|
||||
+ painter.restore();
|
||||
KWindowEffects::enableBlurBehind(this->winId(), true, QRegion(path.toFillPolygon().toPolygon()));
|
||||
+ QColor color = Qt::black;
|
||||
+ painter.save();
|
||||
+ for (int i = 0; i < 7; i++) {
|
||||
+ rect = this->rect().adjusted(i, i, - i, - i);
|
||||
+ color.setAlpha(i * 6);
|
||||
+ painter.setBrush(Qt::NoBrush);
|
||||
+ painter.setPen(QPen(color, 1));
|
||||
+ painter.drawRoundedRect(rect, 10, 10);
|
||||
+ }
|
||||
+ painter.restore();
|
||||
QMainWindow::paintEvent(event);
|
||||
}
|
||||
/**
|
||||
@@ -1276,7 +1278,7 @@ void MainWindow::on_minMaxChangeButton_clicked()
|
||||
m_maxAnimation->setDuration(1);
|
||||
} else {
|
||||
m_animationPage->show();
|
||||
- m_animationPage->setGeometry(this->x(), this->y(), Style::m_minw, Style::m_minh);
|
||||
+ m_animationPage->setGeometry(this->x() + 5, this->y() + 5, Style::m_minw - 10, Style::m_minh - 10);
|
||||
m_animationPage->raise();
|
||||
m_animationPage->repaint();
|
||||
m_maxAnimation->setDuration(260);
|
||||
@@ -1287,7 +1289,7 @@ void MainWindow::on_minMaxChangeButton_clicked()
|
||||
loop.exec();
|
||||
m_maxAnimation->setEasingCurve(QEasingCurve::OutExpo);
|
||||
// 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::m_minw, Style::m_minh));
|
||||
+ m_maxAnimation->setStartValue(QRect(this->x() + 5, this->y() + 5, Style::m_minw - 10, Style::m_minh - 10));
|
||||
m_maxAnimation->setEndValue(QRect(0, 0, Style::m_availableScreenWidth, Style::m_availableScreenHeight));
|
||||
|
||||
m_maxAnimation->start(QAbstractAnimation::DeleteWhenStopped);
|
||||
@@ -1410,7 +1412,7 @@ void MainWindow::showNormalWindowSlot()
|
||||
m_isFullScreen = false;
|
||||
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::m_minw, Style::m_minh));
|
||||
+ m_minAnimation->setEndValue(QRect(this->x() + 5, this->y() + 5, Style::m_minw - 10, Style::m_minh - 10));
|
||||
|
||||
m_minAnimation->start(QAbstractAnimation::DeleteWhenStopped);
|
||||
m_fullWindow->hide();
|
||||
121
0016-25-upstream.patch
Normal file
121
0016-25-upstream.patch
Normal file
@ -0,0 +1,121 @@
|
||||
From: lixueman <lixueman@kylinos.cn>
|
||||
Date: Mon, 24 Oct 2022 09:31:59 +0000
|
||||
Subject: =?utf-8?b?ITI1IOWQjOatpXVwc3RyZWFt5Luj56CB77yM5L+u5pS55YWo5bGP5byA?=
|
||||
=?utf-8?b?5aeL6I+c5Y2V5L2N572u6Zeu6aKYIE1lcmdlIHB1bGwgcmVxdWVzdCAhMjUgZnJv?=
|
||||
=?utf-8?b?bSBsaXh1ZW1hbi9vcGVua3lsaW4veWFuZ3R6ZQ==?=
|
||||
|
||||
---
|
||||
src/BackProcess/Interface/ukuimenuinterface.cpp | 2 +-
|
||||
src/UserInterface/Widget/full_commonuse_widget.cpp | 4 +++-
|
||||
src/UserInterface/mainwindow.cpp | 8 +++++++-
|
||||
src/UtilityFunction/utility.cpp | 23 +++++++++++-----------
|
||||
4 files changed, 23 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/src/BackProcess/Interface/ukuimenuinterface.cpp b/src/BackProcess/Interface/ukuimenuinterface.cpp
|
||||
index 7879cc0..d7438fb 100755
|
||||
--- a/src/BackProcess/Interface/ukuimenuinterface.cpp
|
||||
+++ b/src/BackProcess/Interface/ukuimenuinterface.cpp
|
||||
@@ -375,7 +375,7 @@ QStringList UkuiMenuInterface::getDesktopFilePath()
|
||||
m_filePathList.removeAll("/usr/share/applications/kylin-io-monitor.desktop");
|
||||
m_filePathList.removeAll("/usr/share/applications/wps-office-uninstall.desktop");
|
||||
m_filePathList.removeAll("/usr/share/applications/wps-office-misc.desktop");
|
||||
- m_filePathList.removeAll("/usr/share/applications/kylin-installer.desktop");
|
||||
+// m_filePathList.removeAll("/usr/share/applications/kylin-installer.desktop");
|
||||
QStringList desktopList;
|
||||
|
||||
for (int i = 0; i < m_filePathList.count(); ++i) {
|
||||
diff --git a/src/UserInterface/Widget/full_commonuse_widget.cpp b/src/UserInterface/Widget/full_commonuse_widget.cpp
|
||||
index 6adab1a..adbce44 100755
|
||||
--- a/src/UserInterface/Widget/full_commonuse_widget.cpp
|
||||
+++ b/src/UserInterface/Widget/full_commonuse_widget.cpp
|
||||
@@ -170,7 +170,7 @@ void FullCommonUseWidget::resizeScrollAreaControls()
|
||||
rowcount = listview->model()->rowCount() / dividend;
|
||||
}
|
||||
|
||||
- listview->setFixedSize(m_listView->width(), listview->gridSize().height() * rowcount);
|
||||
+ listview->setFixedSize(Style::m_applistAreaWidth, listview->gridSize().height() * rowcount);
|
||||
m_scrollArea->widget()->setFixedSize(listview->size());
|
||||
}
|
||||
|
||||
@@ -275,11 +275,13 @@ void FullCommonUseWidget::updateListView()
|
||||
void FullCommonUseWidget::repaintWidget()
|
||||
{
|
||||
m_scrollArea->setFixedSize(Style::m_applistAreaWidth, Style::m_applistWidHeight);
|
||||
+ m_scrollArea->setWidgetResizable(true);
|
||||
m_scrollAreaWidLayout->removeWidget(m_listView);
|
||||
m_listView->setParent(nullptr);
|
||||
delete m_listView;
|
||||
initAppListWidget();
|
||||
fillAppList();
|
||||
+ m_scrollAreaWid->adjustSize();
|
||||
m_scrollAreaWidHeight = m_scrollAreaWid->height();
|
||||
initVerticalScrollBar();
|
||||
on_setAreaScrollBarValue(0);
|
||||
diff --git a/src/UserInterface/mainwindow.cpp b/src/UserInterface/mainwindow.cpp
|
||||
index 0c07b15..42a5e78 100755
|
||||
--- a/src/UserInterface/mainwindow.cpp
|
||||
+++ b/src/UserInterface/mainwindow.cpp
|
||||
@@ -1382,8 +1382,14 @@ void MainWindow::repaintWidget()
|
||||
int y = Style::m_primaryScreenY;
|
||||
int width = Style::m_availableScreenWidth;
|
||||
int height = Style::m_availableScreenHeight;
|
||||
+
|
||||
setMinWindowPos();
|
||||
- m_fullWindow->move(x, y);
|
||||
+
|
||||
+ if (g_platform.startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) {
|
||||
+ kdk::WindowManager::setGeometry(m_fullWindow->windowHandle(), QRect(x, y, width, height));
|
||||
+ } else {
|
||||
+ m_fullWindow->move(x, y);
|
||||
+ }
|
||||
m_fullWindow->setFixedSize(width, height);
|
||||
m_fullWindow->repaintWidget();
|
||||
}
|
||||
diff --git a/src/UtilityFunction/utility.cpp b/src/UtilityFunction/utility.cpp
|
||||
index c7b63e7..1873136 100755
|
||||
--- a/src/UtilityFunction/utility.cpp
|
||||
+++ b/src/UtilityFunction/utility.cpp
|
||||
@@ -138,23 +138,24 @@ QVariantList getScreenGeometryList()
|
||||
QRect rect;
|
||||
rect = qApp->primaryScreen()->geometry();
|
||||
int panelSize = 0;
|
||||
- int position = 0;
|
||||
+ int panelPosition = 0;
|
||||
QVariantList list;
|
||||
list.clear();
|
||||
- QDBusInterface iface(DBUS_NAME,
|
||||
- DBUS_PATH,
|
||||
- DBUS_INTERFACE,
|
||||
- QDBusConnection::sessionBus());
|
||||
- QDBusReply<QVariantList> reply = iface.call("GetPrimaryScreenPhysicalGeometry");
|
||||
|
||||
- if (reply.isValid()) {
|
||||
- panelSize = reply.value().at(4).toInt();
|
||||
- position = reply.value().at(5).toInt();
|
||||
+ if (QGSettings::isSchemaInstalled(QString("org.ukui.panel.settings").toLocal8Bit())) {
|
||||
+ QGSettings gsetting(QString("org.ukui.panel.settings").toLocal8Bit());
|
||||
+ if (gsetting.keys().contains("panelposition")) {
|
||||
+ panelPosition = gsetting.get("panelposition").toInt();
|
||||
+ }
|
||||
+
|
||||
+ if (gsetting.keys().contains("panelsize")) {
|
||||
+ panelSize = gsetting.get("panelsize").toInt();
|
||||
+ }
|
||||
}
|
||||
|
||||
QList<int> posIndex;
|
||||
|
||||
- switch (position) {
|
||||
+ switch (panelPosition) {
|
||||
case BOTTOM:
|
||||
posIndex = {0, 0, 0, -1};
|
||||
break;
|
||||
@@ -173,7 +174,7 @@ QVariantList getScreenGeometryList()
|
||||
list.append(rect.width() + posIndex[2] * panelSize);
|
||||
list.append(rect.height() + posIndex[3] * panelSize);
|
||||
list.append(panelSize);
|
||||
- list.append(position);
|
||||
+ list.append(panelPosition);
|
||||
return list;
|
||||
}
|
||||
|
||||
22
0017-27.patch
Normal file
22
0017-27.patch
Normal file
@ -0,0 +1,22 @@
|
||||
From: =?utf-8?b?5byg5aSp5rO9?=
|
||||
<11297911+zhang_tian_ze@user.noreply.gitee.com>
|
||||
Date: Wed, 2 Nov 2022 12:51:54 +0000
|
||||
Subject: =?utf-8?b?ITI3IOi/mOaYr+S/ruaUueWbvuagh+aooeeziumXrumimA==?=
|
||||
|
||||
---
|
||||
src/UtilityFunction/utility.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/UtilityFunction/utility.cpp b/src/UtilityFunction/utility.cpp
|
||||
index 1873136..8af6b3f 100755
|
||||
--- a/src/UtilityFunction/utility.cpp
|
||||
+++ b/src/UtilityFunction/utility.cpp
|
||||
@@ -109,7 +109,7 @@ QIcon getCurIcon(const QString &iconPath, bool autoSet)
|
||||
if (iconPath.endsWith("png")) {
|
||||
pixmap = QPixmap(iconPath);
|
||||
} else {
|
||||
- pixmap = loadSvg(iconPath, 16);
|
||||
+ pixmap = loadSvg(iconPath, 26);
|
||||
}
|
||||
|
||||
if (!autoSet) {
|
||||
95
0018-update-changelog.patch
Normal file
95
0018-update-changelog.patch
Normal file
@ -0,0 +1,95 @@
|
||||
From: lixueman <lixueman@kylinos.cn>
|
||||
Date: Fri, 4 Nov 2022 16:49:06 +0800
|
||||
Subject: update changelog
|
||||
|
||||
---
|
||||
src/UserInterface/ViewItem/itemdelegate.cpp | 4 ++--
|
||||
src/UserInterface/Widget/full_commonuse_widget.cpp | 1 +
|
||||
src/UserInterface/Widget/full_function_widget.cpp | 1 +
|
||||
src/UserInterface/Widget/full_letter_widget.cpp | 1 +
|
||||
src/UserInterface/Widget/full_searchresult_widget.cpp | 1 +
|
||||
src/UserInterface/mainwindow.cpp | 1 +
|
||||
6 files changed, 7 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/UserInterface/ViewItem/itemdelegate.cpp b/src/UserInterface/ViewItem/itemdelegate.cpp
|
||||
index ba41cc7..1615b37 100755
|
||||
--- a/src/UserInterface/ViewItem/itemdelegate.cpp
|
||||
+++ b/src/UserInterface/ViewItem/itemdelegate.cpp
|
||||
@@ -242,7 +242,7 @@ void ItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option,
|
||||
painter->restore();
|
||||
|
||||
if ((option.state & QStyle::State_MouseOver) || (option.state & QStyle::State_HasFocus)) {
|
||||
- QToolTip::showText(QCursor::pos(), "为了刷新");
|
||||
+ QToolTip::hideText();
|
||||
int len = fm.boundingRect(appname).width();
|
||||
//富文本,tooltip可自动换行
|
||||
QString tipString = QString("<font>");
|
||||
@@ -252,7 +252,7 @@ void ItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option,
|
||||
tipString += tr("path:") + url;
|
||||
}
|
||||
tipString += QString("</font>");
|
||||
- QToolTip::showText(option.widget->mapToGlobal(QPoint(rect.right() + 20, rect.center().y())), tipString);
|
||||
+ QToolTip::showText(option.widget->mapToGlobal(QPoint(rect.right(), rect.center().y())), tipString);
|
||||
}
|
||||
} else {
|
||||
QRect iconRect = QRect(rect.left() + 11, rect.y() + (rect.height() - 32) / 2, 32, 32);
|
||||
diff --git a/src/UserInterface/Widget/full_commonuse_widget.cpp b/src/UserInterface/Widget/full_commonuse_widget.cpp
|
||||
index adbce44..61c8da2 100755
|
||||
--- a/src/UserInterface/Widget/full_commonuse_widget.cpp
|
||||
+++ b/src/UserInterface/Widget/full_commonuse_widget.cpp
|
||||
@@ -133,6 +133,7 @@ void FullCommonUseWidget::initVerticalScrollBar()
|
||||
void FullCommonUseWidget::on_powerOffButton_clicked()
|
||||
{
|
||||
QProcess::startDetached(QString("ukui-session-tools"));
|
||||
+ Q_EMIT sendHideMainWindowSignal();
|
||||
}
|
||||
|
||||
void FullCommonUseWidget::on_powerOffButton_customContextMenuRequested(const QPoint &pos)
|
||||
diff --git a/src/UserInterface/Widget/full_function_widget.cpp b/src/UserInterface/Widget/full_function_widget.cpp
|
||||
index 6e95e13..d1a9f69 100755
|
||||
--- a/src/UserInterface/Widget/full_function_widget.cpp
|
||||
+++ b/src/UserInterface/Widget/full_function_widget.cpp
|
||||
@@ -153,6 +153,7 @@ void FullFunctionWidget::initVerticalScrollBar()
|
||||
void FullFunctionWidget::on_powerOffButton_clicked()
|
||||
{
|
||||
QProcess::startDetached(QString("ukui-session-tools"));
|
||||
+ Q_EMIT sendHideMainWindowSignal();
|
||||
}
|
||||
|
||||
void FullFunctionWidget::on_powerOffButton_customContextMenuRequested(const QPoint &pos)
|
||||
diff --git a/src/UserInterface/Widget/full_letter_widget.cpp b/src/UserInterface/Widget/full_letter_widget.cpp
|
||||
index 6bf48bb..7ffc770 100755
|
||||
--- a/src/UserInterface/Widget/full_letter_widget.cpp
|
||||
+++ b/src/UserInterface/Widget/full_letter_widget.cpp
|
||||
@@ -148,6 +148,7 @@ void FullLetterWidget::initVerticalScrollBar()
|
||||
void FullLetterWidget::on_powerOffButton_clicked()
|
||||
{
|
||||
QProcess::startDetached(QString("ukui-session-tools"));
|
||||
+ Q_EMIT sendHideMainWindowSignal();
|
||||
}
|
||||
|
||||
void FullLetterWidget::on_powerOffButton_customContextMenuRequested(const QPoint &pos)
|
||||
diff --git a/src/UserInterface/Widget/full_searchresult_widget.cpp b/src/UserInterface/Widget/full_searchresult_widget.cpp
|
||||
index 344add3..5b54614 100755
|
||||
--- a/src/UserInterface/Widget/full_searchresult_widget.cpp
|
||||
+++ b/src/UserInterface/Widget/full_searchresult_widget.cpp
|
||||
@@ -122,6 +122,7 @@ void FullSearchResultWidget::initVerticalScrollBar()
|
||||
void FullSearchResultWidget::on_powerOffButton_clicked()
|
||||
{
|
||||
QProcess::startDetached(QString("ukui-session-tools"));
|
||||
+ Q_EMIT sendHideMainWindowSignal();
|
||||
}
|
||||
|
||||
void FullSearchResultWidget::on_powerOffButton_customContextMenuRequested(const QPoint &pos)
|
||||
diff --git a/src/UserInterface/mainwindow.cpp b/src/UserInterface/mainwindow.cpp
|
||||
index 42a5e78..feb225a 100755
|
||||
--- a/src/UserInterface/mainwindow.cpp
|
||||
+++ b/src/UserInterface/mainwindow.cpp
|
||||
@@ -1426,6 +1426,7 @@ void MainWindow::showNormalWindowSlot()
|
||||
void MainWindow::on_powerOffButton_clicked()
|
||||
{
|
||||
QProcess::startDetached(QString("ukui-session-tools"));
|
||||
+ hideWindow();
|
||||
}
|
||||
void MainWindow::on_powerOffButton_customContextMenuRequested(const QPoint &pos)
|
||||
{
|
||||
150
0019-32.patch
Normal file
150
0019-32.patch
Normal file
@ -0,0 +1,150 @@
|
||||
From: lixueman <lixueman@kylinos.cn>
|
||||
Date: Thu, 24 Nov 2022 01:44:13 +0000
|
||||
Subject: =?utf-8?b?ITMyIOS/ruWkjeWFqOWxj+S9jee9rumXrumimO+8jOWinuWKoOaLlg==?=
|
||||
=?utf-8?b?5ou95Zu65a6a5Yiw5Lu75Yqh5qCP5Yqf6IO9IE1lcmdlIHB1bGwgcmVxdWVzdCAh?=
|
||||
=?utf-8?b?MzIgZnJvbSBsaXh1ZW1hbi9vcGVua3lsaW4veWFuZ3R6ZQ==?=
|
||||
|
||||
---
|
||||
src/UserInterface/ListView/klistview.cpp | 5 +++--
|
||||
src/UserInterface/ListView/klistview.h | 1 +
|
||||
src/UserInterface/ListView/listview.cpp | 31 +++++++++++++++++++++++++++++++
|
||||
src/UserInterface/ListView/listview.h | 3 ++-
|
||||
src/UserInterface/mainwindow.cpp | 4 ++--
|
||||
5 files changed, 39 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/UserInterface/ListView/klistview.cpp b/src/UserInterface/ListView/klistview.cpp
|
||||
index 91fbe08..28c83c2 100755
|
||||
--- a/src/UserInterface/ListView/klistview.cpp
|
||||
+++ b/src/UserInterface/ListView/klistview.cpp
|
||||
@@ -92,8 +92,9 @@ void KListView::mouseMoveEvent(QMouseEvent *e)
|
||||
|
||||
void KListView::mousePressEvent(QMouseEvent *event)
|
||||
{
|
||||
- if ((this->indexAt(event->pos()).isValid()) && event->button() == Qt::LeftButton) {
|
||||
- m_pressApp = m_listmodel->data(this->indexAt(event->pos()), Qt::DisplayRole);
|
||||
+ m_pressPos = event->pos();
|
||||
+ if ((this->indexAt(m_pressPos).isValid()) && event->button() == Qt::LeftButton) {
|
||||
+ m_pressApp = m_listmodel->data(this->indexAt(m_pressPos), Qt::DisplayRole);
|
||||
}
|
||||
return QListView::mousePressEvent(event);
|
||||
}
|
||||
diff --git a/src/UserInterface/ListView/klistview.h b/src/UserInterface/ListView/klistview.h
|
||||
index 503997b..2ac6f3d 100755
|
||||
--- a/src/UserInterface/ListView/klistview.h
|
||||
+++ b/src/UserInterface/ListView/klistview.h
|
||||
@@ -36,6 +36,7 @@ public:
|
||||
int module = 0;
|
||||
double m_transparency;
|
||||
QVariant m_pressApp;
|
||||
+ QPoint m_pressPos;
|
||||
UkuiMenuInterface *m_ukuiMenuInterface = nullptr;
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *e);
|
||||
diff --git a/src/UserInterface/ListView/listview.cpp b/src/UserInterface/ListView/listview.cpp
|
||||
index 89be87b..a9a9ed2 100755
|
||||
--- a/src/UserInterface/ListView/listview.cpp
|
||||
+++ b/src/UserInterface/ListView/listview.cpp
|
||||
@@ -18,9 +18,11 @@
|
||||
#include "listview.h"
|
||||
#include "function_button_widget.h"
|
||||
#include "utility.h"
|
||||
+#include "thumbnail.h"
|
||||
#include <QDebug>
|
||||
#include <QDesktopServices>
|
||||
#include <QtConcurrent/QtConcurrent>
|
||||
+#include <QDrag>
|
||||
|
||||
ListView::ListView(QWidget *parent/*, int width, int height, int module*/):
|
||||
KListView(parent)
|
||||
@@ -29,6 +31,7 @@ ListView::ListView(QWidget *parent/*, int width, int height, int module*/):
|
||||
this->h = 540;
|
||||
this->module = 1;
|
||||
initWidget();
|
||||
+ setDragEnabled(true);
|
||||
setAttribute(Qt::WA_AcceptTouchEvents);
|
||||
m_listmodel = new QStandardItemModel(this);
|
||||
this->setModel(m_listmodel);
|
||||
@@ -70,6 +73,34 @@ void ListView::initWidget()
|
||||
connect(this, &ListView::clicked, this, &ListView::onClicked);
|
||||
}
|
||||
|
||||
+void ListView::mouseMoveEvent(QMouseEvent *e)
|
||||
+{
|
||||
+ if (e->buttons() & Qt::LeftButton) {
|
||||
+ if ((e->pos() - m_pressPos).manhattanLength() >= QApplication::startDragDistance()) {
|
||||
+ myDebug() << "进入拖拽事件";
|
||||
+ QString desktopfp = m_pressApp.value<QStringList>().at(0);
|
||||
+ QMimeData *mimeData = new QMimeData;
|
||||
+ ThumbNail *dragImage = new ThumbNail;
|
||||
+ QDrag *drag = new QDrag(this);
|
||||
+ QList<QUrl> desktopUrlList;
|
||||
+ desktopUrlList.append(QUrl(desktopfp));
|
||||
+ myDebug() << desktopUrlList;
|
||||
+ mimeData->setUrls(desktopUrlList);
|
||||
+ //设置拖拽时的缩略图
|
||||
+ dragImage->setupthumbnail(desktopfp);
|
||||
+ QPixmap pixmap = dragImage->grab();
|
||||
+ pixmap = pixmap.scaled(QSize(32, 32), Qt::KeepAspectRatio);
|
||||
+ myDebug() << mimeData;
|
||||
+ drag->setMimeData(mimeData);
|
||||
+ drag->setPixmap(pixmap);
|
||||
+ drag->setHotSpot(QPoint(pixmap.width(), pixmap.height()));
|
||||
+ drag->exec(Qt::MoveAction);
|
||||
+ delete dragImage;
|
||||
+ dragImage = nullptr;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
void ListView::addData(QVector<QStringList> data, int module)
|
||||
{
|
||||
this->module = module;
|
||||
diff --git a/src/UserInterface/ListView/listview.h b/src/UserInterface/ListView/listview.h
|
||||
index f9125e8..cfcfbf8 100755
|
||||
--- a/src/UserInterface/ListView/listview.h
|
||||
+++ b/src/UserInterface/ListView/listview.h
|
||||
@@ -50,13 +50,14 @@ protected:
|
||||
void paintEvent(QPaintEvent *e) override;
|
||||
void keyPressEvent(QKeyEvent *e);
|
||||
bool event(QEvent *e);
|
||||
+ void mouseMoveEvent(QMouseEvent *e);
|
||||
+
|
||||
private:
|
||||
int w = 0;
|
||||
int h = 0;
|
||||
int m_preRowCount;
|
||||
bool m_scrollbarState = true;
|
||||
|
||||
-
|
||||
private Q_SLOTS:
|
||||
void onClicked(QModelIndex index);//点击item
|
||||
// void rightClickedSlot(const QPoint &pos);//右键菜单
|
||||
diff --git a/src/UserInterface/mainwindow.cpp b/src/UserInterface/mainwindow.cpp
|
||||
index feb225a..18f538b 100755
|
||||
--- a/src/UserInterface/mainwindow.cpp
|
||||
+++ b/src/UserInterface/mainwindow.cpp
|
||||
@@ -770,7 +770,6 @@ void MainWindow::minAnimationFinished()
|
||||
m_viewWidget->setFocus();
|
||||
// m_collectPushButton->clicked(true);
|
||||
on_collectPushButton_clicked();
|
||||
-
|
||||
QTimer::singleShot(200, [ = ]() {
|
||||
m_animationPage->hide();
|
||||
});
|
||||
@@ -791,6 +790,7 @@ void MainWindow::maxAnimationFinished()
|
||||
setMaxWindowPos();
|
||||
m_fullWindow->activateWindow();
|
||||
|
||||
+
|
||||
QTimer::singleShot(200, [ = ]() {
|
||||
m_animationPage->hide();
|
||||
});
|
||||
@@ -1370,7 +1370,7 @@ 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));
|
||||
+ kdk::WindowManager::setGeometry(m_fullWindow->windowHandle(), QRect(Style::m_primaryScreenX, Style::m_primaryScreenY, Style::m_availableScreenWidth, Style::m_availableScreenHeight));
|
||||
}
|
||||
}
|
||||
|
||||
675
0020-43-upstream-Debian.patch
Normal file
675
0020-43-upstream-Debian.patch
Normal file
@ -0,0 +1,675 @@
|
||||
From: =?utf-8?b?5byg5aSp5rO9?=
|
||||
<11297911+zhang_tian_ze@user.noreply.gitee.com>
|
||||
Date: Thu, 15 Dec 2022 06:03:50 +0000
|
||||
Subject: =?utf-8?b?ITQzIOWinuWKoOaUtuiXj+acgOi/keeEpueCueaJk+W8gO+8jOWQjA==?=
|
||||
=?utf-8?b?5q2ldXBzdHJlYW3vvIzlop7liqBEZWJpYW4gTWVyZ2UgcHVsbCByZXF1ZXN0ICE0?=
|
||||
=?utf-8?b?MyBmcm9tIOW8oOWkqeazvS9vcGVua3lsaW4veWFuZ3R6ZQ==?=
|
||||
|
||||
---
|
||||
src/UserInterface/Button/push_button.cpp | 104 +++++++++++++++++++++++++++
|
||||
src/UserInterface/Button/push_button.h | 44 ++++++++++++
|
||||
src/UserInterface/Button/textlabel.cpp | 34 +++++++++
|
||||
src/UserInterface/Button/textlabel.h | 27 +++++++
|
||||
src/UserInterface/Widget/function_Widget.cpp | 8 +--
|
||||
src/UserInterface/Widget/function_Widget.h | 2 +-
|
||||
src/UserInterface/Widget/splitbar_frame.h | 6 +-
|
||||
src/UserInterface/full_mainwindow.cpp | 11 +--
|
||||
src/UserInterface/full_mainwindow.h | 3 +-
|
||||
src/UserInterface/mainwindow.cpp | 44 ++++++++----
|
||||
src/UserInterface/mainwindow.h | 9 +--
|
||||
src/UserInterface/userinterface.pri | 4 ++
|
||||
src/UtilityFunction/Style/style.h | 12 ++--
|
||||
src/UtilityFunction/utility.cpp | 32 ++++++++-
|
||||
src/UtilityFunction/utility.h | 4 +-
|
||||
15 files changed, 304 insertions(+), 40 deletions(-)
|
||||
create mode 100644 src/UserInterface/Button/push_button.cpp
|
||||
create mode 100644 src/UserInterface/Button/push_button.h
|
||||
create mode 100644 src/UserInterface/Button/textlabel.cpp
|
||||
create mode 100644 src/UserInterface/Button/textlabel.h
|
||||
|
||||
diff --git a/src/UserInterface/Button/push_button.cpp b/src/UserInterface/Button/push_button.cpp
|
||||
new file mode 100644
|
||||
index 0000000..cff465a
|
||||
--- /dev/null
|
||||
+++ b/src/UserInterface/Button/push_button.cpp
|
||||
@@ -0,0 +1,104 @@
|
||||
+#include "push_button.h"
|
||||
+
|
||||
+PushButton::PushButton(QWidget *parent) : QPushButton(parent)
|
||||
+{
|
||||
+ m_btnLayout = new QHBoxLayout(this);
|
||||
+ this->setLayout(m_btnLayout);
|
||||
+ m_label = new IconLabel(this);
|
||||
+ m_btnLayout->addWidget(m_label);
|
||||
+
|
||||
+ m_label->setAlignment(Qt::AlignCenter);
|
||||
+ m_btnLayout->setAlignment(Qt::AlignCenter);
|
||||
+}
|
||||
+
|
||||
+void PushButton::setLabel(QPixmap pixmap, int size)
|
||||
+{
|
||||
+ m_label->setFixedSize(size, size);
|
||||
+ m_label->setIcon(pixmap);
|
||||
+}
|
||||
+
|
||||
+PushButton::~PushButton()
|
||||
+{
|
||||
+
|
||||
+}
|
||||
+
|
||||
+void PushButton::paintEvent(QPaintEvent *e)
|
||||
+{
|
||||
+ Q_UNUSED(e);
|
||||
+ QStylePainter painter(this);
|
||||
+ painter.setRenderHint(QPainter::Antialiasing);
|
||||
+ QStyleOptionButton option;
|
||||
+ initStyleOption(&option);
|
||||
+
|
||||
+ if (option.state & QStyle::State_Sunken) {
|
||||
+ painter.save();
|
||||
+ painter.setPen(Qt::NoPen);
|
||||
+ painter.setBrush(Qt::white);
|
||||
+ if (g_curStyle == "ukui-dark" || g_isFullScreen) {
|
||||
+ painter.setOpacity(0.25);
|
||||
+ } else {
|
||||
+ painter.setOpacity(0.65);
|
||||
+ }
|
||||
+
|
||||
+ painter.drawRoundedRect(option.rect.adjusted(1, 1, -1, -1), 6, 6);
|
||||
+ painter.restore();
|
||||
+ }
|
||||
+
|
||||
+ if (option.state & QStyle::State_MouseOver) {
|
||||
+ painter.save();
|
||||
+ painter.setPen(Qt::NoPen);
|
||||
+ painter.setBrush(Qt::white);
|
||||
+ if (g_curStyle == "ukui-dark" || g_isFullScreen) {
|
||||
+ painter.setOpacity(0.1);
|
||||
+ } else {
|
||||
+ painter.setOpacity(0.35);
|
||||
+ }
|
||||
+
|
||||
+ painter.drawRoundedRect(option.rect.adjusted(1, 1, -1, -1), 6, 6);
|
||||
+ painter.restore();
|
||||
+ }
|
||||
+
|
||||
+ if (option.state & QStyle::State_On) {
|
||||
+ painter.save();
|
||||
+ painter.setPen(Qt::NoPen);
|
||||
+ painter.setBrush(Qt::white);
|
||||
+ if (g_curStyle == "ukui-dark" || g_isFullScreen) {
|
||||
+ painter.setOpacity(0.2);
|
||||
+ } else {
|
||||
+ painter.setOpacity(0.5);
|
||||
+ }
|
||||
+
|
||||
+ painter.drawRoundedRect(option.rect.adjusted(1, 1, -1, -1), 6, 6);
|
||||
+ painter.restore();
|
||||
+ }
|
||||
+
|
||||
+ if (option.state & QStyle::State_HasFocus) {
|
||||
+ painter.save();
|
||||
+ QStyleOption opt;
|
||||
+ QColor color = opt.palette.color(QPalette::Highlight);
|
||||
+ painter.setPen(QPen(color, 2));
|
||||
+ painter.drawRoundedRect(option.rect.adjusted(1, 1, -1, -1), 6, 6);
|
||||
+ painter.restore();
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+IconLabel::IconLabel(QWidget *parent)
|
||||
+ : QLabel(parent)
|
||||
+{
|
||||
+ this->setContentsMargins(0, 0, 0, 0);
|
||||
+}
|
||||
+
|
||||
+void IconLabel::paintEvent(QPaintEvent *event)
|
||||
+{
|
||||
+ QPainter painter(this);
|
||||
+ painter.setRenderHints(QPainter::SmoothPixmapTransform, true);
|
||||
+ painter.drawPixmap(0, 0, m_pixmap);
|
||||
+ return QLabel::paintEvent(event);
|
||||
+}
|
||||
+
|
||||
+void IconLabel::setIcon(const QPixmap &pixmap)
|
||||
+{
|
||||
+ m_pixmap = pixmap;
|
||||
+}
|
||||
+
|
||||
+
|
||||
diff --git a/src/UserInterface/Button/push_button.h b/src/UserInterface/Button/push_button.h
|
||||
new file mode 100644
|
||||
index 0000000..5c044ba
|
||||
--- /dev/null
|
||||
+++ b/src/UserInterface/Button/push_button.h
|
||||
@@ -0,0 +1,44 @@
|
||||
+#ifndef PUSHBUTTON_H
|
||||
+#define PUSHBUTTON_H
|
||||
+
|
||||
+#include <QObject>
|
||||
+#include <QLabel>
|
||||
+#include <QPushButton>
|
||||
+#include <QStylePainter>
|
||||
+#include <QStyleOption>
|
||||
+#include <QHBoxLayout>
|
||||
+#include "utility.h"
|
||||
+
|
||||
+class IconLabel : public QLabel
|
||||
+{
|
||||
+ Q_OBJECT
|
||||
+public:
|
||||
+ IconLabel(QWidget *parent = nullptr);
|
||||
+ void setIcon(const QPixmap &pixmap);
|
||||
+protected:
|
||||
+ void paintEvent(QPaintEvent *event) override;
|
||||
+
|
||||
+private:
|
||||
+ QPixmap m_pixmap;
|
||||
+};
|
||||
+
|
||||
+class PushButton : public QPushButton
|
||||
+{
|
||||
+ Q_OBJECT
|
||||
+public:
|
||||
+ explicit PushButton(QWidget *parent = nullptr);
|
||||
+ ~PushButton();
|
||||
+
|
||||
+ void setLabel(QPixmap pixmap, int size);
|
||||
+
|
||||
+protected:
|
||||
+ void paintEvent(QPaintEvent *e) override;
|
||||
+
|
||||
+private:
|
||||
+ QHBoxLayout *m_btnLayout = nullptr;
|
||||
+ IconLabel *m_label = nullptr;
|
||||
+
|
||||
+Q_SIGNALS:
|
||||
+
|
||||
+};
|
||||
+#endif // PUSHBUTTON_H
|
||||
diff --git a/src/UserInterface/Button/textlabel.cpp b/src/UserInterface/Button/textlabel.cpp
|
||||
new file mode 100644
|
||||
index 0000000..90e4722
|
||||
--- /dev/null
|
||||
+++ b/src/UserInterface/Button/textlabel.cpp
|
||||
@@ -0,0 +1,34 @@
|
||||
+#include "textlabel.h"
|
||||
+#include <QDebug>
|
||||
+
|
||||
+TextLabel::TextLabel(QWidget *parent) : QLabel(parent)
|
||||
+{
|
||||
+
|
||||
+}
|
||||
+
|
||||
+void TextLabel::checkState(bool isChecked)
|
||||
+{
|
||||
+ m_isChecked = isChecked;
|
||||
+}
|
||||
+
|
||||
+void TextLabel::paintEvent(QPaintEvent *event)
|
||||
+{
|
||||
+ if (m_isChecked) {
|
||||
+ return QLabel::paintEvent(event);
|
||||
+ }
|
||||
+
|
||||
+ QStylePainter painter(this);
|
||||
+ painter.setRenderHint(QPainter::Antialiasing);
|
||||
+ QStyleOptionFrame option;
|
||||
+ initStyleOption(&option);
|
||||
+
|
||||
+ if (option.state & QStyle::State_HasFocus) {
|
||||
+ painter.save();
|
||||
+ QStyleOption opt;
|
||||
+ QColor color = opt.palette.color(QPalette::Highlight);
|
||||
+ painter.setPen(QPen(color, 2));
|
||||
+ painter.drawRoundedRect(option.rect.adjusted(1, 1, -1, -1), 6, 6);
|
||||
+ painter.restore();
|
||||
+ }
|
||||
+ QLabel::paintEvent(event);
|
||||
+}
|
||||
diff --git a/src/UserInterface/Button/textlabel.h b/src/UserInterface/Button/textlabel.h
|
||||
new file mode 100644
|
||||
index 0000000..18eb961
|
||||
--- /dev/null
|
||||
+++ b/src/UserInterface/Button/textlabel.h
|
||||
@@ -0,0 +1,27 @@
|
||||
+#ifndef TEXTLABEL_H
|
||||
+#define TEXTLABEL_H
|
||||
+
|
||||
+#include <QObject>
|
||||
+#include <QLabel>
|
||||
+#include <QPaintEvent>
|
||||
+#include <QStylePainter>
|
||||
+#include <QStyleOption>
|
||||
+
|
||||
+class TextLabel : public QLabel
|
||||
+{
|
||||
+ Q_OBJECT
|
||||
+public:
|
||||
+ explicit TextLabel(QWidget *parent = nullptr);
|
||||
+
|
||||
+ void checkState(bool isChecked);
|
||||
+
|
||||
+private:
|
||||
+ void paintEvent(QPaintEvent *event) override;
|
||||
+
|
||||
+ bool m_isChecked = false;
|
||||
+
|
||||
+Q_SIGNALS:
|
||||
+
|
||||
+};
|
||||
+
|
||||
+#endif // TEXTLABEL_H
|
||||
diff --git a/src/UserInterface/Widget/function_Widget.cpp b/src/UserInterface/Widget/function_Widget.cpp
|
||||
index cc0eee7..8cd4967 100755
|
||||
--- a/src/UserInterface/Widget/function_Widget.cpp
|
||||
+++ b/src/UserInterface/Widget/function_Widget.cpp
|
||||
@@ -74,9 +74,9 @@ FunctionWidget::FunctionWidget(QWidget *parent): QWidget(parent)
|
||||
|
||||
FunctionWidget::~FunctionWidget()
|
||||
{
|
||||
- if (themeSetting) {
|
||||
- delete themeSetting;
|
||||
- }
|
||||
+// if (themeSetting) {
|
||||
+// delete themeSetting;
|
||||
+// }
|
||||
|
||||
if (myTimer) {
|
||||
delete myTimer;
|
||||
@@ -146,7 +146,7 @@ FunctionWidget::~FunctionWidget()
|
||||
delete effect;
|
||||
}
|
||||
|
||||
- themeSetting = nullptr;
|
||||
+// themeSetting = nullptr;
|
||||
myTimer = nullptr;
|
||||
upWidget = nullptr;
|
||||
upLayout = nullptr;
|
||||
diff --git a/src/UserInterface/Widget/function_Widget.h b/src/UserInterface/Widget/function_Widget.h
|
||||
index 9fe81d9..0f6f28a 100755
|
||||
--- a/src/UserInterface/Widget/function_Widget.h
|
||||
+++ b/src/UserInterface/Widget/function_Widget.h
|
||||
@@ -47,7 +47,7 @@ protected:
|
||||
|
||||
private:
|
||||
CurrentTimeInterface *Time = nullptr;
|
||||
- QGSettings *themeSetting = nullptr;
|
||||
+// QGSettings *themeSetting = nullptr;
|
||||
QGSettings *timeSetting = nullptr;
|
||||
QString themeName;
|
||||
QObject *plugin = nullptr;
|
||||
diff --git a/src/UserInterface/Widget/splitbar_frame.h b/src/UserInterface/Widget/splitbar_frame.h
|
||||
index 079d757..bb5195e 100755
|
||||
--- a/src/UserInterface/Widget/splitbar_frame.h
|
||||
+++ b/src/UserInterface/Widget/splitbar_frame.h
|
||||
@@ -15,8 +15,8 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
-#ifndef PUSHBUTTON_H
|
||||
-#define PUSHBUTTON_H
|
||||
+#ifndef SPLITBARFRAME_H
|
||||
+#define SPLITBARFRAME_H
|
||||
#include <QPushButton>
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
@@ -51,4 +51,4 @@ protected:
|
||||
void paintEvent(QPaintEvent *event);
|
||||
};
|
||||
|
||||
-#endif // PUSHBUTTON_H
|
||||
+#endif // SPLITBARFRAME
|
||||
diff --git a/src/UserInterface/full_mainwindow.cpp b/src/UserInterface/full_mainwindow.cpp
|
||||
index d614bb9..499e76d 100755
|
||||
--- a/src/UserInterface/full_mainwindow.cpp
|
||||
+++ b/src/UserInterface/full_mainwindow.cpp
|
||||
@@ -82,11 +82,11 @@ void FullMainWindow::initButtonUI()
|
||||
m_fullSelectMenuButton->setFixedSize(QSize(16, 34));
|
||||
m_fullSelectMenuButton->setAcceptDrops(true);
|
||||
m_fullSelectMenuButton->setFocusPolicy(Qt::StrongFocus);
|
||||
- m_fullSelectMenuButton->setIcon(QPixmap(":/data/img/mainviewwidget/DM-arrow-2x.png"));
|
||||
+ m_fullSelectMenuButton->setIcon(getCurPixmap(":/data/img/mainviewwidget/DM-arrow-2x.png", false, 16));
|
||||
QPalette palete;
|
||||
palete.setColor(QPalette::NoRole, Qt::white);
|
||||
m_fullSelectMenuButton->setPalette(palete);
|
||||
- m_minPushButton = new QPushButton(centralwidget);
|
||||
+ m_minPushButton = new PushButton(centralwidget);
|
||||
m_minPushButton->setObjectName(QString::fromUtf8("minPushButton"));
|
||||
m_minPushButton->setFixedSize(QSize(48, 48));
|
||||
m_minPushButton->setFlat(true);
|
||||
@@ -288,9 +288,10 @@ void FullMainWindow::changeStyle()
|
||||
"%1:hover {border-radius:24px; background:" + buttonColorHover + ";}"
|
||||
"%1:pressed {border-radius:24px; background:" + buttonColorPress + ";}");
|
||||
m_fullSelectToolButton->setStyleSheet(m_buttonStyle.arg("QPushButton"));
|
||||
- m_fullSelectMenuButton->setIcon(QPixmap(":/data/img/mainviewwidget/DM-arrow-2x.png"));
|
||||
- m_minPushButton->setIcon(getCurIcon(":/data/img/mainviewwidget/full-min.svg", false));
|
||||
- m_minPushButton->setProperty("useIconHighlightEffect", 0x0);
|
||||
+
|
||||
+ QPixmap pixmap = loadSvg(QString(":/data/img/mainviewwidget/full-min.svg"), 25);
|
||||
+ m_minPushButton->setLabel(pixmap, 25);
|
||||
+// m_minPushButton->setProperty("useIconHighlightEffect", 0x0);
|
||||
}
|
||||
|
||||
void FullMainWindow::on_minPushButton_clicked()
|
||||
diff --git a/src/UserInterface/full_mainwindow.h b/src/UserInterface/full_mainwindow.h
|
||||
index 09a7c01..c793607 100755
|
||||
--- a/src/UserInterface/full_mainwindow.h
|
||||
+++ b/src/UserInterface/full_mainwindow.h
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "searchappthread.h"
|
||||
#include "full_searchresult_widget.h"
|
||||
#include "rotationlabel.h"
|
||||
+#include "push_button.h"
|
||||
|
||||
class FullMainWindow : public QMainWindow
|
||||
{
|
||||
@@ -99,7 +100,7 @@ private:
|
||||
QSpacerItem *horizontalSpacer_2;
|
||||
QPushButton *m_fullSelectToolButton;
|
||||
RotationLabel *m_fullSelectMenuButton;
|
||||
- QPushButton *m_minPushButton;
|
||||
+ PushButton *m_minPushButton;
|
||||
QStackedWidget *m_fullStackedWidget;
|
||||
|
||||
FullCommonUseWidget *m_fullCommonPage;
|
||||
diff --git a/src/UserInterface/mainwindow.cpp b/src/UserInterface/mainwindow.cpp
|
||||
index 18f538b..ad46566 100755
|
||||
--- a/src/UserInterface/mainwindow.cpp
|
||||
+++ b/src/UserInterface/mainwindow.cpp
|
||||
@@ -165,16 +165,16 @@ void MainWindow::registDbusServer()
|
||||
m_topStackedWidget->setCurrentIndex(0);
|
||||
m_lineEdit->clear();
|
||||
this->clearFocus();
|
||||
- m_isFullScreen = false;
|
||||
+ g_isFullScreen = false;
|
||||
} else if (m_fullWindow->isVisible())
|
||||
{
|
||||
m_fullWindow->hide();
|
||||
m_fullWindow->clearFocus();
|
||||
m_fullWindow->resetEditline();
|
||||
- m_isFullScreen = true;
|
||||
+ g_isFullScreen = true;
|
||||
} else
|
||||
{
|
||||
- if (!m_isFullScreen) {
|
||||
+ if (!g_isFullScreen) {
|
||||
this->show();
|
||||
setMinWindowPos();
|
||||
this->raise();
|
||||
@@ -384,24 +384,25 @@ void MainWindow::initRightWidgetButton()
|
||||
m_mainRightVerticalLayout_1 = new QVBoxLayout();
|
||||
m_rightTopHorizontalLayout = new QHBoxLayout();
|
||||
m_rightTopHorizontalLayout->setSpacing(30);
|
||||
- m_rightTopHorizontalLayout->setContentsMargins(8, 0, 10, 0);
|
||||
+ m_rightTopHorizontalLayout->setContentsMargins(8, 0, 6, 0);
|
||||
//收藏按键
|
||||
- m_collectPushButton = new QLabel(m_centralwidget);
|
||||
+ m_collectPushButton = new TextLabel(m_centralwidget);
|
||||
m_collectPushButton->setFocusPolicy(Qt::StrongFocus);
|
||||
m_collectPushButton->setFixedHeight(34);
|
||||
// m_collectPushButton->setFlat(true);
|
||||
m_collectPushButton->installEventFilter(this);
|
||||
//最近按键
|
||||
- m_recentPushButton = new QLabel(m_centralwidget);
|
||||
+ m_recentPushButton = new TextLabel(m_centralwidget);
|
||||
m_recentPushButton->setFixedHeight(34);
|
||||
m_recentPushButton->setFocusPolicy(Qt::StrongFocus);
|
||||
// m_recentPushButton->setFlat(true);
|
||||
m_recentPushButton->installEventFilter(this);
|
||||
m_horizontalSpacer_3 = new QSpacerItem(332, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
|
||||
//放大缩小按键
|
||||
- m_minMaxChangeButton = new QPushButton(m_centralwidget);
|
||||
- m_minMaxChangeButton->setFixedSize(QSize(24, 24));
|
||||
- m_minMaxChangeButton->setIcon(getCurIcon(":/data/img/mainviewwidget/DM-max.svg", true));
|
||||
+ m_minMaxChangeButton = new PushButton(m_centralwidget);
|
||||
+ m_minMaxChangeButton->setFixedSize(QSize(34, 34));
|
||||
+ QPixmap pixmap = getCurPixmap(":/data/img/mainviewwidget/DM-max.svg",true, 16);
|
||||
+ m_minMaxChangeButton->setLabel(pixmap, 16);
|
||||
m_minMaxChangeButton->setFlat(true);
|
||||
m_rightTopHorizontalLayout->addWidget(m_collectPushButton);
|
||||
m_rightTopHorizontalLayout->addWidget(m_recentPushButton);
|
||||
@@ -638,6 +639,9 @@ void MainWindow::changeStyle()
|
||||
}
|
||||
}
|
||||
|
||||
+ QPixmap pixmap = getCurPixmap(":/data/img/mainviewwidget/DM-max.svg",true, 16);
|
||||
+ m_minMaxChangeButton->setLabel(pixmap, 16);
|
||||
+
|
||||
m_buttonStyle = QString("%1{border-radius:13px; background:" + buttonColorDefault + ";}"
|
||||
"%1:hover {border-radius:13px; background:" + buttonColorHover + ";}"
|
||||
"%1:pressed {border-radius:13px; background:" + buttonColorPress + ";}");
|
||||
@@ -745,6 +749,14 @@ bool MainWindow::event(QEvent *event)
|
||||
QApplication::postEvent(m_selectMenuButton, new QEvent(QEvent::MouseButtonPress));
|
||||
}
|
||||
|
||||
+ if (m_collectPushButton->hasFocus()) {
|
||||
+ on_collectPushButton_clicked();
|
||||
+ }
|
||||
+
|
||||
+ if (m_recentPushButton->hasFocus()) {
|
||||
+ on_recentPushButton_clicked();
|
||||
+ }
|
||||
+
|
||||
if (m_lineEdit->hasFocus()) {
|
||||
m_minSearchResultListView->setFocus();
|
||||
} else {
|
||||
@@ -1231,6 +1243,8 @@ void MainWindow::databaseThreadCloseSlot()
|
||||
|
||||
void MainWindow::on_collectPushButton_clicked()
|
||||
{
|
||||
+ m_recentPushButton->checkState(false);
|
||||
+ m_collectPushButton->checkState(true);
|
||||
m_rightStackedWidget->setCurrentIndex(0);
|
||||
|
||||
QString textColorHightLight = QString::number(this->palette().color(QPalette::Highlight).rgba(), 16).mid(2, 6);
|
||||
@@ -1245,6 +1259,8 @@ void MainWindow::on_collectPushButton_clicked()
|
||||
|
||||
void MainWindow::on_recentPushButton_clicked()
|
||||
{
|
||||
+ m_collectPushButton->checkState(false);
|
||||
+ m_recentPushButton->checkState(true);
|
||||
m_rightStackedWidget->setCurrentIndex(1);
|
||||
QString textColorDefault = QString::number(this->palette().color(QPalette::Text).rgba(), 16).mid(2, 6);
|
||||
m_collectPushButton->setStyleSheet(QString("color:#%1").arg(textColorDefault));
|
||||
@@ -1270,7 +1286,7 @@ void MainWindow::on_searchPushButton_clicked()
|
||||
void MainWindow::on_minMaxChangeButton_clicked()
|
||||
{
|
||||
m_canHide = true;
|
||||
- m_isFullScreen = true;
|
||||
+ g_isFullScreen = true;
|
||||
QPropertyAnimation *m_maxAnimation = new QPropertyAnimation(m_animationPage, "geometry", this);
|
||||
connect(m_maxAnimation, &QPropertyAnimation::finished, this, &MainWindow::maxAnimationFinished);
|
||||
|
||||
@@ -1300,7 +1316,7 @@ void MainWindow::showWindow()
|
||||
{
|
||||
Style::initWidStyle();
|
||||
myDebug() << "调用开始菜单显示";
|
||||
- if (m_isFullScreen) {
|
||||
+ if (g_isFullScreen) {
|
||||
m_fullWindow->show();
|
||||
setMaxWindowPos();
|
||||
m_fullWindow->raise();
|
||||
@@ -1322,13 +1338,13 @@ void MainWindow::hideWindow()
|
||||
m_fullWindow->hide();
|
||||
m_fullWindow->resetEditline();
|
||||
this->clearFocus();
|
||||
- m_isFullScreen = true;
|
||||
+ g_isFullScreen = true;
|
||||
} else {
|
||||
this->hide();
|
||||
m_topStackedWidget->setCurrentIndex(0);
|
||||
m_lineEdit->clear();
|
||||
this->clearFocus();
|
||||
- m_isFullScreen = false;
|
||||
+ g_isFullScreen = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1415,7 +1431,7 @@ void MainWindow::showNormalWindowSlot()
|
||||
QEventLoop loop;
|
||||
QTimer::singleShot(100, &loop, SLOT(quit()));
|
||||
loop.exec();
|
||||
- m_isFullScreen = false;
|
||||
+ g_isFullScreen = false;
|
||||
m_minAnimation->setEasingCurve(QEasingCurve::OutExpo);
|
||||
m_minAnimation->setStartValue(QRect(0, 0, Style::m_availableScreenWidth, Style::m_availableScreenHeight));
|
||||
m_minAnimation->setEndValue(QRect(this->x() + 5, this->y() + 5, Style::m_minw - 10, Style::m_minh - 10));
|
||||
diff --git a/src/UserInterface/mainwindow.h b/src/UserInterface/mainwindow.h
|
||||
index 2afcb93..75fee17 100755
|
||||
--- a/src/UserInterface/mainwindow.h
|
||||
+++ b/src/UserInterface/mainwindow.h
|
||||
@@ -53,6 +53,8 @@
|
||||
#include "animationpage.h"
|
||||
#include "rotationlabel.h"
|
||||
#include "rightlistview.h"
|
||||
+#include "push_button.h"
|
||||
+#include "textlabel.h"
|
||||
#include "ukuistylehelper/ukuistylehelper.h"
|
||||
#include "windowmanager/windowmanager.h"
|
||||
|
||||
@@ -200,10 +202,10 @@ private:
|
||||
QHBoxLayout *m_rightTopHorizontalLayout = nullptr;
|
||||
QVBoxLayout *m_rightCollectLayout = nullptr;
|
||||
QVBoxLayout *m_rightRecentLayout = nullptr;
|
||||
- QLabel *m_collectPushButton = nullptr;
|
||||
- QLabel *m_recentPushButton = nullptr;
|
||||
+ TextLabel *m_collectPushButton = nullptr;
|
||||
+ TextLabel *m_recentPushButton = nullptr;
|
||||
QSpacerItem *m_horizontalSpacer_3 = nullptr;
|
||||
- QPushButton *m_minMaxChangeButton = nullptr;
|
||||
+ PushButton *m_minMaxChangeButton = nullptr;
|
||||
QSpacerItem *m_verticalSpacer = nullptr;
|
||||
QStackedWidget *m_rightStackedWidget = nullptr;
|
||||
QWidget *m_collectPage = nullptr;
|
||||
@@ -220,7 +222,6 @@ private:
|
||||
MenuBox *m_dropDownMenu = nullptr;
|
||||
|
||||
bool m_canHide = true;
|
||||
- bool m_isFullScreen = false;
|
||||
QString m_buttonStyle;
|
||||
UkuiMenuInterface *m_ukuiMenuInterface = nullptr;
|
||||
QPropertyAnimation *m_animation = nullptr;
|
||||
diff --git a/src/UserInterface/userinterface.pri b/src/UserInterface/userinterface.pri
|
||||
index 00b893b..f635b07 100755
|
||||
--- a/src/UserInterface/userinterface.pri
|
||||
+++ b/src/UserInterface/userinterface.pri
|
||||
@@ -11,6 +11,8 @@ HEADERS += \
|
||||
$$PWD/Button/function_classify_button.h \
|
||||
$$PWD/Button/letter_classify_button.h \
|
||||
$$PWD/Button/tool_button.h \
|
||||
+ $$PWD/Button/push_button.h \
|
||||
+ $$PWD/Button/textlabel.h\
|
||||
$$PWD/ListView/fulllistview.h \
|
||||
$$PWD/ListView/klistview.h \
|
||||
$$PWD/ListView/listview.h \
|
||||
@@ -48,6 +50,8 @@ SOURCES += \
|
||||
$$PWD/Button/function_classify_button.cpp \
|
||||
$$PWD/Button/letter_classify_button.cpp \
|
||||
$$PWD/Button/tool_button.cpp \
|
||||
+ $$PWD/Button/push_button.cpp \
|
||||
+ $$PWD/Button/textlabel.cpp\
|
||||
$$PWD/ListView/fulllistview.cpp \
|
||||
$$PWD/ListView/klistview.cpp \
|
||||
$$PWD/ListView/listview.cpp \
|
||||
diff --git a/src/UtilityFunction/Style/style.h b/src/UtilityFunction/Style/style.h
|
||||
index 6ca2f80..4fe232e 100755
|
||||
--- a/src/UtilityFunction/Style/style.h
|
||||
+++ b/src/UtilityFunction/Style/style.h
|
||||
@@ -40,16 +40,16 @@
|
||||
#define RightClickMenuOpacity 0.95
|
||||
#define ToolTipBackground "rgba(26, 26, 26, 0.7)"
|
||||
#define DefaultBackground "rgba(19, 19, 20, 0.7)" //默认态背景色
|
||||
-#define LineBackground "rgba(255,255,255)" //分割线背景色
|
||||
+#define LineBackground "rgba(255, 255, 255)" //分割线背景色
|
||||
#define SBClassifyBtnSelectedBackground "#3D6BE5" //侧边栏上部分类按钮选择背景
|
||||
#define SBFunBtnHoverBackground "rgba(255, 255, 255, 0.14)" //侧边栏目下部功能按钮悬浮背景
|
||||
#define ClassifyBtnHoverBackground "rgba(255, 255, 255, 0.14)" //分类按钮悬浮背景
|
||||
#define MMBtnHoverBackground "rgba(255, 255, 255, 0.14)" //最大化最小化按钮悬浮背景
|
||||
-#define QueryLineEditDefaultBackground "rgba(0, 0, 0,0.04)" //搜索框默认态背景
|
||||
-#define QueryLineEditBackground "rgba(255, 255, 255,0.06)" //搜索框背景
|
||||
-#define QueryLineEditClickedDefaultBackground "rgba(0, 0, 0,0.04)" //搜索框默认态背景选中
|
||||
-#define QueryLineEditClickedBackground "rgba(255, 255, 255,0.06)" //搜索框背景选中
|
||||
-#define QueryLineEditClickedBorderDefault "rgba(0, 0, 0,0.1)" //搜索框默认态背景选中边框
|
||||
+#define QueryLineEditDefaultBackground "rgba(0, 0, 0, 0.04)" //搜索框默认态背景
|
||||
+#define QueryLineEditBackground "rgba(255, 255, 255, 0.06)" //搜索框背景
|
||||
+#define QueryLineEditClickedDefaultBackground "rgba(0, 0, 0, 0.04)" //搜索框默认态背景选中
|
||||
+#define QueryLineEditClickedBackground "rgba(255, 255, 255, 0.06)" //搜索框背景选中
|
||||
+#define QueryLineEditClickedBorderDefault "rgba(255, 255, 255, 0.25)" //搜索框默认态背景选中边框
|
||||
#define QueryLineEditClickedBorder "rgba(5, 151, 255, 1)" //搜索框背景选中边框
|
||||
#define AppBtnHover "#ffffff" //按钮悬浮
|
||||
|
||||
diff --git a/src/UtilityFunction/utility.cpp b/src/UtilityFunction/utility.cpp
|
||||
index 8af6b3f..5b66523 100755
|
||||
--- a/src/UtilityFunction/utility.cpp
|
||||
+++ b/src/UtilityFunction/utility.cpp
|
||||
@@ -34,8 +34,9 @@
|
||||
QString g_projectCodeName = "V10SP1";
|
||||
QString g_subProjectCodeName = "";
|
||||
QString g_platform = "";
|
||||
-bool g_menuStatus = false;
|
||||
QString g_curStyle = "";
|
||||
+bool g_menuStatus = false;
|
||||
+bool g_isFullScreen = false;
|
||||
|
||||
const QPixmap loadSvg(const QString &fileName, const int size)
|
||||
{
|
||||
@@ -132,6 +133,35 @@ QIcon getCurIcon(const QString &iconPath, bool autoSet)
|
||||
return QIcon(pixmap);
|
||||
}
|
||||
|
||||
+QPixmap getCurPixmap(const QString &iconPath, bool autoSet, int size)
|
||||
+{
|
||||
+ QPixmap pixmap;
|
||||
+
|
||||
+ if (iconPath.endsWith("png")) {
|
||||
+ pixmap = QPixmap(iconPath);
|
||||
+ } else {
|
||||
+ pixmap = loadSvg(iconPath, size);
|
||||
+ }
|
||||
+
|
||||
+ if (!autoSet) {
|
||||
+ return drawSymbolicColoredPixmap(pixmap);
|
||||
+ }
|
||||
+
|
||||
+ if (QGSettings::isSchemaInstalled(QString("org.ukui.style").toLocal8Bit())) {
|
||||
+ QGSettings gsetting(QString("org.ukui.style").toLocal8Bit());
|
||||
+
|
||||
+ if (gsetting.keys().contains(QString("styleName"))) {
|
||||
+ if (gsetting.get("style-name").toString() == "ukui-light"
|
||||
+ || gsetting.get("style-name").toString() == "ukui-default") {
|
||||
+ pixmap = drawSymbolicBlackColoredPixmap(pixmap);
|
||||
+ } else {
|
||||
+ pixmap = drawSymbolicColoredPixmap(pixmap);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ return pixmap;
|
||||
+}
|
||||
+
|
||||
//不通过任务栏获取屏幕可用区域数据
|
||||
QVariantList getScreenGeometryList()
|
||||
{
|
||||
diff --git a/src/UtilityFunction/utility.h b/src/UtilityFunction/utility.h
|
||||
index 66a047c..7adee3e 100755
|
||||
--- a/src/UtilityFunction/utility.h
|
||||
+++ b/src/UtilityFunction/utility.h
|
||||
@@ -71,6 +71,7 @@ bool checkOsRelease();//区分社区办与商业版
|
||||
|
||||
void centerToScreen(QWidget *widget);
|
||||
QIcon getCurIcon(const QString &iconPath, bool autoSet);
|
||||
+QPixmap getCurPixmap(const QString &iconPath, bool autoSet, int size);
|
||||
|
||||
//获取用户图像
|
||||
QString getUserIcon();
|
||||
@@ -87,8 +88,9 @@ enum PanelPositon {
|
||||
extern QString g_projectCodeName;
|
||||
extern QString g_subProjectCodeName;
|
||||
extern QString g_platform;
|
||||
-extern bool g_menuStatus;
|
||||
extern QString g_curStyle;
|
||||
+extern bool g_menuStatus;
|
||||
+extern bool g_isFullScreen;
|
||||
|
||||
|
||||
#endif // UTILITY_H
|
||||
112
0021-48-wayland.patch
Normal file
112
0021-48-wayland.patch
Normal file
@ -0,0 +1,112 @@
|
||||
From: lixueman <lixueman@kylinos.cn>
|
||||
Date: Thu, 22 Dec 2022 01:57:57 +0000
|
||||
Subject: =?utf-8?b?ITQ4IOS/ruaUuXdheWxhbmTkuIvorr7nva7nqpfnrqHlsZ7mgKflpLE=?=
|
||||
=?utf-8?b?5pWI5a+86Ie05a2X5q+N5o+Q56S656qX5byC5bi46Zeu6aKYIE1lcmdlIHB1bGwg?=
|
||||
=?utf-8?b?cmVxdWVzdCAhNDggZnJvbSBsaXh1ZW1hbi9vcGVua3lsaW4veWFuZ3R6ZQ==?=
|
||||
|
||||
---
|
||||
.../Button/letter_classify_button.cpp | 27 ++++------------------
|
||||
src/UserInterface/Button/letter_classify_button.h | 2 +-
|
||||
src/UserInterface/Other/lettertooltip.cpp | 4 ++--
|
||||
src/UserInterface/Other/lettertooltip.h | 4 ++--
|
||||
4 files changed, 10 insertions(+), 27 deletions(-)
|
||||
|
||||
diff --git a/src/UserInterface/Button/letter_classify_button.cpp b/src/UserInterface/Button/letter_classify_button.cpp
|
||||
index 6577384..47cd21f 100755
|
||||
--- a/src/UserInterface/Button/letter_classify_button.cpp
|
||||
+++ b/src/UserInterface/Button/letter_classify_button.cpp
|
||||
@@ -28,16 +28,7 @@ LetterClassifyButton::LetterClassifyButton(QWidget *parent,
|
||||
{
|
||||
this->setFlat(true);
|
||||
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);
|
||||
+ m_tooltip = new LetterToolTip(this);
|
||||
this->setFocusPolicy(Qt::NoFocus);
|
||||
this->setCheckable(true);
|
||||
this->setStyleSheet("padding: 0px;");
|
||||
@@ -147,16 +138,10 @@ void LetterClassifyButton::enterEvent(QEvent *e)
|
||||
Q_UNUSED(e);
|
||||
|
||||
if (m_fullscreen) {
|
||||
- // QFont font;
|
||||
- // font.setPixelSize(Style::LeftLetterFontSize*3);
|
||||
- // this->setFont(font);
|
||||
- // 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(m_letter);
|
||||
- tooltip->raise();
|
||||
- tooltip->move(oPoint);
|
||||
- tooltip->show();
|
||||
+ m_tooltip->setText(m_letter);
|
||||
+ m_tooltip->move(oPoint);
|
||||
+ m_tooltip->show();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -169,9 +154,7 @@ void LetterClassifyButton::leaveEvent(QEvent *e)
|
||||
font.setPixelSize(Style::m_leftLetterFontSize);
|
||||
this->setFont(font);
|
||||
this->setFixedSize(Style::m_leftLetterBtnHeight, Style::m_leftLetterBtnHeight);
|
||||
- tooltip->close();
|
||||
- delete tooltip;
|
||||
- tooltip = nullptr;
|
||||
+ m_tooltip->hide();
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/UserInterface/Button/letter_classify_button.h b/src/UserInterface/Button/letter_classify_button.h
|
||||
index fded3eb..277fab8 100755
|
||||
--- a/src/UserInterface/Button/letter_classify_button.h
|
||||
+++ b/src/UserInterface/Button/letter_classify_button.h
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
QString m_letter = QString();
|
||||
private:
|
||||
bool m_fullscreen = false;
|
||||
- LetterToolTip *tooltip = nullptr;
|
||||
+ LetterToolTip *m_tooltip = nullptr;
|
||||
|
||||
protected:
|
||||
void enterEvent(QEvent *e);
|
||||
diff --git a/src/UserInterface/Other/lettertooltip.cpp b/src/UserInterface/Other/lettertooltip.cpp
|
||||
index 030e544..00a28db 100755
|
||||
--- a/src/UserInterface/Other/lettertooltip.cpp
|
||||
+++ b/src/UserInterface/Other/lettertooltip.cpp
|
||||
@@ -21,9 +21,9 @@
|
||||
#include <QHBoxLayout>
|
||||
|
||||
LetterToolTip::LetterToolTip(QWidget *parent):
|
||||
- QDialog(parent)
|
||||
+ QWidget(parent)
|
||||
{
|
||||
- this->setWindowFlags(/*Qt::FramelessWindowHint *//*| */Qt::X11BypassWindowManagerHint);
|
||||
+ this->setWindowFlag(Qt::ToolTip);
|
||||
this->setAttribute(Qt::WA_TranslucentBackground, true);
|
||||
this->setContentsMargins(0, 0, 0, 0);
|
||||
this->setAutoFillBackground(false);
|
||||
diff --git a/src/UserInterface/Other/lettertooltip.h b/src/UserInterface/Other/lettertooltip.h
|
||||
index 81c0411..854e69f 100755
|
||||
--- a/src/UserInterface/Other/lettertooltip.h
|
||||
+++ b/src/UserInterface/Other/lettertooltip.h
|
||||
@@ -17,10 +17,10 @@
|
||||
|
||||
#ifndef LETTERTOOLTIP_H
|
||||
#define LETTERTOOLTIP_H
|
||||
-#include <QDialog>
|
||||
#include <QLabel>
|
||||
+#include <QWidget>
|
||||
|
||||
-class LetterToolTip : public QDialog
|
||||
+class LetterToolTip : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@ -1,13 +1,12 @@
|
||||
Name: ukui-menu
|
||||
Version: 3.1.1
|
||||
Release: 10
|
||||
Release: 11
|
||||
Summary: Advanced ukui menu
|
||||
License: GPL-3.0-or-later
|
||||
URL: http://www.ukui.org
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
Patch01: 0001-fix-uninstall-failed-issue.patch
|
||||
Patch02: 0002-fix-coredump-of-ukui-menu.patch
|
||||
patch03: 0003-add-ukui-log4qt.patch
|
||||
#patch from openkylin ukui-menu-build-3.1.1-ok4_1222
|
||||
patch04: 0001-4-wayland.patch
|
||||
patch05: 0002-5-platformName-update-debian-changelog.-platformName.patch
|
||||
patch06: 0003-.patch
|
||||
@ -16,6 +15,22 @@ patch08: 0005-8-wayland.patch
|
||||
patch09: 0006-changelog.patch
|
||||
patch10: 0007-changelog.patch
|
||||
patch11: 0008-changelog.patch
|
||||
patch12: 0009-win.patch
|
||||
patch13: 0010-hover.patch
|
||||
patch14: 0011-.patch
|
||||
patch15: 0012-16-wayland.patch
|
||||
patch16: 0013-21-.pro-openKylin-0.7.5.patch
|
||||
patch17: 0014-19.patch
|
||||
patch18: 0015-22.patch
|
||||
patch19: 0016-25-upstream.patch
|
||||
patch20: 0017-27.patch
|
||||
patch21: 0018-update-changelog.patch
|
||||
patch22: 0019-32.patch
|
||||
patch23: 0020-43-upstream-Debian.patch
|
||||
patch24: 0021-48-wayland.patch
|
||||
#fix error
|
||||
Patch25: 0001-fix-uninstall-failed-issue.patch
|
||||
|
||||
|
||||
BuildRequires: qt5-qtbase-devel
|
||||
BuildRequires: libqtxdg-devel
|
||||
@ -68,6 +83,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_datadir}/ukui-menu/translations/
|
||||
|
||||
%changelog
|
||||
* Wed May 24 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.1-11
|
||||
- add patch from upstream
|
||||
|
||||
* Fri May 12 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.1-10
|
||||
- add 0006-changelog.patch 0007-changelog.patch 0008-changelog.patch
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user