diff --git a/0001-fix-uninstall-failed-issue.patch b/0001-fix-uninstall-failed-issue.patch index d18aadf..19b3ee3 100644 --- a/0001-fix-uninstall-failed-issue.patch +++ b/0001-fix-uninstall-failed-issue.patch @@ -1,18 +1,21 @@ -From b8df82788c21c4e768b55e9a09f6d61f44febd5f Mon Sep 17 00:00:00 2001 +From c4cdc73946990ddfb9aa24e8a394ab77a49baf3e Mon Sep 17 00:00:00 2001 From: peijiankang -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 @@ -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"<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 @@ + 打开字母排序菜单 + + +- ++ + Open the function sort menu + 打开功能排序菜单 + + +- ++ + Open the alphabetical menu + 打开字母排序菜单 + + +- +- ++ ++ + path: + 路径: + +@@ -72,36 +72,36 @@ + 搜索应用 + + +- ++ + No recent files + 暂无最近文件 + + + +- +- +- +- ++ ++ ++ ++ + All + 全部 + + +- ++ + collection + 收藏 + + +- ++ + recent + 最近 + + +- ++ + Max + 放大 + + +- ++ + PowerOff + 电源 + +@@ -110,16 +110,16 @@ + 搜索应用 + + +- +- +- ++ ++ ++ + Letter + 字母排序 + + +- +- +- ++ ++ ++ + Function + 功能分类 + +@@ -196,82 +196,103 @@ + + RightClickMenu + +- ++ ++ infomation ++ 提示 ++ ++ ++ ++ Uninstall finished! ++ 卸载成功! ++ ++ ++ ++ ++ error ++ 错误 ++ ++ ++ ++ timeout! ++ 超时! ++ ++ ++ + Pin to all + 固定到“所有软件” + + +- ++ + Unpin from all + 从“所有软件”取消固定 + + +- ++ + Pin to taskbar + 固定到任务栏 + + +- ++ + Unpin from taskbar + 从任务栏取消固定 + + +- ++ + Add to desktop shortcuts + 添加到桌面快捷方式 + + +- ++ + Pin to collection + 固定到收藏 + + +- ++ + Remove from collection + 从收藏移除 + + +- ++ + Uninstall + 卸载 + + +- ++ + Switch user + 切换用户 + + +- ++ + Hibernate + 休眠 + + +- ++ + Sleep + 睡眠 + + +- ++ + Lock Screen + 锁屏 + + +- ++ + Log Out + 注销 + + +- ++ + Restart + 重启 + + +- ++ + Power Off + 关机 + + +- ++ + Personalize this list + + +@@ -295,8 +316,12 @@ + + + ++ Uninstall2 ++ ++ ++ + Uninstall +- 卸载 ++ 卸载 + + + +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 @@ ++ ++ ++ ++ ++ FullMainWindow ++ ++ ++ Search ++ 搜索应用 ++ ++ ++ ++ All ++ 全部 ++ ++ ++ ++ Letter ++ 字母排序 ++ ++ ++ ++ Function ++ 功能分类 ++ ++ ++ ++ FunctionWidget ++ ++ ++ Search ++ 全局搜索 ++ ++ ++ ++ ItemDelegate ++ ++ Open feature sort list ++ 打开功能排序菜单 ++ ++ ++ Open alphabetical list ++ 打开字母排序菜单 ++ ++ ++ ++ Open the function sort menu ++ 打开功能排序菜单 ++ ++ ++ ++ Open the alphabetical menu ++ 打开字母排序菜单 ++ ++ ++ ++ ++ path: ++ 路径: ++ ++ ++ path ++ 路径 ++ ++ ++ ++ MainWindow ++ ++ ++ ++ Search ++ 搜索应用 ++ ++ ++ ++ No recent files ++ 暂无最近文件 ++ ++ ++ ++ ++ ++ ++ ++ All ++ 全部 ++ ++ ++ ++ collection ++ 收藏 ++ ++ ++ ++ recent ++ 最近 ++ ++ ++ ++ Max ++ 放大 ++ ++ ++ ++ PowerOff ++ 电源 ++ ++ ++ Search application ++ 搜索应用 ++ ++ ++ ++ ++ ++ Letter ++ 字母排序 ++ ++ ++ ++ ++ ++ Function ++ 功能分类 ++ ++ ++ ++ QObject ++ ++ ++ ++ Office ++ 办公 ++ ++ ++ ++ ++ Development ++ 开发 ++ ++ ++ ++ ++ Image ++ 图像 ++ ++ ++ ++ ++ Video ++ 影音 ++ ++ ++ ++ ++ Internet ++ 网络 ++ ++ ++ ++ ++ Game ++ 游戏 ++ ++ ++ ++ ++ Education ++ 教育 ++ ++ ++ ++ ++ Social ++ 社交 ++ ++ ++ ++ ++ System ++ 系统 ++ ++ ++ ++ ++ Safe ++ 安全 ++ ++ ++ ++ ++ Others ++ 其他 ++ ++ ++ ++ RightClickMenu ++ ++ ++ infomation ++ 提示 ++ ++ ++ ++ Uninstall finished! ++ 卸载成功! ++ ++ ++ ++ error ++ 错误 ++ ++ ++ ++ timeout! ++ 超时! ++ ++ ++ ++ Pin to all ++ 固定到“所有软件” ++ ++ ++ ++ Unpin from all ++ 从“所有软件”取消固定 ++ ++ ++ ++ Pin to taskbar ++ 固定到任务栏 ++ ++ ++ ++ Unpin from taskbar ++ 从任务栏取消固定 ++ ++ ++ ++ Add to desktop shortcuts ++ 添加到桌面快捷方式 ++ ++ ++ ++ Pin to collection ++ 固定到收藏 ++ ++ ++ ++ Remove from collection ++ 从收藏移除 ++ ++ ++ ++ Uninstall ++ 卸载 ++ ++ ++ ++ Switch user ++ 切换用户 ++ ++ ++ ++ Hibernate ++ 休眠 ++ ++ ++ ++ Sleep ++ 睡眠 ++ ++ ++ ++ Lock Screen ++ 锁屏 ++ ++ ++ ++ Log Out ++ 注销 ++ ++ ++ ++ Restart ++ 重启 ++ ++ ++ ++ Power Off ++ 关机 ++ ++ ++ ++ Personalize this list ++ ++ ++ ++ ++ TabletRightClickMenu ++ ++ ++ Pin to taskbar ++ 固定到任务栏 ++ ++ ++ ++ Unpin from taskbar ++ 从任务栏取消固定 ++ ++ ++ ++ Add to desktop shortcuts ++ 固定到桌面快捷方式 ++ ++ ++ ++ Uninstall ++ 卸载 ++ ++ ++ -- -2.33.0 +2.39.1 diff --git a/0002-fix-coredump-of-ukui-menu.patch b/0002-fix-coredump-of-ukui-menu.patch deleted file mode 100644 index 14803d4..0000000 --- a/0002-fix-coredump-of-ukui-menu.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 443a316ff98be2cfb1c7cdb3725489789ac504b9 Mon Sep 17 00:00:00 2001 -From: peijiankang -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 - diff --git a/0009-win.patch b/0009-win.patch new file mode 100644 index 0000000..9461cb2 --- /dev/null +++ b/0009-win.patch @@ -0,0 +1,38 @@ +From: lixueman +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); + diff --git a/0010-hover.patch b/0010-hover.patch new file mode 100644 index 0000000..7c4bdb3 --- /dev/null +++ b/0010-hover.patch @@ -0,0 +1,684 @@ +From: lixueman +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(); +- 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().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 @@ +- +- +- +- +- FullMainWindow +- +- +- Search +- +- +- +- +- All +- +- +- +- +- Letter +- +- +- +- +- Function +- +- +- +- +- FunctionWidget +- +- +- Search +- +- +- +- +- ItemDelegate +- +- +- Open the function sort menu +- +- +- +- +- Open the alphabetical menu +- +- +- +- +- MainWindow +- +- +- collection +- +- +- +- +- +- +- +- +- All +- +- +- +- +- +- Search +- +- +- +- +- No recent files +- +- +- +- +- recent +- +- +- +- +- Max +- +- +- +- +- PowerOff +- +- +- +- +- +- +- Letter +- +- +- +- +- +- +- Function +- +- +- +- +- QObject +- +- +- +- Office +- +- +- +- +- +- Development +- +- +- +- +- +- Image +- +- +- +- +- +- Video +- +- +- +- +- +- Internet +- +- +- +- +- +- Game +- +- +- +- +- +- Education +- +- +- +- +- +- Social +- +- +- +- +- +- System +- +- +- +- +- +- Safe +- +- +- +- +- +- Others +- +- +- +- +- RightClickMenu +- +- +- Pin to all +- +- +- +- +- Unpin from all +- +- +- +- +- Pin to taskbar +- +- +- +- +- Unpin from taskbar +- +- +- +- +- Add to desktop shortcuts +- +- +- +- +- Pin to collection +- +- +- +- +- Remove from collection +- +- +- +- +- Uninstall +- +- +- +- +- Switch user +- +- +- +- +- Hibernate +- +- +- +- +- Sleep +- +- +- +- +- Lock Screen +- +- +- +- +- Log Out +- +- +- +- +- Restart +- +- +- +- +- Power Off +- +- +- +- +- Personalize this list +- +- +- +- +- TabletRightClickMenu +- +- +- Pin to taskbar +- +- +- +- +- Unpin from taskbar +- +- +- +- +- Add to desktop shortcuts +- +- +- +- +- Uninstall +- +- +- +- +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 @@ ++ ++ ++ ++ ++ FullMainWindow ++ ++ ++ Search ++ འཚོལ་ཞིབ། ++ ++ ++ ++ All ++ ཚང་མ། ++ ++ ++ ++ Letter ++ འཕྲིན་ཡིག ++ ++ ++ ++ Function ++ བྱེད་ནུས། ++ ++ ++ ++ FunctionWidget ++ ++ ++ Search ++ འཚོལ་ཞིབ། ++ ++ ++ ++ ItemDelegate ++ ++ Open feature sort list ++ 打开功能排序菜单 ++ ++ ++ Open alphabetical list ++ 打开字母排序菜单 ++ ++ ++ ++ Open the function sort menu ++ བྱེད་ལས་རིགས་ཀྱི་ཟས་ཐོའི་ཁ་ཕྱེ་བ། ++ ++ ++ ++ Open the alphabetical menu ++ དབྱངས་གསལ་ཡི་གེའི་ཟས་ཐོའི་ཁ་ཕྱེ་བ། ++ ++ ++ ++ MainWindow ++ ++ ++ ++ Search ++ འཚོལ་ཞིབ། ++ ++ ++ ++ No recent files ++ ཉེ་དུས་ཀྱི་ཡིག་ཆ་མེད། ++ ++ ++ ++ ++ ++ ++ ++ All ++ ཚང་མ། ++ ++ ++ ++ collection ++ བསྡུ་ཉར། ++ ++ ++ ++ recent ++ ཉེ་ཆར། ++ ++ ++ ++ Max ++ མའེ་ཁེ་སི། ++ ++ ++ ++ PowerOff ++ སྒུལ་ཤུགས་ཀྱི་ནུས་པ། ++ ++ ++ Search application ++ 搜索应用 ++ ++ ++ ++ ++ ++ Letter ++ འཕྲིན་ཡིག ++ ++ ++ ++ ++ ++ Function ++ བྱེད་ནུས། ++ ++ ++ ++ QObject ++ ++ ++ ++ Office ++ གཞུང་ལས་ཁང་། ++ ++ ++ ++ ++ Development ++ འཕེལ་རྒྱས་ ++ ++ ++ ++ ++ Image ++ པར་རིས། ++ ++ ++ ++ ++ Video ++ བརྙན་ཕབ། ++ ++ ++ ++ ++ Internet ++ དྲ་སྦྲེལ། ++ ++ ++ ++ ++ Game ++ རོལ་རྩེད། ++ ++ ++ ++ ++ Education ++ སློབ་གསོ། ++ ++ ++ ++ ++ Social ++ སྤྱི་ཚོགས། ++ ++ ++ ++ ++ System ++ ལམ་ལུགས། ++ ++ ++ ++ ++ Safe ++ བདེ་འཇགས། ++ ++ ++ ++ ++ Others ++ དེ་མིན་ད་དུང་ ++ ++ ++ ++ RightClickMenu ++ ++ ++ Pin to all ++ མི་ཚང་མར་ཁབ་རྒྱག་པ། ++ ++ ++ ++ Unpin from all ++ མི་ཚང་མའི་ཁྲོད་ནས་བཀག་འགོག་བྱེད་ ++ ++ ++ ++ Pin to taskbar ++ ལས་འགན་སྒྲུབ་པར་ཁབ་རྒྱག་པ། ++ ++ ++ ++ Unpin from taskbar ++ ལས་འགན་སྒྲུབ་ས་ནས་ཁ་པར་གཏོང་བ། ++ ++ ++ ++ Add to desktop shortcuts ++ ཅོག་ཙེའི་སྟེང་གི་མགྱོགས་ལམ་ཁ་སྣོན་བྱས་ཡོད། ++ ++ ++ ++ Pin to collection ++ འཚོལ་སྡུད་བྱེད་པའི་ཁབ་སྐུད། ++ ++ ++ ++ Remove from collection ++ བསྡུ་ཉར་དངོས་རྫས་ཁྲོད་ནས་ཕྱིར་ ++ ++ ++ ++ Uninstall ++ སྒྲིག་སྦྱོར་བྱས་མེད་པ། ++ ++ ++ ++ Switch user ++ གློག་སྒོ་འབྱེད་པའི་སྤྱོད་མཁན ++ ++ ++ ++ Hibernate ++ ཧིན་རྡུ་ཉི་ཞི་ཡ། ++ ++ ++ ++ Sleep ++ གཉིད་ཁུག་པ། ++ ++ ++ ++ Lock Screen ++ སྒོ་ལྕགས་ཀྱི་བརྙན་ཤེལ། ++ ++ ++ ++ Log Out ++ ཕྱིར་འཐེན་བྱ་དགོས། ++ ++ ++ ++ Restart ++ ཡང་བསྐྱར་འགོ་འཛུགས་ ++ ++ ++ ++ Power Off ++ གློག་ཆད་པ། ++ ++ ++ ++ Personalize this list ++ མིང་ཐོ་འདི་རང་གཤིས་ཅན་དུ་བསྒྱུར ++ ++ ++ ++ TabletRightClickMenu ++ ++ ++ Pin to taskbar ++ ལས་འགན་སྒྲུབ་པར་ཁབ་རྒྱག་པ། ++ ++ ++ ++ Unpin from taskbar ++ ལས་འགན་སྒྲུབ་ས་ནས་ཁ་པར་གཏོང་བ། ++ ++ ++ ++ Add to desktop shortcuts ++ ཅོག་ཙེའི་སྟེང་གི་མགྱོགས་ལམ་ཁ་སྣོན་བྱས་ཡོད། ++ ++ ++ ++ Uninstall ++ སྒྲིག་སྦྱོར་བྱས་མེད་པ། ++ ++ ++ +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 + diff --git a/0011-.patch b/0011-.patch new file mode 100644 index 0000000..76a9bbf --- /dev/null +++ b/0011-.patch @@ -0,0 +1,430 @@ +From: lixueman +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 + #include + #include + #include +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 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; diff --git a/0012-16-wayland.patch b/0012-16-wayland.patch new file mode 100644 index 0000000..29222cc --- /dev/null +++ b/0012-16-wayland.patch @@ -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 ++#include + #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(); + 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 + #include ++#include + + 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 + #include + #include ++#include + + 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().at(0); + if (var.isValid()) { + QString desktopfp = var.value(); +- 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 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 + #include + #include ++#include + #include "ukuimenuinterface.h" + + #define DATABASENAME QDir::homePath()+"/.config/ukui/"+"UkuiMenu.db" +@@ -710,14 +711,16 @@ bool deleteAppRecord(QString desktopfn) + + void execApp(QString desktopfp) + { ++ QDBusReply 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 res = iface.call("LaunchApp", desktopfp); +- +- if (!res.isValid() || !res) { ++ if (!result.isValid() || !result) { + + UkuiMenuInterface interface; + diff --git a/0013-21-.pro-openKylin-0.7.5.patch b/0013-21-.pro-openKylin-0.7.5.patch new file mode 100644 index 0000000..ac825b7 --- /dev/null +++ b/0013-21-.pro-openKylin-0.7.5.patch @@ -0,0 +1,48 @@ +From: lixueman +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 diff --git a/0014-19.patch b/0014-19.patch new file mode 100644 index 0000000..5c4bfc9 --- /dev/null +++ b/0014-19.patch @@ -0,0 +1,7082 @@ +From: lixueman +Date: Mon, 10 Oct 2022 03:23:21 +0000 +Subject: =?utf-8?b?ITE5IOino+WGs+W8gOWni+iPnOWNleWKqOeUu+mXrumimO+8m+Wing==?= + =?utf-8?b?5Yqg54mI5p2D5L+h5oGv77yb6Kej5Yaz5Y2V55So5oi35Y+z6ZSu6I+c5Y2V5a2Y?= + =?utf-8?b?5Zyo5YiH5o2i55So5oi36YCJ6aG56Zeu6aKYIO+8m+inhOiMg+aAp+mXrumimA==?= + =?utf-8?b?5qOA5p+lIE1lcmdlIHB1bGwgcmVxdWVzdCAhMTkgZnJvbSBsaXh1ZW1hbi9vcGVu?= + =?utf-8?b?a3lsaW4veWFuZ3R6ZQ==?= + +--- + main.cpp | 31 +-- + src/BackProcess/DBus/dbus.cpp | 17 ++ + src/BackProcess/DBus/dbus.h | 17 ++ + .../FileWatcher/convert_winid_to_desktop.cpp | 11 +- + .../FileWatcher/convert_winid_to_desktop.h | 11 +- + src/BackProcess/FileWatcher/desktop_watcher.cpp | 21 ++ + src/BackProcess/FileWatcher/desktop_watcher.h | 18 ++ + .../FileWatcher/directory_changed_thread.cpp | 16 +- + .../FileWatcher/directory_changed_thread.h | 11 +- + .../software_database_update_thread.cpp | 11 +- + .../FileWatcher/software_database_update_thread.h | 11 +- + .../FileWatcher/tablet_directorychanged_thread.cpp | 94 +++---- + .../FileWatcher/tablet_directorychanged_thread.h | 13 +- + .../Interface/currenttime_interface.cpp | 17 ++ + src/BackProcess/Interface/currenttime_interface.h | 21 +- + src/BackProcess/Interface/ukui_chineseletter.cpp | 11 +- + src/BackProcess/Interface/ukui_chineseletter.h | 11 +- + src/BackProcess/Interface/ukuimenuinterface.cpp | 27 +- + src/BackProcess/Interface/ukuimenuinterface.h | 11 +- + src/BackProcess/Search/searchappthread.cpp | 16 +- + src/BackProcess/Search/searchappthread.h | 11 +- + src/BackProcess/tablet/getmodeldata.cpp | 40 ++- + src/BackProcess/tablet/getmodeldata.h | 18 ++ + src/BackProcess/tablet/pagemanager.cpp | 43 ++- + src/BackProcess/tablet/pagemanager.h | 18 ++ + .../Button/function_classify_button.cpp | 11 +- + .../Button/function_classify_button.h | 11 +- + .../Button/letter_classify_button.cpp | 19 +- + src/UserInterface/Button/letter_classify_button.h | 11 +- + src/UserInterface/Button/tool_button.cpp | 11 +- + src/UserInterface/Button/tool_button.h | 11 +- + src/UserInterface/ListView/fulllistview.cpp | 33 ++- + src/UserInterface/ListView/fulllistview.h | 17 +- + src/UserInterface/ListView/klistview.cpp | 49 +++- + src/UserInterface/ListView/klistview.h | 25 +- + src/UserInterface/ListView/listview.cpp | 36 +-- + src/UserInterface/ListView/listview.h | 11 +- + src/UserInterface/ListView/rightlistview.cpp | 25 +- + src/UserInterface/ListView/rightlistview.h | 17 ++ + src/UserInterface/ListView/tabletlistview.cpp | 91 +++--- + src/UserInterface/ListView/tabletlistview.h | 11 +- + .../Other/classify_btn_scrollarea.cpp | 11 +- + src/UserInterface/Other/classify_btn_scrollarea.h | 11 +- + src/UserInterface/Other/lettertooltip.cpp | 17 ++ + src/UserInterface/Other/lettertooltip.h | 17 ++ + src/UserInterface/Other/rotationlabel.cpp | 23 ++ + src/UserInterface/Other/rotationlabel.h | 18 ++ + src/UserInterface/Other/scrollarea.cpp | 11 +- + src/UserInterface/Other/scrollarea.h | 11 +- + src/UserInterface/RightClickMenu/menubox.cpp | 17 ++ + src/UserInterface/RightClickMenu/menubox.h | 17 ++ + .../RightClickMenu/rightclickmenu.cpp | 66 ++++- + src/UserInterface/RightClickMenu/rightclickmenu.h | 16 +- + .../RightClickMenu/tabletrightclickmenu.cpp | 13 +- + .../RightClickMenu/tabletrightclickmenu.h | 11 +- + src/UserInterface/ViewItem/full_item_delegate.cpp | 40 +-- + src/UserInterface/ViewItem/full_item_delegate.h | 11 +- + src/UserInterface/ViewItem/itemdelegate.cpp | 43 +-- + src/UserInterface/ViewItem/itemdelegate.h | 11 +- + src/UserInterface/ViewItem/kitemdelegate.cpp | 21 ++ + src/UserInterface/ViewItem/kitemdelegate.h | 20 +- + .../ViewItem/recent_item_delegate.cpp | 36 ++- + src/UserInterface/ViewItem/recent_item_delegate.h | 23 +- + src/UserInterface/ViewItem/right_item_delegate.cpp | 32 ++- + src/UserInterface/ViewItem/right_item_delegate.h | 17 ++ + .../ViewItem/tablet_full_itemdelegate.cpp | 37 ++- + .../ViewItem/tablet_full_itemdelegate.h | 11 +- + src/UserInterface/Widget/animationpage.cpp | 17 ++ + src/UserInterface/Widget/animationpage.h | 17 ++ + src/UserInterface/Widget/full_commonuse_widget.cpp | 20 +- + src/UserInterface/Widget/full_commonuse_widget.h | 11 +- + src/UserInterface/Widget/full_function_widget.cpp | 63 +++-- + src/UserInterface/Widget/full_function_widget.h | 11 +- + src/UserInterface/Widget/full_letter_widget.cpp | 72 +++-- + src/UserInterface/Widget/full_letter_widget.h | 11 +- + .../Widget/full_searchresult_widget.cpp | 18 +- + .../Widget/full_searchresult_widget.h | 11 +- + src/UserInterface/Widget/function_Widget.cpp | 20 +- + src/UserInterface/Widget/function_Widget.h | 20 +- + .../Widget/function_button_widget.cpp | 19 +- + src/UserInterface/Widget/function_button_widget.h | 11 +- + src/UserInterface/Widget/letter_button_widget.cpp | 11 +- + src/UserInterface/Widget/letter_button_widget.h | 11 +- + src/UserInterface/Widget/main_view_widget.cpp | 11 +- + src/UserInterface/Widget/main_view_widget.h | 11 +- + src/UserInterface/Widget/plugin_widget.cpp | 21 +- + src/UserInterface/Widget/plugin_widget.h | 23 +- + src/UserInterface/Widget/splitbar_frame.cpp | 13 +- + src/UserInterface/Widget/splitbar_frame.h | 11 +- + src/UserInterface/Widget/tabview_widget.cpp | 36 --- + src/UserInterface/Widget/tabview_widget.h | 25 -- + src/UserInterface/full_mainwindow.cpp | 19 +- + src/UserInterface/full_mainwindow.h | 17 ++ + src/UserInterface/mainwindow.cpp | 106 +++---- + src/UserInterface/mainwindow.h | 16 +- + src/UserInterface/tabletwindow.cpp | 33 ++- + src/UserInterface/tabletwindow.h | 11 +- + src/UserInterface/userinterface.pri | 2 - + src/UtilityFunction/AbstractInterface.h | 13 - + src/UtilityFunction/KySmallPluginInterface.h | 17 ++ + src/UtilityFunction/Style/style.cpp | 310 ++++++++++----------- + src/UtilityFunction/Style/style.h | 126 ++++----- + src/UtilityFunction/abstractInterface.h | 20 -- + src/UtilityFunction/thumbnail.cpp | 37 ++- + src/UtilityFunction/thumbnail.h | 17 ++ + src/UtilityFunction/utility.cpp | 19 +- + src/UtilityFunction/utility.h | 11 +- + src/UtilityFunction/utilityfunction.pri | 2 - + translations/ukui-menu_bo_CN.ts | 144 +++++----- + translations/ukui-menu_tr.ts | 140 +++++----- + translations/ukui-menu_zh_CN.ts | 144 +++++----- + 111 files changed, 1883 insertions(+), 1291 deletions(-) + delete mode 100755 src/UserInterface/Widget/tabview_widget.cpp + delete mode 100755 src/UserInterface/Widget/tabview_widget.h + delete mode 100755 src/UtilityFunction/AbstractInterface.h + delete mode 100755 src/UtilityFunction/abstractInterface.h + +diff --git a/main.cpp b/main.cpp +index 4d4c558..c9c0dbf 100755 +--- a/main.cpp ++++ b/main.cpp +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #include "mainwindow.h" +@@ -81,17 +80,17 @@ int main(int argc, char *argv[]) + if (Style::m_panelPosition == 0) { + if (g_platform.startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) { + kdk::WindowManager::setGeometry(w.windowHandle(),QRect(Style::m_primaryScreenX + 4, Style::m_primaryScreenY + +- Style::m_availableScreenHeight - Style::minh - 3, Style::minw, Style::minh)); ++ Style::m_availableScreenHeight - Style::m_minh - 3, Style::m_minw, Style::m_minh)); + } else { +- w.setGeometry(QRect(Style::m_primaryScreenX + 4, Style::m_primaryScreenY + Style::m_availableScreenHeight - Style::minh - 3, +- Style::minw, Style::minh)); ++ w.setGeometry(QRect(Style::m_primaryScreenX + 4, Style::m_primaryScreenY + Style::m_availableScreenHeight - Style::m_minh - 3, ++ Style::m_minw, Style::m_minh)); + } + } else if (Style::m_panelPosition == 1) { + if (g_platform.startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) { + kdk::WindowManager::setGeometry(w.windowHandle(),QRect(Style::m_primaryScreenX + 4, +- Style::m_primaryScreenY + 4, Style::minw, Style::minh)); ++ Style::m_primaryScreenY + 4, Style::m_minw, Style::m_minh)); + } else { +- w.setGeometry(QRect(Style::m_primaryScreenX + 4, Style::m_primaryScreenY + 4, Style::minw, Style::minh)); ++ w.setGeometry(QRect(Style::m_primaryScreenX + 4, Style::m_primaryScreenY + 4, Style::m_minw, Style::m_minh)); + } + + } else if (Style::m_panelPosition == 2) { +@@ -99,17 +98,17 @@ int main(int argc, char *argv[]) + + if (g_platform.startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) { + kdk::WindowManager::setGeometry(w.windowHandle(), QRect(Style::m_primaryScreenX + 4, +- Style::m_primaryScreenY + 4, Style::minw, Style::minh)); ++ Style::m_primaryScreenY + 4, Style::m_minw, Style::m_minh)); + } else { +- w.setGeometry(QRect(Style::m_primaryScreenX + 4, Style::m_primaryScreenY + 4, Style::minw, Style::minh)); ++ w.setGeometry(QRect(Style::m_primaryScreenX + 4, Style::m_primaryScreenY + 4, Style::m_minw, Style::m_minh)); + } + } else { + if (g_platform.startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) { + kdk::WindowManager::setGeometry(w.windowHandle(), QRect(Style::m_primaryScreenX + Style::m_availableScreenWidth - +- Style::minw - 4, Style::m_primaryScreenY + 4, Style::minw, Style::minh)); ++ Style::m_minw - 4, Style::m_primaryScreenY + 4, Style::m_minw, Style::m_minh)); + } else { +- w.setGeometry(QRect(Style::m_primaryScreenX + Style::m_availableScreenWidth - Style::minw - 4, Style::m_primaryScreenY + 4, +- Style::minw, Style::minh)); ++ w.setGeometry(QRect(Style::m_primaryScreenX + Style::m_availableScreenWidth - Style::m_minw - 4, Style::m_primaryScreenY + 4, ++ Style::m_minw, Style::m_minh)); + } + } + +diff --git a/src/BackProcess/DBus/dbus.cpp b/src/BackProcess/DBus/dbus.cpp +index 42f7109..2dc3aaa 100755 +--- a/src/BackProcess/DBus/dbus.cpp ++++ b/src/BackProcess/DBus/dbus.cpp +@@ -1,3 +1,20 @@ ++/* ++ * Copyright (C) 2022, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . ++ */ ++ + #include "dbus.h" + #include + #include +diff --git a/src/BackProcess/DBus/dbus.h b/src/BackProcess/DBus/dbus.h +index 44f3be4..8da5943 100755 +--- a/src/BackProcess/DBus/dbus.h ++++ b/src/BackProcess/DBus/dbus.h +@@ -1,3 +1,20 @@ ++/* ++ * Copyright (C) 2022, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . ++ */ ++ + #ifndef DBUS_H + #define DBUS_H + +diff --git a/src/BackProcess/FileWatcher/convert_winid_to_desktop.cpp b/src/BackProcess/FileWatcher/convert_winid_to_desktop.cpp +index f7bc939..24575bf 100755 +--- a/src/BackProcess/FileWatcher/convert_winid_to_desktop.cpp ++++ b/src/BackProcess/FileWatcher/convert_winid_to_desktop.cpp +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #include "convert_winid_to_desktop.h" +diff --git a/src/BackProcess/FileWatcher/convert_winid_to_desktop.h b/src/BackProcess/FileWatcher/convert_winid_to_desktop.h +index ba6a77f..92e0521 100755 +--- a/src/BackProcess/FileWatcher/convert_winid_to_desktop.h ++++ b/src/BackProcess/FileWatcher/convert_winid_to_desktop.h +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #ifndef CONVERTDESKTOPTOWINID_H +diff --git a/src/BackProcess/FileWatcher/desktop_watcher.cpp b/src/BackProcess/FileWatcher/desktop_watcher.cpp +index e3c6141..5e2cf10 100755 +--- a/src/BackProcess/FileWatcher/desktop_watcher.cpp ++++ b/src/BackProcess/FileWatcher/desktop_watcher.cpp +@@ -1,3 +1,20 @@ ++/* ++ * Copyright (C) 2022, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . ++ */ ++ + #include "desktop_watcher.h" + #include + #include +@@ -20,6 +37,10 @@ DesktopWatcher::DesktopWatcher() + connect(m_directoryChangedThread, &DirectoryChangedThread::requestUpdateSignal, this, &DesktopWatcher::requestUpdateSlot); + } + ++DesktopWatcher::~DesktopWatcher() ++{ ++} ++ + /** + * desktop文件目录改变信号槽 + */ +diff --git a/src/BackProcess/FileWatcher/desktop_watcher.h b/src/BackProcess/FileWatcher/desktop_watcher.h +index 874a98d..9b6f9c3 100755 +--- a/src/BackProcess/FileWatcher/desktop_watcher.h ++++ b/src/BackProcess/FileWatcher/desktop_watcher.h +@@ -1,3 +1,20 @@ ++/* ++ * Copyright (C) 2022, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . ++ */ ++ + #ifndef DESKTOPWATCHER_H + #define DESKTOPWATCHER_H + #include +@@ -9,6 +26,7 @@ class DesktopWatcher : public QObject + Q_OBJECT + public: + DesktopWatcher(); ++ ~DesktopWatcher(); + + public: + Q_SIGNALS: +diff --git a/src/BackProcess/FileWatcher/directory_changed_thread.cpp b/src/BackProcess/FileWatcher/directory_changed_thread.cpp +index 3ef8938..b96a470 100755 +--- a/src/BackProcess/FileWatcher/directory_changed_thread.cpp ++++ b/src/BackProcess/FileWatcher/directory_changed_thread.cpp +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #include "directory_changed_thread.h" +@@ -28,7 +27,10 @@ DirectoryChangedThread::DirectoryChangedThread() + + DirectoryChangedThread::~DirectoryChangedThread() + { +- delete m_ukuiMenuInterface; ++ if (m_ukuiMenuInterface) { ++ delete m_ukuiMenuInterface; ++ m_ukuiMenuInterface = nullptr; ++ } + } + + void DirectoryChangedThread::run() +diff --git a/src/BackProcess/FileWatcher/directory_changed_thread.h b/src/BackProcess/FileWatcher/directory_changed_thread.h +index da6130c..7e29038 100755 +--- a/src/BackProcess/FileWatcher/directory_changed_thread.h ++++ b/src/BackProcess/FileWatcher/directory_changed_thread.h +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #ifndef DIRECTORYCHANGEDTHREAD_H +diff --git a/src/BackProcess/FileWatcher/software_database_update_thread.cpp b/src/BackProcess/FileWatcher/software_database_update_thread.cpp +index b8c98f4..9c50f44 100755 +--- a/src/BackProcess/FileWatcher/software_database_update_thread.cpp ++++ b/src/BackProcess/FileWatcher/software_database_update_thread.cpp +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #include "software_database_update_thread.h" +diff --git a/src/BackProcess/FileWatcher/software_database_update_thread.h b/src/BackProcess/FileWatcher/software_database_update_thread.h +index 51d7d8d..2914339 100755 +--- a/src/BackProcess/FileWatcher/software_database_update_thread.h ++++ b/src/BackProcess/FileWatcher/software_database_update_thread.h +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #ifndef SOFTWAREDATABASEUPDATETHREAD_H +diff --git a/src/BackProcess/FileWatcher/tablet_directorychanged_thread.cpp b/src/BackProcess/FileWatcher/tablet_directorychanged_thread.cpp +index 0cbbf6b..7c7ee4a 100755 +--- a/src/BackProcess/FileWatcher/tablet_directorychanged_thread.cpp ++++ b/src/BackProcess/FileWatcher/tablet_directorychanged_thread.cpp +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #include "tablet_directorychanged_thread.h" +@@ -28,21 +27,20 @@ TabletDirectoryChangedThread::TabletDirectoryChangedThread() + { + m_ukuiMenuInterface = new UkuiMenuInterface; + QString path = QDir::homePath() + "/.config/ukui/ukui-menu.ini"; +- setting = new QSettings(path, QSettings::IniFormat); ++ m_setting = new QSettings(path, QSettings::IniFormat); + } + + TabletDirectoryChangedThread::~TabletDirectoryChangedThread() + { + if (m_ukuiMenuInterface) { + delete m_ukuiMenuInterface; ++ m_ukuiMenuInterface = nullptr; + } + +- if (setting) { +- delete setting; ++ if (m_setting) { ++ delete m_setting; ++ m_setting = nullptr; + } +- +- m_ukuiMenuInterface = nullptr; +- setting = nullptr; + } + + +@@ -67,41 +65,41 @@ void TabletDirectoryChangedThread::run() + QStringList list = str.split('/'); + str = list[list.size() - 1]; + QString desktopfn = str; +- setting->beginGroup("recentapp"); +- setting->setValue(desktopfn, datetime); +- setting->sync(); +- setting->endGroup(); ++ m_setting->beginGroup("recentapp"); ++ m_setting->setValue(desktopfn, datetime); ++ m_setting->sync(); ++ m_setting->endGroup(); + //wgx +- setting->beginGroup("application"); +- QStringList applist = setting->allKeys(); +- int appnum = setting->allKeys().count(); ++ m_setting->beginGroup("application"); ++ QStringList applist = m_setting->allKeys(); ++ int appnum = m_setting->allKeys().count(); + int maxindex = 0; + int minindex = 0; + + for (int i = 0; i < appnum; i++) { +- if (setting->value(applist.at(i)).toInt() > maxindex) { +- maxindex = setting->value(applist.at(i)).toInt(); ++ if (m_setting->value(applist.at(i)).toInt() > maxindex) { ++ maxindex = m_setting->value(applist.at(i)).toInt(); + } + +- if(setting->value(applist.at(i)).toInt() <= minindex) { +- minindex = setting->value(applist.at(i)).toInt(); ++ if(m_setting->value(applist.at(i)).toInt() <= minindex) { ++ minindex = m_setting->value(applist.at(i)).toInt(); + } + } + + if (desktopfn.contains("small-plugin-manage")){ +- setting->setValue(desktopfn,minindex-1); ++ m_setting->setValue(desktopfn,minindex-1); + } else { +- setting->setValue(desktopfn,maxindex+1); ++ m_setting->setValue(desktopfn,maxindex+1); + } + +- setting->sync(); +- setting->endGroup(); ++ m_setting->sync(); ++ m_setting->endGroup(); + // + QString iconstr = m_ukuiMenuInterface->getAppIcon(desktopfpList.at(i)); + syslog(LOG_LOCAL0 | LOG_DEBUG, "%s", iconstr.toLocal8Bit().data()); + syslog(LOG_LOCAL0 | LOG_DEBUG, "软件安装desktop文件名:%s", desktopfn.toLocal8Bit().data()); + +- Q_FOREACH (QString path, QIcon::themeSearchPaths()) { ++ Q_FOREACH(QString path, QIcon::themeSearchPaths()) { + syslog(LOG_LOCAL0 | LOG_DEBUG, "%s", path.toLocal8Bit().data()); + } + } +@@ -113,35 +111,35 @@ void TabletDirectoryChangedThread::run() + QFileInfo fileInfo(desktopfp); + QString desktopfn = fileInfo.fileName(); + myDebug() << "卸载" << desktopfn; +- setting->beginGroup("lockapplication"); +- setting->remove(desktopfn); +- setting->sync(); +- setting->endGroup(); +- setting->beginGroup("application"); +- +- if (!setting->contains(desktopfn)) { +- setting->sync(); +- setting->endGroup(); ++ m_setting->beginGroup("lockapplication"); ++ m_setting->remove(desktopfn); ++ m_setting->sync(); ++ m_setting->endGroup(); ++ m_setting->beginGroup("application"); ++ ++ if (!m_setting->contains(desktopfn)) { ++ m_setting->sync(); ++ m_setting->endGroup(); + continue; + } + +- int val = setting->value(desktopfn).toInt(); ++ int val = m_setting->value(desktopfn).toInt(); + myDebug() << "卸载val" << val; +- setting->remove(desktopfn); +- QStringList desktopfnList = setting->allKeys(); ++ m_setting->remove(desktopfn); ++ QStringList desktopfnList = m_setting->allKeys(); + + for (int i = 0; i < desktopfnList.count(); i++) { +- if (setting->value(desktopfnList.at(i)).toInt() > val) { +- setting->setValue(desktopfnList.at(i), setting->value(desktopfnList.at(i)).toInt() - 1); ++ if (m_setting->value(desktopfnList.at(i)).toInt() > val) { ++ m_setting->setValue(desktopfnList.at(i), m_setting->value(desktopfnList.at(i)).toInt() - 1); + } + } + +- setting->sync(); +- setting->endGroup(); +- setting->beginGroup("recentapp"); +- setting->remove(desktopfn); +- setting->sync(); +- setting->endGroup(); ++ m_setting->sync(); ++ m_setting->endGroup(); ++ m_setting->beginGroup("recentapp"); ++ m_setting->remove(desktopfn); ++ m_setting->sync(); ++ m_setting->endGroup(); + syslog(LOG_LOCAL0 | LOG_DEBUG, "软件卸载desktop文件名:%s", desktopfn.toLocal8Bit().data()); + QDBusInterface iface("com.ukui.panel.desktop", + "/", +diff --git a/src/BackProcess/FileWatcher/tablet_directorychanged_thread.h b/src/BackProcess/FileWatcher/tablet_directorychanged_thread.h +index 279dec1..6939333 100755 +--- a/src/BackProcess/FileWatcher/tablet_directorychanged_thread.h ++++ b/src/BackProcess/FileWatcher/tablet_directorychanged_thread.h +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #ifndef TABLETDIRECTORYCHANGEDTHREAD_H +@@ -35,7 +34,7 @@ public: + + private: + UkuiMenuInterface *m_ukuiMenuInterface = nullptr; +- QSettings *setting = nullptr; ++ QSettings *m_setting = nullptr; + TabletListView *m_listView = nullptr; + QStandardItemModel *listmodel = nullptr; + +diff --git a/src/BackProcess/Interface/currenttime_interface.cpp b/src/BackProcess/Interface/currenttime_interface.cpp +index 4608040..ea71b88 100755 +--- a/src/BackProcess/Interface/currenttime_interface.cpp ++++ b/src/BackProcess/Interface/currenttime_interface.cpp +@@ -1,3 +1,20 @@ ++/* ++ * Copyright (C) 2022, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . ++ */ ++ + #include "currenttime_interface.h" + #include + #define TIME_FORMAT "org.ukui.control-center.panel.plugins" +diff --git a/src/BackProcess/Interface/currenttime_interface.h b/src/BackProcess/Interface/currenttime_interface.h +index cf08151..80c318f 100755 +--- a/src/BackProcess/Interface/currenttime_interface.h ++++ b/src/BackProcess/Interface/currenttime_interface.h +@@ -1,3 +1,20 @@ ++/* ++ * Copyright (C) 2022, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . ++ */ ++ + #ifndef CURRENTTIMEINTERFACE_H + #define CURRENTTIMEINTERFACE_H + #include +@@ -7,9 +24,9 @@ + #include + #include + +-class CurrentTimeInterface : QObject ++class CurrentTimeInterface : public QObject + { +- ++ Q_OBJECT + public: + CurrentTimeInterface(); + ~CurrentTimeInterface(); +diff --git a/src/BackProcess/Interface/ukui_chineseletter.cpp b/src/BackProcess/Interface/ukui_chineseletter.cpp +index ff73a2d..a5a8956 100755 +--- a/src/BackProcess/Interface/ukui_chineseletter.cpp ++++ b/src/BackProcess/Interface/ukui_chineseletter.cpp +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #include "ukui_chineseletter.h" +diff --git a/src/BackProcess/Interface/ukui_chineseletter.h b/src/BackProcess/Interface/ukui_chineseletter.h +index c1da729..6b4d501 100755 +--- a/src/BackProcess/Interface/ukui_chineseletter.h ++++ b/src/BackProcess/Interface/ukui_chineseletter.h +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #ifndef UKUICHINESELETTER_H +diff --git a/src/BackProcess/Interface/ukuimenuinterface.cpp b/src/BackProcess/Interface/ukuimenuinterface.cpp +index ed6718b..7879cc0 100755 +--- a/src/BackProcess/Interface/ukuimenuinterface.cpp ++++ b/src/BackProcess/Interface/ukuimenuinterface.cpp +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #include "ukuimenuinterface.h" +@@ -996,7 +995,7 @@ QVector UkuiMenuInterface::getAllClassification() + commonVector = getCommonUseApp(); + int index = 0; + +- Q_FOREACH (QString desktopfp, desktopfpVector) { ++ Q_FOREACH(QString desktopfp, desktopfpVector) { + if (!commonVector.contains(desktopfp)) { + appVector.append(appInfoVector.at(index)); + } +@@ -1006,7 +1005,7 @@ QVector UkuiMenuInterface::getAllClassification() + + qSort(appVector.begin(), appVector.end(), cmpApp); + +- Q_FOREACH (QString desktopfp, commonVector) { ++ Q_FOREACH(QString desktopfp, commonVector) { + allAppVector.append(desktopfp); + } + +@@ -1102,7 +1101,7 @@ QVector UkuiMenuInterface::getCommonUseApp() + if (!g_projectCodeName.contains("V10SP1-edu")) { + QVector data; + +- Q_FOREACH (QString desktopfn, getLockAppList()) { ++ Q_FOREACH(QString desktopfn, getLockAppList()) { + QString desktopfp; + + if (androidDesktopfnList.contains(desktopfn)) { +@@ -1120,7 +1119,7 @@ QVector UkuiMenuInterface::getCommonUseApp() + data.append(desktopfp); + } + +- Q_FOREACH (QString desktopfn, getUnlockAllList()) { ++ Q_FOREACH(QString desktopfn, getUnlockAllList()) { + QString desktopfp; + + if (androidDesktopfnList.contains(desktopfn)) { +@@ -1163,7 +1162,7 @@ QVector UkuiMenuInterface::sortDesktopList(QString group) + setting->endGroup(); + QVector data; + +- Q_FOREACH (QString desktopfn, desktopfnList) { ++ Q_FOREACH(QString desktopfn, desktopfnList) { + QString desktopfp; + + if (androidDesktopfnList.contains(desktopfn)) { +@@ -1181,7 +1180,7 @@ QVector UkuiMenuInterface::getCollectApp() + { + QVector data; + +- Q_FOREACH (QString desktopfn, getCollectAppList()) { ++ Q_FOREACH(QString desktopfn, getCollectAppList()) { + QString desktopfp; + + if (androidDesktopfnList.contains(desktopfn)) { +@@ -1221,7 +1220,7 @@ QVector UkuiMenuInterface::getLockApp() + setting->endGroup(); + QVector data; + +- Q_FOREACH (QString desktopfn, lockdesktopfnList) { ++ Q_FOREACH(QString desktopfn, lockdesktopfnList) { + QString desktopfp; + // if(androidDesktopfnList.contains(desktopfn))//如果锁的应用在安卓列表 + // desktopfp=QString(QDir::homePath()+"/.local/share/applications/"+desktopfn); +@@ -1580,7 +1579,7 @@ QString UkuiMenuInterface::getAppNameInitials(QString desktopfp) + QStringList appnamestr = appname.split(" "); + QString letters; + +- Q_FOREACH (QString name, appnamestr) { ++ Q_FOREACH(QString name, appnamestr) { + letters.clear(); + letters = UkuiChineseLetter::getFirstLettersAll(name); + +diff --git a/src/BackProcess/Interface/ukuimenuinterface.h b/src/BackProcess/Interface/ukuimenuinterface.h +index 1c8ca58..38ed9c2 100755 +--- a/src/BackProcess/Interface/ukuimenuinterface.h ++++ b/src/BackProcess/Interface/ukuimenuinterface.h +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #ifndef UKUIMENUINTERFACE_H +diff --git a/src/BackProcess/Search/searchappthread.cpp b/src/BackProcess/Search/searchappthread.cpp +index 128aeed..e1368f1 100755 +--- a/src/BackProcess/Search/searchappthread.cpp ++++ b/src/BackProcess/Search/searchappthread.cpp +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #include "searchappthread.h" +@@ -27,7 +26,10 @@ SearchAppThread::SearchAppThread() + + SearchAppThread::~SearchAppThread() + { +- delete m_ukuiMenuInterface; ++ if (m_ukuiMenuInterface) { ++ delete m_ukuiMenuInterface; ++ m_ukuiMenuInterface = nullptr; ++ } + } + + void SearchAppThread::run() +diff --git a/src/BackProcess/Search/searchappthread.h b/src/BackProcess/Search/searchappthread.h +index 972ba2b..aca52e4 100755 +--- a/src/BackProcess/Search/searchappthread.h ++++ b/src/BackProcess/Search/searchappthread.h +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #ifndef SEARCHAPPTHREAD_H +diff --git a/src/BackProcess/tablet/getmodeldata.cpp b/src/BackProcess/tablet/getmodeldata.cpp +index 11d0693..0f8080f 100755 +--- a/src/BackProcess/tablet/getmodeldata.cpp ++++ b/src/BackProcess/tablet/getmodeldata.cpp +@@ -1,3 +1,20 @@ ++/* ++ * Copyright (C) 2022, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . ++ */ ++ + #include "getmodeldata.h" + #include + #include +@@ -9,6 +26,14 @@ GetModelData::GetModelData() + loadDesktopVercor(); + } + ++GetModelData::~GetModelData() ++{ ++ if (m_ukuiMenuInterface != nullptr) { ++ delete m_ukuiMenuInterface; ++ m_ukuiMenuInterface = nullptr; ++ } ++} ++ + void GetModelData::loadDesktopVercor() + { + UkuiMenuInterface::appInfoVector.clear(); +@@ -27,7 +52,7 @@ QVector GetModelData::getMinAllData() + { + m_minAllData.clear(); + +- Q_FOREACH (QString desktopfp, UkuiMenuInterface::allAppVector) { ++ Q_FOREACH(QString desktopfp, UkuiMenuInterface::allAppVector) { + m_minAllData.append(QStringList() << desktopfp << "1"); + } + +@@ -40,11 +65,11 @@ QStringList GetModelData::getPreCollectionApp() + QStringList preAppList = QStringList(); + QStringList preAppListExist = QStringList(); + preAppList << QString("/usr/share/applications/ukui-control-center.desktop") +- < GetModelData::getRecentData() + enumerator = new Peony::FileEnumerator(this); + enumerator->setEnumerateDirectory("recent:///"); + enumerator->enumerateSync(); +- QString uri; + + for (auto fileInfo : enumerator->getChildren()) { + QStringList recentData; +diff --git a/src/BackProcess/tablet/getmodeldata.h b/src/BackProcess/tablet/getmodeldata.h +index 6e0d3dc..a642aa7 100755 +--- a/src/BackProcess/tablet/getmodeldata.h ++++ b/src/BackProcess/tablet/getmodeldata.h +@@ -1,3 +1,20 @@ ++/* ++ * Copyright (C) 2022, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . ++ */ ++ + #ifndef GETMODELDATA_H + #define GETMODELDATA_H + #include "ukuimenuinterface.h" +@@ -11,6 +28,7 @@ class GetModelData : public QObject + + public: + GetModelData(); ++ ~GetModelData(); + + public: + /** +diff --git a/src/BackProcess/tablet/pagemanager.cpp b/src/BackProcess/tablet/pagemanager.cpp +index 86b2af1..3f49f77 100755 +--- a/src/BackProcess/tablet/pagemanager.cpp ++++ b/src/BackProcess/tablet/pagemanager.cpp +@@ -1,3 +1,20 @@ ++/* ++ * Copyright (C) 2022, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . ++ */ ++ + #include "pagemanager.h" + #include "ukuimenuinterface.h" + #include "style.h" +@@ -9,19 +26,27 @@ PageManager::PageManager() + m_ukuiMenuInterface->initAppIni(); + } + ++PageManager::~PageManager() ++{ ++ if (m_ukuiMenuInterface) { ++ delete m_ukuiMenuInterface; ++ m_ukuiMenuInterface = nullptr; ++ } ++} ++ + int PageManager::getPageNum(const int &appNum) + { + int pageNum = 0; + +- if (appNum / (Style::appColumnFirst * Style::appLineFirst) == 0) { ++ if (appNum / (Style::m_appColumnFirst * Style::m_appLineFirst) == 0) { + pageNum = 1; + } else { +- int appNumOtherPage = appNum - (Style::appColumnFirst * Style::appLineFirst); ++ int appNumOtherPage = appNum - (Style::m_appColumnFirst * Style::m_appLineFirst); + +- if (appNumOtherPage % (Style::appColumn * Style::appLine) == 0) { +- pageNum = appNumOtherPage / (Style::appColumn * Style::appLine) + 1; ++ if (appNumOtherPage % (Style::m_appColumn * Style::m_appLine) == 0) { ++ pageNum = appNumOtherPage / (Style::m_appColumn * Style::m_appLine) + 1; + } else { +- pageNum = appNumOtherPage / (Style::appColumn * Style::appLine) + 2; ++ pageNum = appNumOtherPage / (Style::m_appColumn * Style::m_appLine) + 2; + } + } + +@@ -34,14 +59,14 @@ QVector PageManager::sortAppInPage(const QVector &appVecto + QVector pageData; + QStringList onePageData; + +- Q_FOREACH (QString desktopfp, appVector) { ++ Q_FOREACH(QString desktopfp, appVector) { + m_data.append(desktopfp); + } + + int pageSize = getPageNum(m_data.size()); + onePageData.clear(); + +- for (int j = 0; j < Style::appColumnFirst * Style::appLineFirst; j++) { ++ for (int j = 0; j < Style::m_appColumnFirst * Style::m_appLineFirst; j++) { + if (m_data.size() > 0) { + onePageData.append(m_data.at(0)); + m_data.pop_front(); +@@ -55,7 +80,7 @@ QVector PageManager::sortAppInPage(const QVector &appVecto + for (int i = 0; i < pageSize - 1; i++) { + onePageData.clear(); + +- for (int j = 0; j < Style::appColumn * Style::appLine; j++) { ++ for (int j = 0; j < Style::m_appColumn * Style::m_appLine; j++) { + if (m_data.size() > 0) { + onePageData.append(m_data.at(0)); + m_data.pop_front(); +@@ -79,7 +104,7 @@ QVector PageManager::getAppPageVector() + QVector appPagelist; + QVector allAppList = UkuiMenuInterface::tencentInitVector + UkuiMenuInterface::customizedVector + UkuiMenuInterface::thirdPartyVector + UkuiMenuInterface::applicationVector; + +- Q_FOREACH (QStringList desktopfp, sortAppInPage(/*UkuiMenuInterface::tencentInitVector*/allAppList)) { ++ Q_FOREACH(QStringList desktopfp, sortAppInPage(/*UkuiMenuInterface::tencentInitVector*/allAppList)) { + appPagelist.append(desktopfp); + } + +diff --git a/src/BackProcess/tablet/pagemanager.h b/src/BackProcess/tablet/pagemanager.h +index 8c3f2ca..9991403 100755 +--- a/src/BackProcess/tablet/pagemanager.h ++++ b/src/BackProcess/tablet/pagemanager.h +@@ -1,3 +1,20 @@ ++/* ++ * Copyright (C) 2022, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . ++ */ ++ + #ifndef PAGEMANAGER_H + #define PAGEMANAGER_H + +@@ -9,6 +26,7 @@ class PageManager : public QObject + Q_OBJECT + public: + PageManager(); ++ ~PageManager(); + + int getPageNum(const int &appNum); + QVector sortAppInPage(const QVector &appVector); +diff --git a/src/UserInterface/Button/function_classify_button.cpp b/src/UserInterface/Button/function_classify_button.cpp +index ffed89c..1ed4993 100755 +--- a/src/UserInterface/Button/function_classify_button.cpp ++++ b/src/UserInterface/Button/function_classify_button.cpp +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #include "function_classify_button.h" +diff --git a/src/UserInterface/Button/function_classify_button.h b/src/UserInterface/Button/function_classify_button.h +index 6160fb9..c2e1fae 100755 +--- a/src/UserInterface/Button/function_classify_button.h ++++ b/src/UserInterface/Button/function_classify_button.h +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #ifndef FUNCTIONCLASSIFYBUTTON_H +diff --git a/src/UserInterface/Button/letter_classify_button.cpp b/src/UserInterface/Button/letter_classify_button.cpp +index 11073a8..6577384 100755 +--- a/src/UserInterface/Button/letter_classify_button.cpp ++++ b/src/UserInterface/Button/letter_classify_button.cpp +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #include "letter_classify_button.h" +@@ -167,9 +166,9 @@ void LetterClassifyButton::leaveEvent(QEvent *e) + + if (m_fullscreen) { + QFont font; +- font.setPixelSize(Style::LeftLetterFontSize); ++ font.setPixelSize(Style::m_leftLetterFontSize); + this->setFont(font); +- this->setFixedSize(Style::LeftLetterBtnHeight, Style::LeftLetterBtnHeight); ++ this->setFixedSize(Style::m_leftLetterBtnHeight, Style::m_leftLetterBtnHeight); + tooltip->close(); + delete tooltip; + tooltip = nullptr; +@@ -195,9 +194,9 @@ void LetterClassifyButton::focusInEvent(QEvent *e) + + if (m_fullscreen) { + QFont font; +- font.setPixelSize(Style::LeftLetterFontSize * 3); ++ font.setPixelSize(Style::m_leftLetterFontSize * 3); + this->setFont(font); +- this->setFixedSize(Style::LeftLetterBtnHeight * 2, Style::LeftLetterBtnHeight * 2); ++ this->setFixedSize(Style::m_leftLetterBtnHeight * 2, Style::m_leftLetterBtnHeight * 2); + } + } + +diff --git a/src/UserInterface/Button/letter_classify_button.h b/src/UserInterface/Button/letter_classify_button.h +index 7235987..fded3eb 100755 +--- a/src/UserInterface/Button/letter_classify_button.h ++++ b/src/UserInterface/Button/letter_classify_button.h +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #ifndef LETTERCLASSIFYBUTTON_H +diff --git a/src/UserInterface/Button/tool_button.cpp b/src/UserInterface/Button/tool_button.cpp +index 9e430e6..1d0fe09 100755 +--- a/src/UserInterface/Button/tool_button.cpp ++++ b/src/UserInterface/Button/tool_button.cpp +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #include "tool_button.h" +diff --git a/src/UserInterface/Button/tool_button.h b/src/UserInterface/Button/tool_button.h +index 8634fb2..d1b1895 100755 +--- a/src/UserInterface/Button/tool_button.h ++++ b/src/UserInterface/Button/tool_button.h +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #ifndef TOOLBUTTON_H +diff --git a/src/UserInterface/ListView/fulllistview.cpp b/src/UserInterface/ListView/fulllistview.cpp +index 17124b8..5159e10 100755 +--- a/src/UserInterface/ListView/fulllistview.cpp ++++ b/src/UserInterface/ListView/fulllistview.cpp +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #include "fulllistview.h" +@@ -30,13 +29,25 @@ FullListView::FullListView(QWidget *parent, int module): + initWidget(); + m_delegate = new FullItemDelegate(this, module); + this->setItemDelegate(m_delegate); +- pUkuiMenuInterface = new UkuiMenuInterface; ++ m_ukuiMenuInterface = new UkuiMenuInterface; + } + + FullListView::~FullListView() + { +- delete menu; +- delete gsetting; ++ if (m_rightMenu) { ++ delete m_rightMenu; ++ m_rightMenu = nullptr; ++ } ++ ++ if (m_gsetting) { ++ delete m_gsetting; ++ m_gsetting = nullptr; ++ } ++ ++ if (m_ukuiMenuInterface) { ++ delete m_ukuiMenuInterface; ++ m_ukuiMenuInterface = nullptr; ++ } + } + + void FullListView::initWidget() +@@ -84,7 +95,7 @@ void FullListView::keyPressEvent(QKeyEvent *e) + case Qt::Key_Left: { + this->clearFocus(); + +- if (mapToGlobal(center.topRight()).y() < Style::QueryLineEditHeight + Style::m_applistGridSizeWidth) { ++ if (mapToGlobal(center.topRight()).y() < Style::m_queryLineEditHeight + Style::m_applistGridSizeWidth) { + Q_EMIT sendSetslidebar(-Style::m_applistGridSizeWidth); + } + +@@ -107,7 +118,7 @@ void FullListView::keyPressEvent(QKeyEvent *e) + + case Qt::Key_Up: { + if (module == 0) { +- if (mapToGlobal(center.topRight()).y() < (Style::QueryLineEditHeight + Style::m_applistGridSizeWidth)) { ++ if (mapToGlobal(center.topRight()).y() < (Style::m_queryLineEditHeight + Style::m_applistGridSizeWidth)) { + Q_EMIT sendSetslidebar(-Style::m_applistGridSizeWidth); + } + } +diff --git a/src/UserInterface/ListView/fulllistview.h b/src/UserInterface/ListView/fulllistview.h +index 93c06b2..d51420d 100755 +--- a/src/UserInterface/ListView/fulllistview.h ++++ b/src/UserInterface/ListView/fulllistview.h +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #ifndef FULLLISTVIEW_H +@@ -42,9 +41,9 @@ protected: + void keyPressEvent(QKeyEvent *e); + + private: +- RightClickMenu *menu = nullptr;//右键菜单 +- QStringList data; +- QGSettings *gsetting = nullptr; ++ RightClickMenu *m_rightMenu = nullptr;//右键菜单 ++ QStringList m_data; ++ QGSettings *m_gsetting = nullptr; + + public Q_SLOTS: + void selectFirstItem(); +diff --git a/src/UserInterface/ListView/klistview.cpp b/src/UserInterface/ListView/klistview.cpp +index 1588014..91fbe08 100755 +--- a/src/UserInterface/ListView/klistview.cpp ++++ b/src/UserInterface/ListView/klistview.cpp +@@ -1,3 +1,20 @@ ++/* ++ * Copyright (C) 2022, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . ++ */ ++ + #include + #include "klistview.h" + #include "utility.h" +@@ -12,37 +29,43 @@ KListView::KListView(QWidget *parent): + + KListView::~KListView() + { +- delete m_delegate; +- delete listmodel; +- delete pUkuiMenuInterface; ++ if (m_delegate) { ++ delete m_delegate; ++ m_delegate = nullptr; ++ } ++ ++ if (m_listmodel) { ++ delete m_listmodel; ++ m_listmodel = nullptr; ++ } + } + + void KListView::addData(QStringList data) + { +- listmodel = new QStandardItemModel(this); +- this->setModel(listmodel); ++ m_listmodel = new QStandardItemModel(this); ++ this->setModel(m_listmodel); + +- Q_FOREACH (QString desktopfp, data) { ++ Q_FOREACH(QString desktopfp, data) { + QStandardItem *item = new QStandardItem; + item->setData(QVariant::fromValue(desktopfp), Qt::DisplayRole); +- listmodel->appendRow(item); ++ m_listmodel->appendRow(item); + } + } + + void KListView::updateData(QStringList data) + { +- listmodel->clear(); ++ m_listmodel->clear(); + +- Q_FOREACH (QString desktopfp, data) { ++ Q_FOREACH(QString desktopfp, data) { + QStandardItem *item = new QStandardItem; + item->setData(QVariant::fromValue(desktopfp), Qt::DisplayRole); +- listmodel->appendRow(item); ++ m_listmodel->appendRow(item); + } + } + + void KListView::onClicked(QModelIndex index) + { +- QVariant var = listmodel->data(index, Qt::DisplayRole); ++ QVariant var = m_listmodel->data(index, Qt::DisplayRole); + if (var.isValid()) { + QString desktopfp = var.value(); + Q_EMIT sendHideMainWindowSignal(); +@@ -70,7 +93,7 @@ void KListView::mouseMoveEvent(QMouseEvent *e) + void KListView::mousePressEvent(QMouseEvent *event) + { + if ((this->indexAt(event->pos()).isValid()) && event->button() == Qt::LeftButton) { +- pressApp = listmodel->data(this->indexAt(event->pos()), Qt::DisplayRole); ++ m_pressApp = m_listmodel->data(this->indexAt(event->pos()), Qt::DisplayRole); + } + return QListView::mousePressEvent(event); + } +@@ -93,7 +116,7 @@ void KListView::rightClickedSlot(const QPoint &pos) + return; + } + +- QVariant var = listmodel->data(index, Qt::DisplayRole); ++ QVariant var = m_listmodel->data(index, Qt::DisplayRole); + QStringList strlist = var.value(); + + if (strlist.count() == 1 || ((strlist.count() == 2) && (strlist.at(1).toInt() == 1))) { +diff --git a/src/UserInterface/ListView/klistview.h b/src/UserInterface/ListView/klistview.h +index 37359b7..503997b 100755 +--- a/src/UserInterface/ListView/klistview.h ++++ b/src/UserInterface/ListView/klistview.h +@@ -1,3 +1,20 @@ ++/* ++ * Copyright (C) 2022, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . ++ */ ++ + #ifndef KLISTVIEW_H + #define KLISTVIEW_H + #include +@@ -15,11 +32,11 @@ public: + void initWidget(); + + KItemDelegate *m_delegate = nullptr; +- QStandardItemModel *listmodel = nullptr; ++ QStandardItemModel *m_listmodel = nullptr; + int module = 0; +- double transparency; +- QVariant pressApp; +- UkuiMenuInterface *pUkuiMenuInterface = nullptr; ++ double m_transparency; ++ QVariant m_pressApp; ++ UkuiMenuInterface *m_ukuiMenuInterface = nullptr; + protected: + void paintEvent(QPaintEvent *e); + void mousePressEvent(QMouseEvent *event); +diff --git a/src/UserInterface/ListView/listview.cpp b/src/UserInterface/ListView/listview.cpp +index ea511c2..f781921 100755 +--- a/src/UserInterface/ListView/listview.cpp ++++ b/src/UserInterface/ListView/listview.cpp +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #include "listview.h" +@@ -30,15 +29,18 @@ ListView::ListView(QWidget *parent/*, int width, int height, int module*/): + this->h = 540; + this->module = 1; + initWidget(); +- listmodel = new QStandardItemModel(this); +- this->setModel(listmodel); +- pUkuiMenuInterface = new UkuiMenuInterface; ++ m_listmodel = new QStandardItemModel(this); ++ this->setModel(m_listmodel); ++ m_ukuiMenuInterface = new UkuiMenuInterface; + this->setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel); + } + + ListView::~ListView() + { +- delete pUkuiMenuInterface; ++ if (m_ukuiMenuInterface) { ++ delete m_ukuiMenuInterface; ++ m_ukuiMenuInterface = nullptr; ++ } + } + + void ListView::initWidget() +@@ -70,12 +72,12 @@ void ListView::initWidget() + void ListView::addData(QVector data, int module) + { + this->module = module; +- listmodel->clear(); ++ m_listmodel->clear(); + +- Q_FOREACH (QStringList desktopfp, data) { ++ Q_FOREACH(QStringList desktopfp, data) { + QStandardItem *item = new QStandardItem; + item->setData(QVariant::fromValue(desktopfp), Qt::DisplayRole); +- listmodel->appendRow(item); ++ m_listmodel->appendRow(item); + } + + m_delegate = new ItemDelegate(this, module); +@@ -84,18 +86,18 @@ void ListView::addData(QVector data, int module) + + void ListView::updateData(QVector data) + { +- listmodel->clear(); ++ m_listmodel->clear(); + +- Q_FOREACH (QStringList desktopfp, data) { ++ Q_FOREACH(QStringList desktopfp, data) { + QStandardItem *item = new QStandardItem; + item->setData(QVariant::fromValue(desktopfp), Qt::DisplayRole); +- listmodel->appendRow(item); ++ m_listmodel->appendRow(item); + } + } + + void ListView::onClicked(QModelIndex index) + { +- QVariant var = listmodel->data(index, Qt::DisplayRole); ++ QVariant var = m_listmodel->data(index, Qt::DisplayRole); + QString desktopfp = var.value().at(0); + + if (var.isValid()) { +diff --git a/src/UserInterface/ListView/listview.h b/src/UserInterface/ListView/listview.h +index 5b14550..ff39d9b 100755 +--- a/src/UserInterface/ListView/listview.h ++++ b/src/UserInterface/ListView/listview.h +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #ifndef LISTVIEW_H +diff --git a/src/UserInterface/ListView/rightlistview.cpp b/src/UserInterface/ListView/rightlistview.cpp +index 5a456bb..4d5b8d5 100755 +--- a/src/UserInterface/ListView/rightlistview.cpp ++++ b/src/UserInterface/ListView/rightlistview.cpp +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #include "rightlistview.h" +@@ -30,12 +29,16 @@ RightListView::RightListView(QWidget *parent): + initWidget(); + m_delegate = new RightItemDelegate(this); + this->setItemDelegate(m_delegate); +- pUkuiMenuInterface = new UkuiMenuInterface; ++ m_ukuiMenuInterface = new UkuiMenuInterface; + } + + RightListView::~RightListView() + { +- delete pUkuiMenuInterface; ++ if (m_ukuiMenuInterface) { ++ delete m_ukuiMenuInterface; ++ m_ukuiMenuInterface = nullptr; ++ } ++ + } + + void RightListView::initWidget() +@@ -69,11 +72,11 @@ void RightListView::dropEvent(QDropEvent *event) + m_dropPos = event->pos(); + + if (this->indexAt(m_dropPos).isValid()) { +- QVariant var = listmodel->data(indexAt(m_dropPos), Qt::DisplayRole); ++ QVariant var = m_listmodel->data(indexAt(m_dropPos), Qt::DisplayRole); + QString desktopfp = var.value(); + QFileInfo fileInfo(desktopfp); + QString desktopfn = fileInfo.fileName(); +- QString dragDesktopfp = pressApp.value(); ++ QString dragDesktopfp = m_pressApp.value(); + QFileInfo dragFileInfo(dragDesktopfp); + QString dragDesktopfn = dragFileInfo.fileName(); + changeCollectSort(dragDesktopfn, desktopfn); +@@ -129,7 +132,7 @@ void RightListView::keyPressEvent(QKeyEvent *e) + + void RightListView::onClicked(QModelIndex index) + { +- QVariant var = listmodel->data(index, Qt::DisplayRole); ++ QVariant var = m_listmodel->data(index, Qt::DisplayRole); + QString desktopfp = var.value().at(0); + if (var.isValid()) { + QString desktopfp = var.value(); +diff --git a/src/UserInterface/ListView/rightlistview.h b/src/UserInterface/ListView/rightlistview.h +index b09c361..0bf0af0 100755 +--- a/src/UserInterface/ListView/rightlistview.h ++++ b/src/UserInterface/ListView/rightlistview.h +@@ -1,3 +1,20 @@ ++/* ++ * Copyright (C) 2022, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . ++ */ ++ + #ifndef RIGHTLISTVIEW_H + #define RIGHTLISTVIEW_H + #include +diff --git a/src/UserInterface/ListView/tabletlistview.cpp b/src/UserInterface/ListView/tabletlistview.cpp +index 6a957f4..3066890 100755 +--- a/src/UserInterface/ListView/tabletlistview.cpp ++++ b/src/UserInterface/ListView/tabletlistview.cpp +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #include "tabletlistview.h" +@@ -150,7 +149,7 @@ void TabletListView::addData(QStringList data) + listmodel = new QStandardItemModel(this); + this->setModel(listmodel); + +- Q_FOREACH (QString desktopfp, data) { ++ Q_FOREACH(QString desktopfp, data) { + QStandardItem *item = new QStandardItem; + item->setData(QVariant::fromValue(desktopfp), Qt::DisplayRole); + bool appDis = appDisable(desktopfp); +@@ -166,7 +165,7 @@ void TabletListView::updateData(QStringList data) + { + listmodel->clear(); + +- Q_FOREACH (QString desktopfp, data) { ++ Q_FOREACH(QString desktopfp, data) { + QStandardItem *p_item = new QStandardItem; + p_item->setData(QVariant::fromValue(desktopfp), Qt::DisplayRole); + bool appDis = appDisable(desktopfp); +@@ -312,15 +311,15 @@ void TabletListView::mousePressEvent(QMouseEvent *event) + //左键 + myDebug() << "左键点击,当前点坐标" << event->pos(); + +- if (((this->indexAt(event->pos()).isValid()) && (m_pageNum == FIRSTPAGE) && (((pressedpos.x() % Style::TabletItemSizeWidthFirst) >= Style::FirstPageSpace) && +- ((pressedpos.x() % Style::TabletItemSizeWidthFirst) <= (Style::FirstPageSpace + Style::AppListIconSize)) && +- ((pressedpos.y() % Style::AppListItemSizeHeight) >= Style::AppTopSpace) && +- ((pressedpos.y() % Style::AppListItemSizeHeight) <= (Style::AppTopSpace + Style::AppListIconSize)))) || ++ if (((this->indexAt(event->pos()).isValid()) && (m_pageNum == FIRSTPAGE) && (((pressedpos.x() % Style::m_tabletItemSizeWidthFirst) >= Style::m_firstPageSpace) && ++ ((pressedpos.x() % Style::m_tabletItemSizeWidthFirst) <= (Style::m_firstPageSpace + Style::m_appListIconSize)) && ++ ((pressedpos.y() % Style::m_appListItemSizeHeight) >= Style::m_appTopSpace) && ++ ((pressedpos.y() % Style::m_appListItemSizeHeight) <= (Style::m_appTopSpace + Style::m_appListIconSize)))) || + ((this->indexAt(event->pos()).isValid()) && (m_pageNum == OTHERPAGE) && +- (pressedpos.x() % Style::TabletItemSizeWidthOther >= Style::OtherPageSpace && +- pressedpos.x() % Style::TabletItemSizeWidthOther <= Style::OtherPageSpace + Style::AppListIconSize && +- pressedpos.y() % Style::AppListItemSizeHeight >= Style::AppTopSpace && +- pressedpos.y() % Style::AppListItemSizeHeight <= Style::AppTopSpace + Style::AppListIconSize))) { ++ (pressedpos.x() % Style::m_tabletItemSizeWidthOther >= Style::m_otherPageSpace && ++ pressedpos.x() % Style::m_tabletItemSizeWidthOther <= Style::m_otherPageSpace + Style::m_appListIconSize && ++ pressedpos.y() % Style::m_appListItemSizeHeight >= Style::m_appTopSpace && ++ pressedpos.y() % Style::m_appListItemSizeHeight <= Style::m_appTopSpace + Style::m_appListIconSize))) { + pressApp = listmodel->data(this->indexAt(pressedpos), Qt::DisplayRole); + iconClick = true; + startPos = event->pos(); +@@ -337,15 +336,15 @@ void TabletListView::mousePressEvent(QMouseEvent *event) + //右键 + myDebug() << "右键点击,当前点坐标" << event->pos(); + +- if (((this->indexAt(event->pos()).isValid()) && (m_pageNum == FIRSTPAGE) && ((pressedpos.x()) % Style::TabletItemSizeWidthFirst >= Style::FirstPageSpace && +- (pressedpos.x()) % Style::TabletItemSizeWidthFirst <= Style::FirstPageSpace + Style::AppListIconSize && +- pressedpos.y() % Style::AppListItemSizeHeight >= Style::AppTopSpace && +- pressedpos.y() % Style::AppListItemSizeHeight <= Style::AppTopSpace + Style::AppListIconSize)) || ++ if (((this->indexAt(event->pos()).isValid()) && (m_pageNum == FIRSTPAGE) && ((pressedpos.x()) % Style::m_tabletItemSizeWidthFirst >= Style::m_firstPageSpace && ++ (pressedpos.x()) % Style::m_tabletItemSizeWidthFirst <= Style::m_firstPageSpace + Style::m_appListIconSize && ++ pressedpos.y() % Style::m_appListItemSizeHeight >= Style::m_appTopSpace && ++ pressedpos.y() % Style::m_appListItemSizeHeight <= Style::m_appTopSpace + Style::m_appListIconSize)) || + ((this->indexAt(event->pos()).isValid()) && (m_pageNum == OTHERPAGE) && +- (pressedpos.x() % Style::TabletItemSizeWidthOther >= Style::OtherPageSpace && +- pressedpos.x() % Style::TabletItemSizeWidthOther <= Style::OtherPageSpace + Style::AppListIconSize && +- pressedpos.y() % Style::AppListItemSizeHeight >= Style::AppTopSpace && +- pressedpos.y() % Style::AppListItemSizeHeight <= Style::AppTopSpace + Style::AppListIconSize))) { ++ (pressedpos.x() % Style::m_tabletItemSizeWidthOther >= Style::m_otherPageSpace && ++ pressedpos.x() % Style::m_tabletItemSizeWidthOther <= Style::m_otherPageSpace + Style::m_appListIconSize && ++ pressedpos.y() % Style::m_appListItemSizeHeight >= Style::m_appTopSpace && ++ pressedpos.y() % Style::m_appListItemSizeHeight <= Style::m_appTopSpace + Style::m_appListIconSize))) { + pressApp = listmodel->data(this->indexAt(pressedpos), Qt::DisplayRole); + right_iconClick = true; + right_pressedpos = pressedpos; +@@ -362,6 +361,7 @@ void TabletListView::mousePressEvent(QMouseEvent *event) + + void TabletListView::mouseMoveEvent(QMouseEvent *event) + { ++ myDebug(); + if (event->buttons() & Qt::LeftButton & this->indexAt(event->pos()).isValid()) { + if (iconClick) { + if ((event->pos() - startPos).manhattanLength() >= QApplication::startDragDistance()) { +@@ -408,17 +408,17 @@ void TabletListView::dragMoveEvent(QDragMoveEvent *event) + m_time->start(500); + + if (m_pageNum == OTHERPAGE) { +- if (event->pos().x() >= (Style::OtherPageViewWidth - (Style::OtherPageSpace / 2)) || event->pos().x() <= (Style::OtherPageSpace / 2)) { +- if (event->pos().x() <= (Style::OtherPageSpace / 2)) { ++ if (event->pos().x() >= (Style::m_otherPageViewWidth - (Style::m_otherPageSpace / 2)) || event->pos().x() <= (Style::m_otherPageSpace / 2)) { ++ if (event->pos().x() <= (Style::m_otherPageSpace / 2)) { + Q_EMIT pagenumchanged(false); + } + +- if (event->pos().x() >= (Style::OtherPageViewWidth - (Style::OtherPageSpace / 2))) { ++ if (event->pos().x() >= (Style::m_otherPageViewWidth - (Style::m_otherPageSpace / 2))) { + Q_EMIT pagenumchanged(true); + } + } + } else { +- if (event->pos().x() >= (Style::FirsPageViewWidth - (Style::FirstPageSpace / 2))) { ++ if (event->pos().x() >= (Style::m_firsPageViewWidth - (Style::m_firstPageSpace / 2))) { + Q_EMIT pagenumchanged(true); + } + } +@@ -429,12 +429,14 @@ void TabletListView::dragMoveEvent(QDragMoveEvent *event) + + void TabletListView::dragEnterEvent(QDragEnterEvent *event) + { ++ myDebug(); + iconClick = true; + event->accept(); + } + + void TabletListView::dropEvent(QDropEvent *event) + { ++ myDebug(); + dropPos = event->pos(); + pressDesktopfp = (QString)event->mimeData()->data("INFO"); + insertApplication(startPos, dropPos); +@@ -442,6 +444,7 @@ void TabletListView::dropEvent(QDropEvent *event) + } + void TabletListView::mouseReleaseEvent(QMouseEvent *e) + { ++ myDebug(); + releasepos = e->pos();//释放的位置坐标 + + if (iconClick) { +@@ -503,9 +506,9 @@ void TabletListView::insertApplication(QPoint pressedpos, QPoint releasepos) + QString desktopfn2 = fileInfo2.fileName(); + + if (m_pageNum == FIRSTPAGE) { +- releasepos.setX(releasepos.x() + Style::OtherPageSpace); ++ releasepos.setX(releasepos.x() + Style::m_otherPageSpace); + } else { +- releasepos.setX(releasepos.x() + Style::FirstPageSpace); ++ releasepos.setX(releasepos.x() + Style::m_firstPageSpace); + } + + QVariant var3 = listmodel->data(this->indexAt(releasepos), Qt::DisplayRole);//释放位置右侧有应用 +@@ -514,9 +517,9 @@ void TabletListView::insertApplication(QPoint pressedpos, QPoint releasepos) + QString desktopfn3 = fileInfo3.fileName(); + + if (m_pageNum == FIRSTPAGE) { +- releasepos.setX(releasepos.x() - (Style::OtherPageSpace * 2)); ++ releasepos.setX(releasepos.x() - (Style::m_otherPageSpace * 2)); + } else { +- releasepos.setX(releasepos.x() - (Style::FirstPageSpace * 2)); ++ releasepos.setX(releasepos.x() - (Style::m_firstPageSpace * 2)); + } + + QVariant var4 = listmodel->data(this->indexAt(releasepos), Qt::DisplayRole);//右侧没有左侧有 +@@ -620,22 +623,22 @@ void TabletListView::insertApplication(QPoint pressedpos, QPoint releasepos) + QFileInfo fileInfo2(pressDesktopfp); + QString desktopfn2 = fileInfo2.fileName(); + +- if (((this->indexAt(releasepos).isValid()) && (m_pageNum == FIRSTPAGE) && ((releasepos.x()) % Style::TabletItemSizeWidthFirst >= Style::FirstPageSpace && +- (releasepos.x()) % Style::TabletItemSizeWidthFirst <= Style::FirstPageSpace + Style::AppListIconSize && +- releasepos.y() % Style::AppListItemSizeHeight >= Style::AppTopSpace && +- releasepos.y() % Style::AppListItemSizeHeight <= Style::AppTopSpace + Style::AppListIconSize)) || ++ if (((this->indexAt(releasepos).isValid()) && (m_pageNum == FIRSTPAGE) && ((releasepos.x()) % Style::m_tabletItemSizeWidthFirst >= Style::m_firstPageSpace && ++ (releasepos.x()) % Style::m_tabletItemSizeWidthFirst <= Style::m_firstPageSpace + Style::m_appListIconSize && ++ releasepos.y() % Style::m_appListItemSizeHeight >= Style::m_appTopSpace && ++ releasepos.y() % Style::m_appListItemSizeHeight <= Style::m_appTopSpace + Style::m_appListIconSize)) || + ((this->indexAt(releasepos).isValid()) && (m_pageNum == OTHERPAGE) && +- (releasepos.x() % Style::TabletItemSizeWidthOther >= Style::OtherPageSpace && +- releasepos.x() % Style::TabletItemSizeWidthOther <= Style::OtherPageSpace + Style::AppListIconSize && +- releasepos.y() % Style::AppListItemSizeHeight >= Style::AppTopSpace && +- releasepos.y() % Style::AppListItemSizeHeight <= Style::AppTopSpace + Style::AppListIconSize))) { ++ (releasepos.x() % Style::m_tabletItemSizeWidthOther >= Style::m_otherPageSpace && ++ releasepos.x() % Style::m_tabletItemSizeWidthOther <= Style::m_otherPageSpace + Style::m_appListIconSize && ++ releasepos.y() % Style::m_appListItemSizeHeight >= Style::m_appTopSpace && ++ releasepos.y() % Style::m_appListItemSizeHeight <= Style::m_appTopSpace + Style::m_appListIconSize))) { + return; + } + + if (m_pageNum == FIRSTPAGE) { +- releasepos.setX(releasepos.x() + Style::FirstPageSpace); ++ releasepos.setX(releasepos.x() + Style::m_firstPageSpace); + } else { +- releasepos.setX(releasepos.x() + Style::OtherPageSpace); ++ releasepos.setX(releasepos.x() + Style::m_otherPageSpace); + } + + QVariant var3 = listmodel->data(this->indexAt(releasepos), Qt::DisplayRole);//释放位置右侧有应用 +@@ -644,9 +647,9 @@ void TabletListView::insertApplication(QPoint pressedpos, QPoint releasepos) + QString desktopfn3 = fileInfo3.fileName(); + + if (m_pageNum == FIRSTPAGE) { +- releasepos.setX(releasepos.x() - Style::FirstPageSpace * 2); ++ releasepos.setX(releasepos.x() - Style::m_firstPageSpace * 2); + } else { +- releasepos.setX(releasepos.x() - Style::OtherPageSpace * 2); ++ releasepos.setX(releasepos.x() - Style::m_otherPageSpace * 2); + } + + QVariant var4 = listmodel->data(this->indexAt(releasepos), Qt::DisplayRole);//右侧没有左侧有 +diff --git a/src/UserInterface/ListView/tabletlistview.h b/src/UserInterface/ListView/tabletlistview.h +index 5980d2c..5c2e831 100755 +--- a/src/UserInterface/ListView/tabletlistview.h ++++ b/src/UserInterface/ListView/tabletlistview.h +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #ifndef TABLETLISTVIEW_H +diff --git a/src/UserInterface/Other/classify_btn_scrollarea.cpp b/src/UserInterface/Other/classify_btn_scrollarea.cpp +index 95c2619..b8eaadb 100755 +--- a/src/UserInterface/Other/classify_btn_scrollarea.cpp ++++ b/src/UserInterface/Other/classify_btn_scrollarea.cpp +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #include "classify_btn_scrollarea.h" +diff --git a/src/UserInterface/Other/classify_btn_scrollarea.h b/src/UserInterface/Other/classify_btn_scrollarea.h +index 743c8d1..ecb4967 100755 +--- a/src/UserInterface/Other/classify_btn_scrollarea.h ++++ b/src/UserInterface/Other/classify_btn_scrollarea.h +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #ifndef CLASSIFYSCROLLAREA_H +diff --git a/src/UserInterface/Other/lettertooltip.cpp b/src/UserInterface/Other/lettertooltip.cpp +index 176b48b..030e544 100755 +--- a/src/UserInterface/Other/lettertooltip.cpp ++++ b/src/UserInterface/Other/lettertooltip.cpp +@@ -1,3 +1,20 @@ ++/* ++ * Copyright (C) 2022, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . ++ */ ++ + #include "lettertooltip.h" + #include + #include +diff --git a/src/UserInterface/Other/lettertooltip.h b/src/UserInterface/Other/lettertooltip.h +index 4f64e0a..81c0411 100755 +--- a/src/UserInterface/Other/lettertooltip.h ++++ b/src/UserInterface/Other/lettertooltip.h +@@ -1,3 +1,20 @@ ++/* ++ * Copyright (C) 2022, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . ++ */ ++ + #ifndef LETTERTOOLTIP_H + #define LETTERTOOLTIP_H + #include +diff --git a/src/UserInterface/Other/rotationlabel.cpp b/src/UserInterface/Other/rotationlabel.cpp +index 0c08e2e..7badedb 100644 +--- a/src/UserInterface/Other/rotationlabel.cpp ++++ b/src/UserInterface/Other/rotationlabel.cpp +@@ -1,6 +1,24 @@ ++/* ++ * Copyright (C) 2022, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . ++ */ ++ + #include "rotationlabel.h" + #include + #include ++#include "utility.h" + + RotationLabel::RotationLabel(QWidget *parent) + : QLabel(parent) +@@ -32,6 +50,11 @@ void RotationLabel::paintEvent(QPaintEvent *event) + return QLabel::paintEvent(event); + } + ++void RotationLabel::mouseReleaseEvent(QMouseEvent *ev) ++{ ++ Q_UNUSED(ev); ++} ++ + void RotationLabel::setIcon(const QPixmap &pixmap) + { + m_pixmap = pixmap; +diff --git a/src/UserInterface/Other/rotationlabel.h b/src/UserInterface/Other/rotationlabel.h +index f99cdbb..65a7c3b 100644 +--- a/src/UserInterface/Other/rotationlabel.h ++++ b/src/UserInterface/Other/rotationlabel.h +@@ -1,3 +1,20 @@ ++/* ++ * Copyright (C) 2022, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . ++ */ ++ + #ifndef ROTATIONLABEL_H + #define ROTATIONLABEL_H + #include +@@ -13,6 +30,7 @@ protected: + int rotation(); + void setRotation(int rot); + void paintEvent(QPaintEvent *event); ++ void mouseReleaseEvent(QMouseEvent *ev); + private: + int m_rotation = 0; + QPixmap m_pixmap; +diff --git a/src/UserInterface/Other/scrollarea.cpp b/src/UserInterface/Other/scrollarea.cpp +index 2bb4d2d..c8592ab 100755 +--- a/src/UserInterface/Other/scrollarea.cpp ++++ b/src/UserInterface/Other/scrollarea.cpp +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #include "scrollarea.h" +diff --git a/src/UserInterface/Other/scrollarea.h b/src/UserInterface/Other/scrollarea.h +index 96a5f57..c8d8d80 100755 +--- a/src/UserInterface/Other/scrollarea.h ++++ b/src/UserInterface/Other/scrollarea.h +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #ifndef SCROLLAREA_H +diff --git a/src/UserInterface/RightClickMenu/menubox.cpp b/src/UserInterface/RightClickMenu/menubox.cpp +index c6f9729..ef40c1d 100755 +--- a/src/UserInterface/RightClickMenu/menubox.cpp ++++ b/src/UserInterface/RightClickMenu/menubox.cpp +@@ -1,3 +1,20 @@ ++/* ++ * Copyright (C) 2022, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . ++ */ ++ + #include "menubox.h" + #include + #include +diff --git a/src/UserInterface/RightClickMenu/menubox.h b/src/UserInterface/RightClickMenu/menubox.h +index ea48961..b6184ec 100755 +--- a/src/UserInterface/RightClickMenu/menubox.h ++++ b/src/UserInterface/RightClickMenu/menubox.h +@@ -1,3 +1,20 @@ ++/* ++ * Copyright (C) 2022, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . ++ */ ++ + #ifndef MENUBOX_H + #define MENUBOX_H + #include +diff --git a/src/UserInterface/RightClickMenu/rightclickmenu.cpp b/src/UserInterface/RightClickMenu/rightclickmenu.cpp +index f274607..de3cc85 100755 +--- a/src/UserInterface/RightClickMenu/rightclickmenu.cpp ++++ b/src/UserInterface/RightClickMenu/rightclickmenu.cpp +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #include "rightclickmenu.h" +@@ -47,8 +46,15 @@ RightClickMenu::RightClickMenu(QWidget *parent): + + RightClickMenu::~RightClickMenu() + { +- delete m_cmdProc; +- delete m_ukuiMenuInterface; ++ if (m_cmdProc) { ++ delete m_cmdProc; ++ m_cmdProc = nullptr; ++ } ++ ++ if (m_ukuiMenuInterface) { ++ delete m_ukuiMenuInterface; ++ m_ukuiMenuInterface = nullptr; ++ } + } + + QPixmap RightClickMenu::getIconPixmap(QString iconstr, int type) +@@ -101,6 +107,36 @@ void RightClickMenu::removeFromCollectionActionTriggerSlot() + m_actionNumber = 18; + } + ++bool RightClickMenu::hasMultipleUsers() ++{ ++ QDBusInterface interface("org.freedesktop.Accounts", ++ "/org/freedesktop/Accounts", ++ "org.freedesktop.DBus.Properties", ++ QDBusConnection::systemBus()); ++ if (!interface.isValid()) { ++ qCritical() << QDBusConnection::systemBus().lastError().message(); ++ return false; ++ } ++ ++ QDBusReply reply = interface.call("Get","org.freedesktop.Accounts","HasMultipleUsers"); ++ return reply.value().toBool(); ++} ++ ++bool RightClickMenu::canSwitch() ++{ ++ QDBusInterface interface("org.freedesktop.DisplayManager", ++ "/org/freedesktop/DisplayManager/Seat0", ++ "org.freedesktop.DBus.Properties", ++ QDBusConnection::systemBus()); ++ if (!interface.isValid()) { ++ qCritical() << QDBusConnection::systemBus().lastError().message(); ++ return false; ++ } else { ++ QDBusReply reply = interface.call("Get","org.freedesktop.DisplayManager.Seat","CanSwitch"); ++ return reply.value().toBool(); ++ } ++} ++ + void RightClickMenu::fixToTaskbarActionTriggerSlot() + { + QDBusInterface iface("com.ukui.panel.desktop", +@@ -265,26 +301,26 @@ int RightClickMenu::showShutdownMenu(const QPoint &pos, const bool &isFullWind) + { + m_actionNumber = 0; + MenuBox m_showShutMenu; ++ QDBusReply reply; + connect(&m_showShutMenu, &MenuBox::sendMainWinActiveSignal, this, &RightClickMenu::sendMainWinActiveSignal); + QDBusInterface iface(DBUS_SESSION_NAME, DBUS_SESSION_PATH, + DBUS_SESSION_INTERFACE, QDBusConnection::sessionBus()); +- QDBusReply reply = iface.call("canSwitch"); + +- if (reply.isValid() && reply.value() == true) { ++ if (canSwitch() && hasMultipleUsers()) { + m_showShutMenu.addAction(QIcon(getIconPixmap("stock-people-symbolic", 1)), tr("Switch user"), + this, SLOT(switchUserActionTriggerSlot())); + } + + reply = iface.call("canHibernate"); + +- if (reply.isValid() && reply.value() == true) { ++ if (reply.isValid() && reply.value()) { + m_showShutMenu.addAction(QIcon(getIconPixmap("kylin-sleep-symbolic", 1)), tr("Hibernate"), + this, SLOT(hibernateActionTriggerSlot())); + } + + reply = iface.call("canSuspend"); + +- if (reply.isValid() && reply.value() == true) { ++ if (reply.isValid() && reply.value()) { + m_showShutMenu.addAction(QIcon(getIconPixmap("kylin-hebernate-symbolic", 1)), tr("Sleep"), + this, SLOT(sleepActionTriggerSlot())); + } +@@ -293,21 +329,21 @@ int RightClickMenu::showShutdownMenu(const QPoint &pos, const bool &isFullWind) + this, SLOT(lockScreenActionTriggerSlot())); + reply = iface.call("canLogout"); + +- if (reply.isValid() && reply.value() == true) { ++ if (reply.isValid() && reply.value()) { + m_showShutMenu.addAction(QIcon(getIconPixmap("system-logout-symbolic", 1)), tr("Log Out"), + this, SLOT(logoutActionTriggerSlot())); + } + + reply = iface.call("canReboot"); + +- if (reply.isValid() && reply.value() == true) { ++ if (reply.isValid() && reply.value()) { + m_showShutMenu.addAction(QIcon(getIconPixmap("system-restart-symbolic", 1)), tr("Restart"), + this, SLOT(rebootActionTriggerSlot())); + } + + reply = iface.call("canPowerOff"); + +- if (reply.isValid() && reply.value() == true) { ++ if (reply.isValid() && reply.value()) { + m_showShutMenu.addAction(QIcon(getIconPixmap("exit-symbolic", 1)), tr("Power Off"), + this, SLOT(shutdownActionTriggerSlot())); + } +diff --git a/src/UserInterface/RightClickMenu/rightclickmenu.h b/src/UserInterface/RightClickMenu/rightclickmenu.h +index 4075294..573b08e 100755 +--- a/src/UserInterface/RightClickMenu/rightclickmenu.h ++++ b/src/UserInterface/RightClickMenu/rightclickmenu.h +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #ifndef RIGHTCLICKMENU_H +@@ -78,7 +77,6 @@ private: + int m_actionNumber; + QProcess *m_cmdProc = nullptr; + UkuiMenuInterface *m_ukuiMenuInterface = nullptr; +- + QStringList m_whiteList; + + protected: +@@ -92,6 +90,10 @@ protected: + */ + QPixmap getIconPixmap(QString iconstr, int type); + ++ bool hasMultipleUsers(); ++ ++ bool canSwitch(); ++ + private Q_SLOTS: + /** + * @brief Fixed to all software +diff --git a/src/UserInterface/RightClickMenu/tabletrightclickmenu.cpp b/src/UserInterface/RightClickMenu/tabletrightclickmenu.cpp +index 0143c32..d559941 100755 +--- a/src/UserInterface/RightClickMenu/tabletrightclickmenu.cpp ++++ b/src/UserInterface/RightClickMenu/tabletrightclickmenu.cpp +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #include "tabletrightclickmenu.h" +@@ -119,7 +118,7 @@ void TabletRightClickMenu::unfixedFromAllActionTriggerSlot() + QString desktopfn = fileInfo.fileName(); + m_setting->beginGroup("lockapplication"); + +- Q_FOREACH (QString desktop, m_setting->allKeys()) { ++ Q_FOREACH(QString desktop, m_setting->allKeys()) { + if (m_setting->value(desktop).toInt() > m_setting->value(desktopfn).toInt()) { + m_setting->setValue(desktop, m_setting->value(desktop).toInt() - 1); + } +diff --git a/src/UserInterface/RightClickMenu/tabletrightclickmenu.h b/src/UserInterface/RightClickMenu/tabletrightclickmenu.h +index a91451c..a4a8c8e 100755 +--- a/src/UserInterface/RightClickMenu/tabletrightclickmenu.h ++++ b/src/UserInterface/RightClickMenu/tabletrightclickmenu.h +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #ifndef TABLETRIGHTCLICKMENU_H +diff --git a/src/UserInterface/ViewItem/full_item_delegate.cpp b/src/UserInterface/ViewItem/full_item_delegate.cpp +index 5e5c358..a09c72a 100755 +--- a/src/UserInterface/ViewItem/full_item_delegate.cpp ++++ b/src/UserInterface/ViewItem/full_item_delegate.cpp +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #include "full_item_delegate.h" +@@ -24,12 +23,15 @@ FullItemDelegate::FullItemDelegate(QObject *parent, int module): + KItemDelegate(parent) + { + this->module = module; +- pUkuiMenuInterface = new UkuiMenuInterface; ++ m_ukuiMenuInterface = new UkuiMenuInterface; + } + + FullItemDelegate::~FullItemDelegate() + { +- delete pUkuiMenuInterface; ++ if (m_ukuiMenuInterface) { ++ delete m_ukuiMenuInterface; ++ m_ukuiMenuInterface = nullptr; ++ } + } + + void FullItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const +@@ -69,7 +71,7 @@ void FullItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opti + painter->save(); + painter->setOpacity(1); + QString desktopfp = index.data(Qt::DisplayRole).value(); +- QString iconstr = pUkuiMenuInterface->getAppIcon(desktopfp); ++ QString iconstr = m_ukuiMenuInterface->getAppIcon(desktopfp); + QIcon icon; + QFileInfo iconFileInfo(iconstr); + +@@ -115,13 +117,13 @@ void FullItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opti + } + } + +- QString appname = pUkuiMenuInterface->getAppName(desktopfp); ++ QString appname = m_ukuiMenuInterface->getAppName(desktopfp); + QRect iconRect; + QRect textRect; +- iconRect = QRect(rect.x() + (rect.width() - Style::AppListIconSize) / 2, +- rect.y() + 20, +- Style::AppListIconSize, +- Style::AppListIconSize); ++ iconRect = QRect(rect.x() + (rect.width() - Style::m_appListIconSize) / 2, ++ rect.y() + Style::m_appTopSpace, ++ Style::m_appListIconSize, ++ Style::m_appListIconSize); + icon.paint(painter, iconRect); + painter->restore(); + painter->save(); +@@ -140,9 +142,9 @@ void FullItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opti + + painter->restore(); + textRect = QRect(rect.x() + 5, +- iconRect.bottom() + Style::AppSpaceBetweenIconText, ++ iconRect.bottom() + Style::m_appSpaceBetweenIconText, + rect.width() - 10, +- rect.height() - iconRect.height() - Style::AppSpaceBetweenIconText); ++ Style::m_appTextRectHeight); + painter->save(); + //添加最近安装蓝色标签 + bool is_recentapp = false; +@@ -153,9 +155,9 @@ void FullItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opti + is_recentapp = true; + appnameElidedText = fm.elidedText(appname, Qt::ElideRight, rect.width() - 23, Qt::TextShowMnemonic); + textRect = QRect(rect.x() + 18, +- iconRect.bottom() + Style::AppSpaceBetweenIconText, ++ iconRect.bottom() + Style::m_appSpaceBetweenIconText, + rect.width() - 23, +- rect.height() - iconRect.height() - Style::AppSpaceBetweenIconText); ++ Style::m_appTextRectHeight); + painter->setPen(QPen(Qt::NoPen)); + painter->setBrush(QColor("#4d94ff")); + int x = 0; +@@ -217,5 +219,5 @@ void FullItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opti + + QSize FullItemDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const + { +- return QSize(Style::AppListItemSizeWidth, Style::AppListItemSizeWidth); ++ return QSize(Style::m_appListItemSizeWidth, Style::m_appListItemSizeWidth); + } +diff --git a/src/UserInterface/ViewItem/full_item_delegate.h b/src/UserInterface/ViewItem/full_item_delegate.h +index 601939e..acc384d 100755 +--- a/src/UserInterface/ViewItem/full_item_delegate.h ++++ b/src/UserInterface/ViewItem/full_item_delegate.h +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #ifndef FULLITEMDELEGATE_H +diff --git a/src/UserInterface/ViewItem/itemdelegate.cpp b/src/UserInterface/ViewItem/itemdelegate.cpp +index 7effecd..ba41cc7 100755 +--- a/src/UserInterface/ViewItem/itemdelegate.cpp ++++ b/src/UserInterface/ViewItem/itemdelegate.cpp +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #include "itemdelegate.h" +@@ -26,12 +25,15 @@ ItemDelegate::ItemDelegate(QObject *parent, int module): + KItemDelegate(parent) + { + this->module = module; +- pUkuiMenuInterface = new UkuiMenuInterface; ++ m_ukuiMenuInterface = new UkuiMenuInterface; + } + + ItemDelegate::~ItemDelegate() + { +- delete pUkuiMenuInterface; ++ if (m_ukuiMenuInterface) { ++ delete m_ukuiMenuInterface; ++ m_ukuiMenuInterface = nullptr; ++ } + } + + void ItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const +@@ -86,7 +88,7 @@ void ItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, + if (module > 0) { + if (strlist.at(1).toInt() == 1) { + QRect iconRect = QRect(rect.x() + 11, rect.y() + (rect.height() - 32) / 2, 32, 32); +- QString iconstr = pUkuiMenuInterface->getAppIcon(strlist.at(0)); ++ QString iconstr = m_ukuiMenuInterface->getAppIcon(strlist.at(0)); + QIcon icon; + QFileInfo iconFileInfo(iconstr); + +@@ -130,7 +132,7 @@ void ItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, + + painter->save(); + icon.paint(painter, iconRect, Qt::AlignCenter); +- QString appname = pUkuiMenuInterface->getAppName(strlist.at(0)); ++ QString appname = m_ukuiMenuInterface->getAppName(strlist.at(0)); + QFontMetrics fm = painter->fontMetrics(); + QString appnameElidedText = fm.elidedText(appname, Qt::ElideRight, rect.width() - 62, Qt::TextShowMnemonic); + painter->drawText(QRect(iconRect.right() + 15, rect.y(), +@@ -155,7 +157,7 @@ void ItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, + if (option.state & QStyle::State_MouseOver) { + QToolTip::showText(QCursor::pos(), appname); + } else { +- QToolTip::showText(option.widget->mapToGlobal(QPoint(rect.bottomRight().x(), rect.center().y())), appname); ++ QToolTip::showText(option.widget->mapToGlobal(QPoint(rect.bottomRight().x(), rect.bottom())), appname); + } + } else { + QToolTip::hideText(); +@@ -227,6 +229,7 @@ void ItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, + + icon.paint(painter, iconRect, Qt::AlignCenter); + QString appname = strlist.at(1); ++ QString url = QUrl(strlist.at(0)).path().remove(appname); + painter->setOpacity(1); + painter->save(); + painter->setPen(QPen(option.palette.text().color())); +@@ -239,21 +242,21 @@ 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(), "为了刷新"); + int len = fm.boundingRect(appname).width(); +- ++ //富文本,tooltip可自动换行 ++ QString tipString = QString(""); + if (len > rect.width() - 64) { +- if (option.state & QStyle::State_MouseOver) { +- QToolTip::showText(QCursor::pos(), appname); +- } else { +- QToolTip::showText(option.widget->mapToGlobal(QPoint(rect.bottomRight().x(), rect.center().y())), appname); +- } ++ tipString += appname +"
"+ tr("path:") + url; + } else { +- QToolTip::hideText(); ++ tipString += tr("path:") + url; + } ++ tipString += QString("
"); ++ QToolTip::showText(option.widget->mapToGlobal(QPoint(rect.right() + 20, rect.center().y())), tipString); + } + } else { + QRect iconRect = QRect(rect.left() + 11, rect.y() + (rect.height() - 32) / 2, 32, 32); +- QString iconstr = pUkuiMenuInterface->getAppIcon(strlist.at(0)); ++ QString iconstr = m_ukuiMenuInterface->getAppIcon(strlist.at(0)); + QIcon icon; + QFileInfo iconFileInfo(iconstr); + +@@ -296,7 +299,7 @@ void ItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, + } + + icon.paint(painter, iconRect, Qt::AlignCenter); +- QString appname = pUkuiMenuInterface->getAppName(strlist.at(0)); ++ QString appname = m_ukuiMenuInterface->getAppName(strlist.at(0)); + QFileInfo fileInfo(strlist.at(0)); + QString desktopfn = fileInfo.fileName(); + +diff --git a/src/UserInterface/ViewItem/itemdelegate.h b/src/UserInterface/ViewItem/itemdelegate.h +index a57708e..a364527 100755 +--- a/src/UserInterface/ViewItem/itemdelegate.h ++++ b/src/UserInterface/ViewItem/itemdelegate.h +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #ifndef ITEMDELEGATE_H +diff --git a/src/UserInterface/ViewItem/kitemdelegate.cpp b/src/UserInterface/ViewItem/kitemdelegate.cpp +index 540536e..ab3edb7 100755 +--- a/src/UserInterface/ViewItem/kitemdelegate.cpp ++++ b/src/UserInterface/ViewItem/kitemdelegate.cpp +@@ -1,6 +1,27 @@ ++/* ++ * Copyright (C) 2022, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . ++ */ ++ + #include "kitemdelegate.h" + + KItemDelegate::KItemDelegate(QObject *parent): + QStyledItemDelegate(parent) + { + } ++ ++KItemDelegate::~KItemDelegate() ++{ ++} +diff --git a/src/UserInterface/ViewItem/kitemdelegate.h b/src/UserInterface/ViewItem/kitemdelegate.h +index 5145b78..e85e277 100755 +--- a/src/UserInterface/ViewItem/kitemdelegate.h ++++ b/src/UserInterface/ViewItem/kitemdelegate.h +@@ -1,3 +1,20 @@ ++/* ++ * Copyright (C) 2022, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . ++ */ ++ + #ifndef KITEMDELEGATE_H + #define KITEMDELEGATE_H + #include +@@ -8,9 +25,10 @@ class KItemDelegate : public QStyledItemDelegate + Q_OBJECT + public: + KItemDelegate(QObject *parent); ++ ~KItemDelegate(); + + int module = 0; +- UkuiMenuInterface *pUkuiMenuInterface = nullptr; ++ UkuiMenuInterface *m_ukuiMenuInterface = nullptr; + }; + + #endif // KITEMDELEGATE_H +diff --git a/src/UserInterface/ViewItem/recent_item_delegate.cpp b/src/UserInterface/ViewItem/recent_item_delegate.cpp +index db471cf..fb38efd 100755 +--- a/src/UserInterface/ViewItem/recent_item_delegate.cpp ++++ b/src/UserInterface/ViewItem/recent_item_delegate.cpp +@@ -1,18 +1,38 @@ ++/* ++ * Copyright (C) 2022, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . ++ */ ++ + #include "recent_item_delegate.h" + +-recentitemdelegate::recentitemdelegate(QObject *parent, int module): ++RecentItemDelegate::RecentItemDelegate(QObject *parent, int module): + KItemDelegate(parent) + { + this->module = module; +- pUkuiMenuInterface = new UkuiMenuInterface; ++ m_ukuiMenuInterface = new UkuiMenuInterface; + } + +-recentitemdelegate::~recentitemdelegate() ++RecentItemDelegate::~RecentItemDelegate() + { +- delete pUkuiMenuInterface; ++ if (m_ukuiMenuInterface) { ++ delete m_ukuiMenuInterface; ++ m_ukuiMenuInterface = nullptr; ++ } + } + +-void recentitemdelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const ++void RecentItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const + { + if (index.isValid()) { + // QStyleOptionViewItem viewOption(option);//用来在视图中画一个item +@@ -130,7 +150,7 @@ void recentitemdelegate::paint(QPainter *painter, const QStyleOptionViewItem &op + } + } else { + QRect iconRect = QRect(rect.left() + 11, rect.y() + (rect.height() - 32) / 2, 32, 32); +- QString iconstr = pUkuiMenuInterface->getAppIcon(strlist.at(0)); ++ QString iconstr = m_ukuiMenuInterface->getAppIcon(strlist.at(0)); + QIcon icon; + QFileInfo iconFileInfo(iconstr); + +@@ -173,7 +193,7 @@ void recentitemdelegate::paint(QPainter *painter, const QStyleOptionViewItem &op + } + + icon.paint(painter, iconRect, Qt::AlignCenter); +- QString appname = pUkuiMenuInterface->getAppName(strlist.at(0)); ++ QString appname = m_ukuiMenuInterface->getAppName(strlist.at(0)); + QFileInfo fileInfo(strlist.at(0)); + QString desktopfn = fileInfo.fileName(); + +@@ -219,7 +239,7 @@ void recentitemdelegate::paint(QPainter *painter, const QStyleOptionViewItem &op + } + } + +-QSize recentitemdelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const ++QSize RecentItemDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const + { + // QStringList strlist=index.model()->data(index,Qt::DisplayRole).toStringList(); + // if(strlist.at(1).toInt()==1) +diff --git a/src/UserInterface/ViewItem/recent_item_delegate.h b/src/UserInterface/ViewItem/recent_item_delegate.h +index a613d90..e30fd84 100755 +--- a/src/UserInterface/ViewItem/recent_item_delegate.h ++++ b/src/UserInterface/ViewItem/recent_item_delegate.h +@@ -1,3 +1,20 @@ ++/* ++ * Copyright (C) 2022, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . ++ */ ++ + #ifndef RECENTITEMDELEGATE_H + #define RECENTITEMDELEGATE_H + #include "itemdelegate.h" +@@ -8,15 +25,15 @@ + #include "src/UtilityFunction/utility.h" + #include "kitemdelegate.h" + +-class recentitemdelegate : public KItemDelegate ++class RecentItemDelegate : public KItemDelegate + { + Q_OBJECT + public: + /** + * @param module为0时为常用模块,1为字母模块、2为功能模块、3为搜索模块 + */ +- recentitemdelegate(QObject *parent, int module); +- ~recentitemdelegate(); ++ RecentItemDelegate(QObject *parent, int module); ++ ~RecentItemDelegate(); + void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const; + QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const; + }; +diff --git a/src/UserInterface/ViewItem/right_item_delegate.cpp b/src/UserInterface/ViewItem/right_item_delegate.cpp +index b50de3d..f3ec2ef 100755 +--- a/src/UserInterface/ViewItem/right_item_delegate.cpp ++++ b/src/UserInterface/ViewItem/right_item_delegate.cpp +@@ -1,3 +1,20 @@ ++/* ++ * Copyright (C) 2022, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . ++ */ ++ + #include "right_item_delegate.h" + #include "utility.h" + #include +@@ -5,12 +22,15 @@ + RightItemDelegate::RightItemDelegate(QObject *parent): + KItemDelegate(parent) + { +- pUkuiMenuInterface = new UkuiMenuInterface; ++ m_ukuiMenuInterface = new UkuiMenuInterface; + } + + RightItemDelegate::~RightItemDelegate() + { +- delete pUkuiMenuInterface; ++ if (m_ukuiMenuInterface) { ++ delete m_ukuiMenuInterface; ++ m_ukuiMenuInterface = nullptr; ++ } + } + + void RightItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const +@@ -65,7 +85,7 @@ void RightItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opt + painter->save(); + painter->setOpacity(1); + QString desktopfp = index.data(Qt::DisplayRole).value(); +- QString iconstr = pUkuiMenuInterface->getAppIcon(desktopfp); ++ QString iconstr = m_ukuiMenuInterface->getAppIcon(desktopfp); + QIcon icon; + QFileInfo iconFileInfo(iconstr); + +@@ -111,7 +131,7 @@ void RightItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opt + } + } + +- QString appname = pUkuiMenuInterface->getAppName(desktopfp); ++ QString appname = m_ukuiMenuInterface->getAppName(desktopfp); + QRect iconRect; + QRect textRect; + iconRect = QRect(rect.x() + 28, +@@ -139,9 +159,9 @@ void RightItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opt + is_recentapp = true; + appnameElidedText = fm.elidedText(appname, Qt::ElideRight, rect.width() - 23, Qt::TextShowMnemonic); + textRect = QRect(rect.x() + 18, +- iconRect.bottom() + Style::AppSpaceBetweenIconText, ++ iconRect.bottom() + Style::m_appSpaceBetweenIconText, + rect.width() - 23, +- rect.height() - iconRect.height() - Style::AppSpaceBetweenIconText); ++ rect.height() - iconRect.height() - Style::m_appSpaceBetweenIconText); + painter->setPen(QPen(Qt::NoPen)); + painter->setBrush(QColor("#4d94ff")); + int x = 0; +diff --git a/src/UserInterface/ViewItem/right_item_delegate.h b/src/UserInterface/ViewItem/right_item_delegate.h +index ee62ed6..0d70f02 100755 +--- a/src/UserInterface/ViewItem/right_item_delegate.h ++++ b/src/UserInterface/ViewItem/right_item_delegate.h +@@ -1,3 +1,20 @@ ++/* ++ * Copyright (C) 2022, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . ++ */ ++ + #ifndef RIGHTITEMDELEGATE_H + #define RIGHTITEMDELEGATE_H + #include +diff --git a/src/UserInterface/ViewItem/tablet_full_itemdelegate.cpp b/src/UserInterface/ViewItem/tablet_full_itemdelegate.cpp +index 58e487a..05e52dd 100755 +--- a/src/UserInterface/ViewItem/tablet_full_itemdelegate.cpp ++++ b/src/UserInterface/ViewItem/tablet_full_itemdelegate.cpp +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #include "tablet_full_itemdelegate.h" +@@ -112,14 +111,14 @@ void TabletFullItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem + } + + bool bigIcon = index.data(Qt::UserRole + 2).toBool(); +- int iconTopSpace = (rect.height() - Style::AppListIconSize) / 2; +- int iconLeftSpace = (rect.width() - Style::AppListIconSize) / 2; ++ int iconTopSpace = (rect.height() - Style::m_appListIconSize) / 2; ++ int iconLeftSpace = (rect.width() - Style::m_appListIconSize) / 2; + + if (bigIcon) { + iconRect = QRect(rect.x() + iconLeftSpace - 6, + rect.y() + iconTopSpace - 6, +- Style::AppListIconSize + 12, +- Style::AppListIconSize + 12); ++ Style::m_appListIconSize + 12, ++ Style::m_appListIconSize + 12); + textRect = QRect(rect.x(), + rect.bottom() - iconTopSpace, + rect.width(), +@@ -127,8 +126,8 @@ void TabletFullItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem + } else { + iconRect = QRect(rect.x() + iconLeftSpace, + rect.y() + iconTopSpace, +- Style::AppListIconSize, +- Style::AppListIconSize); ++ Style::m_appListIconSize, ++ Style::m_appListIconSize); + textRect = QRect(rect.x(), + rect.bottom() - iconTopSpace, + rect.width(), +@@ -165,10 +164,10 @@ void TabletFullItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem + QPixmap pixmap; + + if (bigIcon) { +- pixmap = icon.pixmap((Style::AppListBigIconSize, Style::AppListBigIconSize), QIcon::Disabled, QIcon::Off); //wgx +- pixmap = pixmap.scaled(Style::AppListBigIconSize, Style::AppListBigIconSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); ++ pixmap = icon.pixmap((Style::m_appListBigIconSize, Style::m_appListBigIconSize), QIcon::Disabled, QIcon::Off); //wgx ++ pixmap = pixmap.scaled(Style::m_appListBigIconSize, Style::m_appListBigIconSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); + } else { +- pixmap = icon.pixmap((Style::AppListIconSize, Style::AppListIconSize), QIcon::Disabled, QIcon::Off); //wgx ++ pixmap = icon.pixmap((Style::m_appListIconSize, Style::m_appListIconSize), QIcon::Disabled, QIcon::Off); //wgx + } + + icon = QIcon(pixmap); +@@ -176,10 +175,10 @@ void TabletFullItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem + QPixmap mPixmap; + + if (bigIcon) { +- mPixmap = icon.pixmap((Style::AppListBigIconSize, Style::AppListBigIconSize)); //wgx +- mPixmap = mPixmap.scaled(Style::AppListBigIconSize, Style::AppListBigIconSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); ++ mPixmap = icon.pixmap((Style::m_appListBigIconSize, Style::m_appListBigIconSize)); //wgx ++ mPixmap = mPixmap.scaled(Style::m_appListBigIconSize, Style::m_appListBigIconSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); + } else { +- mPixmap = icon.pixmap((Style::AppListIconSize, Style::AppListIconSize)); //wgx ++ mPixmap = icon.pixmap((Style::m_appListIconSize, Style::m_appListIconSize)); //wgx + } + + icon = QIcon(mPixmap); +@@ -209,6 +208,6 @@ QSize TabletFullItemDelegate::sizeHint(const QStyleOptionViewItem &option, const + // { + // return QSize(0,0); + // } +- return QSize(Style::TabletItemSizeWidthFirst, Style::AppListItemSizeHeight); ++ return QSize(Style::m_tabletItemSizeWidthFirst, Style::m_appListItemSizeHeight); + } + +diff --git a/src/UserInterface/ViewItem/tablet_full_itemdelegate.h b/src/UserInterface/ViewItem/tablet_full_itemdelegate.h +index 8407557..a21803b 100755 +--- a/src/UserInterface/ViewItem/tablet_full_itemdelegate.h ++++ b/src/UserInterface/ViewItem/tablet_full_itemdelegate.h +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #ifndef TABLETITEMDELEGATE_H +diff --git a/src/UserInterface/Widget/animationpage.cpp b/src/UserInterface/Widget/animationpage.cpp +index 2676f29..a756da3 100755 +--- a/src/UserInterface/Widget/animationpage.cpp ++++ b/src/UserInterface/Widget/animationpage.cpp +@@ -1,3 +1,20 @@ ++/* ++ * Copyright (C) 2022, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . ++ */ ++ + #include "animationpage.h" + #include "utility.h" + #include +diff --git a/src/UserInterface/Widget/animationpage.h b/src/UserInterface/Widget/animationpage.h +index 9cefa24..c0cd67d 100755 +--- a/src/UserInterface/Widget/animationpage.h ++++ b/src/UserInterface/Widget/animationpage.h +@@ -1,3 +1,20 @@ ++/* ++ * Copyright (C) 2022, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . ++ */ ++ + #ifndef ANIMATIONPAGE_H + #define ANIMATIONPAGE_H + #include +diff --git a/src/UserInterface/Widget/full_commonuse_widget.cpp b/src/UserInterface/Widget/full_commonuse_widget.cpp +index 05d9d14..6adab1a 100755 +--- a/src/UserInterface/Widget/full_commonuse_widget.cpp ++++ b/src/UserInterface/Widget/full_commonuse_widget.cpp +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #include "full_commonuse_widget.h" +@@ -31,7 +30,10 @@ FullCommonUseWidget::FullCommonUseWidget(QWidget *parent) : + + FullCommonUseWidget::~FullCommonUseWidget() + { +- delete m_ukuiMenuInterface; ++ if (m_ukuiMenuInterface) { ++ delete m_ukuiMenuInterface; ++ m_ukuiMenuInterface = nullptr; ++ } + } + + void FullCommonUseWidget::initUi() +@@ -176,7 +178,7 @@ void FullCommonUseWidget::fillAppList() + { + m_data.clear(); + +- Q_FOREACH (QString desktopfp, UkuiMenuInterface::allAppVector) { ++ Q_FOREACH(QString desktopfp, UkuiMenuInterface::allAppVector) { + m_data.append(desktopfp); + } + +@@ -259,7 +261,7 @@ void FullCommonUseWidget::updateListView() + { + m_data.clear(); + +- Q_FOREACH (QString desktopfp, m_ukuiMenuInterface->getAllClassification()) { ++ Q_FOREACH(QString desktopfp, m_ukuiMenuInterface->getAllClassification()) { + m_data.append(desktopfp); + } + +diff --git a/src/UserInterface/Widget/full_commonuse_widget.h b/src/UserInterface/Widget/full_commonuse_widget.h +index cfce3da..dfea5b5 100755 +--- a/src/UserInterface/Widget/full_commonuse_widget.h ++++ b/src/UserInterface/Widget/full_commonuse_widget.h +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #ifndef FULLCOMMONUSEWIDGET_H +diff --git a/src/UserInterface/Widget/full_function_widget.cpp b/src/UserInterface/Widget/full_function_widget.cpp +index 09cc615..6e95e13 100755 +--- a/src/UserInterface/Widget/full_function_widget.cpp ++++ b/src/UserInterface/Widget/full_function_widget.cpp +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #include "full_function_widget.h" +@@ -32,7 +31,10 @@ FullFunctionWidget::FullFunctionWidget(QWidget *parent) : + + FullFunctionWidget::~FullFunctionWidget() + { +- delete m_ukuiMenuInterface; ++ if (m_ukuiMenuInterface) { ++ delete m_ukuiMenuInterface; ++ m_ukuiMenuInterface = nullptr; ++ } + } + + void FullFunctionWidget::initUi() +@@ -45,7 +47,7 @@ void FullFunctionWidget::initUi() + m_iconListWid = new QWidget(this); + m_iconListWid->setAttribute(Qt::WA_TranslucentBackground); + m_iconListWid->setAutoFillBackground(false); +- m_applistWid->setFixedSize(Style::m_applistAreaWidth, Style::m_applistWidHeight); ++ m_applistWid->setFixedWidth(Style::m_applistAreaWidth); + m_iconListWid->setFixedSize(Style::m_leftWidWidth, Style::m_applistWidHeight); + m_verticalScrollBar = new QScrollBar(m_scrollArea); + m_verticalScrollBar->installEventFilter(this); +@@ -119,7 +121,7 @@ void FullFunctionWidget::initAppListWidget() + m_scrollArea->setWidgetResizable(true); + m_scrollAreaWidLayout = new QVBoxLayout(m_scrollAreaWid); + m_scrollAreaWidLayout->setContentsMargins(0, 0, 0, 0); +- m_scrollAreaWidLayout->setSpacing(10); ++ m_scrollAreaWidLayout->setSpacing(0); + layout->addWidget(m_scrollArea); + connect(m_scrollArea->verticalScrollBar(), &QScrollBar::valueChanged, + this, &FullFunctionWidget::valueChangedSlot); +@@ -183,7 +185,7 @@ void FullFunctionWidget::fillAppList() + + void FullFunctionWidget::insertClassificationBtn(QString category) + { +- SplitBarFrame *classificationbtn = new SplitBarFrame(this, category, m_scrollArea->width() - 12, 30, 2); ++ SplitBarFrame *classificationbtn = new SplitBarFrame(this, category, m_scrollArea->width() - 12, 50, 2); + classificationbtn->setAttribute(Qt::WA_TranslucentBackground); + classificationbtn->setAutoFillBackground(false); + m_scrollAreaWidLayout->addWidget(classificationbtn); +@@ -240,7 +242,7 @@ void FullFunctionWidget::updateAppListView() + fillAppList(); + + //刷新图标列表界面 +- Q_FOREACH (QAbstractButton *button, m_buttonList) { ++ Q_FOREACH(QAbstractButton *button, m_buttonList) { + m_btnGroup->removeButton(button); + } + +@@ -284,12 +286,12 @@ void FullFunctionWidget::resizeScrollAreaControls() + rowcount = listview->model()->rowCount() / dividend; + } + +- listview->setFixedSize(m_scrollArea->width(), listview->gridSize().height()*rowcount); ++ listview->setFixedSize(m_scrollArea->width(), listview->gridSize().height() * rowcount); + areaHeight += listview->height() + 50; + row++; + } + +- m_scrollArea->widget()->setFixedSize(m_scrollArea->width(), areaHeight - 10); ++ m_scrollArea->widget()->setFixedSize(m_scrollArea->width(), areaHeight); + } + + /** +@@ -298,7 +300,7 @@ void FullFunctionWidget::resizeScrollAreaControls() + void FullFunctionWidget::initIconListWidget() + { + m_iconListWidLayout = new QVBoxLayout(m_iconListWid); +- m_iconListWidLayout->setSpacing(Style::LeftSpaceBetweenItem); ++ m_iconListWidLayout->setSpacing(Style::m_leftSpaceBetweenItem); + m_iconListWidLayout->setContentsMargins(45, 0, 0, 0); + m_topSpacerItem = new QSpacerItem(20, 40, QSizePolicy::Fixed, QSizePolicy::Expanding); + m_bottomSpacerItem = new QSpacerItem(20, 40, QSizePolicy::Fixed, QSizePolicy::Expanding); +@@ -313,7 +315,7 @@ void FullFunctionWidget::initIconListWidget() + + void FullFunctionWidget::on_setScrollBarValue(int value) + { +- m_verticalScrollBar->setMaximum(m_scrollAreaWidHeight - Style::m_applistWidHeight); ++ m_verticalScrollBar->setMaximum(m_scrollAreaWidHeight - Style::m_applistWidHeight + Style::m_scrollBarHeight); + m_verticalScrollBar->setValue(value); + } + +@@ -326,9 +328,9 @@ void FullFunctionWidget::initIconListScrollArea() + + for (int i = 0; i < m_classificationList.size(); i++) { + FunctionClassifyButton *iconbtn = new FunctionClassifyButton( +- Style::LeftBtnWidth, +- Style::LeftBtnHeight, +- Style::LeftIconSize, ++ Style::m_leftBtnWidth, ++ Style::m_leftBtnHeight, ++ Style::m_leftIconSize, + m_classificationList.at(i), + true, + true); +@@ -341,7 +343,7 @@ void FullFunctionWidget::initIconListScrollArea() + m_iconListWidLayout->addItem(m_bottomSpacerItem); + int id = 0; + +- Q_FOREACH (QAbstractButton *btn, m_buttonList) { ++ Q_FOREACH(QAbstractButton *btn, m_buttonList) { + m_btnGroup->addButton(btn, id++); + } + +@@ -358,7 +360,7 @@ void FullFunctionWidget::btnGroupClickedSlot(QAbstractButton *btn) + disconnect(m_scrollArea->verticalScrollBar(), &QScrollBar::valueChanged, + this, &FullFunctionWidget::valueChangedSlot); + +- Q_FOREACH (QAbstractButton *button, m_buttonList) { ++ Q_FOREACH(QAbstractButton *button, m_buttonList) { + if (m_btnGroup->id(btn) == m_buttonList.indexOf(button)) { + m_beginPos = m_scrollArea->verticalScrollBar()->sliderPosition(); + m_endPos = m_scrollAreaWidLayout->itemAt(m_btnGroup->id(btn) * 2)->widget()->y(); +@@ -405,17 +407,22 @@ void FullFunctionWidget::valueChangedSlot(int value) + int index = 0; + + while (index <= m_classificationList.count() - 1) { +- int min = m_scrollAreaWidLayout->itemAt(2 * index)->widget()->y(); ++ int min = 0; + int max = 0; + + if (index == m_classificationList.count() - 1) { ++ min = m_scrollAreaWidLayout->itemAt(2 * index - 1)->widget()->geometry().bottom() - Style::m_boundaryOffset; + max = m_scrollAreaWid->height(); ++ } else if (index == 0) { ++ min = 0; ++ max = m_scrollAreaWidLayout->itemAt(2 * index + 1)->widget()->geometry().bottom() - Style::m_boundaryOffset; + } else { +- max = m_scrollAreaWidLayout->itemAt(2 * (index + 1))->widget()->y(); ++ min = m_scrollAreaWidLayout->itemAt(2 * index - 1)->widget()->geometry().bottom() - Style::m_boundaryOffset; ++ max = m_scrollAreaWidLayout->itemAt(2 * index + 1)->widget()->geometry().bottom() - Style::m_boundaryOffset; + } + + if (value >= min && value < max) { +- Q_FOREACH (QAbstractButton *button, m_buttonList) { ++ Q_FOREACH(QAbstractButton *button, m_buttonList) { + FunctionClassifyButton *fcbutton = qobject_cast(button); + + if (index == m_buttonList.indexOf(button)) { +@@ -443,9 +450,9 @@ void FullFunctionWidget::enterAnimation() + m_animation->setDuration(200);//动画总时间 + m_animation->setStartValue(QRect(0, 0, + 0, m_iconListWid->height())); +- m_animation->setEndValue(QRect(Style::LeftMargin, ++ m_animation->setEndValue(QRect(Style::m_leftMargin, + 0, +- Style::LeftBtnWidth, ++ Style::m_leftBtnWidth, + m_iconListWid->height())); + m_animation->setEasingCurve(QEasingCurve::InQuart); + m_animation->start(); +@@ -455,16 +462,16 @@ void FullFunctionWidget::enterAnimation() + void FullFunctionWidget::setFunctionBtnGeometry() + { + // int height=m_classificationList.size()*Style::LeftBtnHeight+(m_classificationList.size()-1)*Style::LeftSpaceBetweenItem; +- m_iconListScrollAreaWid->setGeometry(QRect(Style::LeftMargin, ++ m_iconListScrollAreaWid->setGeometry(QRect(Style::m_leftMargin, + 0, +- Style::LeftBtnWidth, ++ Style::m_leftBtnWidth, + m_iconListWid->height())); + m_iconListScrollAreaWid->show(); + } + + void FullFunctionWidget::repaintWidget() + { +- m_applistWid->setFixedSize(Style::m_applistAreaWidth, Style::m_applistWidHeight); ++ m_applistWid->setFixedSize(Style::m_applistAreaWidth, Style::m_applistWidHeight + Style::m_scrollBarHeight); + 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 88493a0..743a005 100755 +--- a/src/UserInterface/Widget/full_function_widget.h ++++ b/src/UserInterface/Widget/full_function_widget.h +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #ifndef FULLFUNCTIONWIDGET_H +diff --git a/src/UserInterface/Widget/full_letter_widget.cpp b/src/UserInterface/Widget/full_letter_widget.cpp +index bd51f38..6bf48bb 100755 +--- a/src/UserInterface/Widget/full_letter_widget.cpp ++++ b/src/UserInterface/Widget/full_letter_widget.cpp +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #include "full_letter_widget.h" +@@ -28,8 +27,14 @@ FullLetterWidget::FullLetterWidget(QWidget *parent) : + + FullLetterWidget::~FullLetterWidget() + { +- delete m_ukuiMenuInterface; +- delete m_letterListBottomSpacer; ++ if (m_ukuiMenuInterface) { ++ delete m_ukuiMenuInterface; ++ m_ukuiMenuInterface = nullptr; ++ } ++ if (m_letterListBottomSpacer) { ++ delete m_letterListBottomSpacer; ++ m_letterListBottomSpacer = nullptr; ++ } + } + + /** +@@ -41,7 +46,7 @@ void FullLetterWidget::initUi() + this->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); + this->setAttribute(Qt::WA_TranslucentBackground); + m_letterListWid = new QWidget(this); +- m_letterListWid->setFixedSize(Style::m_leftWidWidth, Style::m_applistWidHeight); ++ m_letterListWid->setFixedWidth(Style::m_leftWidWidth); + m_verticalScrollBar = new QScrollBar(m_scrollArea); + m_verticalScrollBar->installEventFilter(this); + m_verticalScrollBar->setOrientation(Qt::Vertical); +@@ -83,7 +88,7 @@ void FullLetterWidget::initAppListWidget() + m_scrollArea->setFixedSize(Style::m_applistAreaWidth, Style::m_applistWidHeight); + m_scrollAreaWidLayout = new QVBoxLayout; + m_scrollAreaWidLayout->setContentsMargins(0, 0, 0, 0); +- m_scrollAreaWidLayout->setSpacing(10); ++ m_scrollAreaWidLayout->setSpacing(0); + m_scrollAreaWid->setLayout(m_scrollAreaWidLayout); + m_mainLayout->addWidget(m_scrollArea); + QSpacerItem *m_spaceItem1 = nullptr; +@@ -187,7 +192,7 @@ void FullLetterWidget::fillAppList() + + m_letterList.append(letterstr);//存储分类字符 + //插入字母分类按钮 +- SplitBarFrame *letterbtn = new SplitBarFrame(this, letterstr, m_scrollArea->width() - 12, 30, 1); ++ SplitBarFrame *letterbtn = new SplitBarFrame(this, letterstr, m_scrollArea->width() - 12, 50, 1); + m_scrollAreaWidLayout->addWidget(letterbtn); + //插入应用列表 + FullListView *listview = new FullListView(this, 1); +@@ -242,7 +247,7 @@ void FullLetterWidget::updateAppListView() + fillAppList(); + + //刷新字母列表界面 +- Q_FOREACH (QAbstractButton *button, m_buttonList) { ++ Q_FOREACH(QAbstractButton *button, m_buttonList) { + m_btnGroup->removeButton(button); + } + +@@ -266,7 +271,7 @@ void FullLetterWidget::updateAppListView() + + void FullLetterWidget::on_setScrollBarValue(int value) + { +- m_verticalScrollBar->setMaximum(m_scrollAreaWidHeight - Style::m_applistWidHeight); ++ m_verticalScrollBar->setMaximum(m_scrollAreaWidHeight - Style::m_applistWidHeight + Style::m_scrollBarHeight); + m_verticalScrollBar->setValue(value); + } + +@@ -293,12 +298,13 @@ void FullLetterWidget::resizeScrollAreaControls() + rowcount = listview->model()->rowCount() / dividend; + } + +- listview->setFixedHeight(listview->gridSize().height()*rowcount); +- areaHeight += listview->height() + 50; ++ listview->setFixedSize(m_scrollArea->width(), listview->gridSize().height() * rowcount); ++ areaHeight += (listview->height() + 50); ++ + row++; + } + +- m_scrollArea->widget()->setFixedHeight(areaHeight - 10); ++ m_scrollArea->widget()->setFixedSize(m_scrollArea->width(), areaHeight); + } + + /** +@@ -335,7 +341,7 @@ void FullLetterWidget::initLetterListScrollArea() + LetterClassifyButton *letterbtn = new LetterClassifyButton(m_letterListWid, + true, + m_letterList.at(i)); +- letterbtn->setFixedSize(Style::LeftLetterBtnHeight, Style::LeftLetterBtnHeight); ++ letterbtn->setFixedSize(Style::m_leftLetterBtnHeight, Style::m_leftLetterBtnHeight); + m_buttonList.append(letterbtn); + m_letterListWidLayout->addWidget(letterbtn); + m_letterListWidLayout->setAlignment(letterbtn, Qt::AlignLeft); +@@ -345,7 +351,7 @@ void FullLetterWidget::initLetterListScrollArea() + m_letterListWidLayout->addItem(m_letterListBottomSpacer); + int id = 0; + +- Q_FOREACH (QAbstractButton *btn, m_buttonList) { ++ Q_FOREACH(QAbstractButton *btn, m_buttonList) { + m_btnGroup->addButton(btn, id++); + } + +@@ -362,7 +368,7 @@ void FullLetterWidget::btnGroupClickedSlot(QAbstractButton *btn) + disconnect(m_scrollArea->verticalScrollBar(), &QScrollBar::valueChanged, + this, &FullLetterWidget::valueChangedSlot); + +- Q_FOREACH (QAbstractButton *button, m_buttonList) { ++ Q_FOREACH(QAbstractButton *button, m_buttonList) { + LetterClassifyButton *letterbtn = qobject_cast(button); + + if (m_btnGroup->id(btn) == m_buttonList.indexOf(button)) { +@@ -416,17 +422,23 @@ void FullLetterWidget::valueChangedSlot(int value) + int index = 0; + + while (index <= m_letterList.count() - 1) { +- int min = m_scrollAreaWidLayout->itemAt(2 * index)->widget()->y(); ++ ++ int min = 0; + int max = 0; + + if (index == m_letterList.count() - 1) { ++ min = m_scrollAreaWidLayout->itemAt(2 * index - 1)->widget()->geometry().bottom() - Style::m_boundaryOffset; + max = m_scrollAreaWid->height(); ++ } else if (index == 0) { ++ min = 0; ++ max = m_scrollAreaWidLayout->itemAt(2 * index + 1)->widget()->geometry().bottom() - Style::m_boundaryOffset; + } else { +- max = m_scrollAreaWidLayout->itemAt(2 * (index + 1))->widget()->y(); ++ min = m_scrollAreaWidLayout->itemAt(2 * index - 1)->widget()->geometry().bottom() - Style::m_boundaryOffset; ++ max = m_scrollAreaWidLayout->itemAt(2 * index + 1)->widget()->geometry().bottom() - Style::m_boundaryOffset; + } + + if (value >= min && value < max) { +- Q_FOREACH (QAbstractButton *button, m_buttonList) { ++ Q_FOREACH(QAbstractButton *button, m_buttonList) { + LetterClassifyButton *letterbtn = qobject_cast(button); + + if (index == m_buttonList.indexOf(button)) { +@@ -446,12 +458,12 @@ void FullLetterWidget::valueChangedSlot(int value) + void FullLetterWidget::enterAnimation() + { + m_animation->setDuration(200);//动画总时间 +- m_animation->setStartValue(QRect(0, (m_letterListWid->height() - (m_letterList.size() + 1)*Style::LeftLetterBtnHeight) / 2, +- 0, (m_letterList.size() + 1)*Style::LeftLetterBtnHeight)); +- m_animation->setEndValue(QRect(Style::LeftMargin, +- (m_letterListWid->height() - (m_letterList.size() + 1)*Style::LeftLetterBtnHeight) / 2, +- Style::LeftLetterBtnHeight * 2, +- (m_letterList.size() + 1)*Style::LeftLetterBtnHeight)); ++ m_animation->setStartValue(QRect(0, (m_letterListWid->height() - (m_letterList.size() + 1)*Style::m_leftLetterBtnHeight) / 2, ++ 0, (m_letterList.size() + 1)*Style::m_leftLetterBtnHeight)); ++ m_animation->setEndValue(QRect(Style::m_leftMargin, ++ (m_letterListWid->height() - (m_letterList.size() + 1)*Style::m_leftLetterBtnHeight) / 2, ++ Style::m_leftLetterBtnHeight * 2, ++ (m_letterList.size() + 1)*Style::m_leftLetterBtnHeight)); + m_animation->setEasingCurve(QEasingCurve::InQuart); + m_animation->start(); + // m_letterListScrollArea->show(); +@@ -469,14 +481,14 @@ void FullLetterWidget::setLetterBtnGeometry() + void FullLetterWidget::repaintWidget() + { + m_letterListWid->setFixedSize(Style::m_leftWidWidth, Style::m_applistWidHeight); +- m_scrollArea->setFixedSize(Style::m_applistAreaWidth, Style::m_applistWidHeight); ++ m_scrollArea->setFixedSize(Style::m_applistAreaWidth, Style::m_applistWidHeight + Style::m_scrollBarHeight); + m_scrollAreaWid->setFixedWidth(Style::m_applistWidWidth); + updateAppListView(); + } + + void FullLetterWidget::widgetMakeZero() + { +- Q_FOREACH (QAbstractButton *button, m_buttonList) { ++ Q_FOREACH(QAbstractButton *button, m_buttonList) { + QString letterstr = button->text().at(0); + int num = m_letterList.indexOf(letterstr); + +diff --git a/src/UserInterface/Widget/full_letter_widget.h b/src/UserInterface/Widget/full_letter_widget.h +index 72c25a0..addc2a8 100755 +--- a/src/UserInterface/Widget/full_letter_widget.h ++++ b/src/UserInterface/Widget/full_letter_widget.h +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #ifndef FULLLETTERWIDGET_H +diff --git a/src/UserInterface/Widget/full_searchresult_widget.cpp b/src/UserInterface/Widget/full_searchresult_widget.cpp +index a37fc83..344add3 100755 +--- a/src/UserInterface/Widget/full_searchresult_widget.cpp ++++ b/src/UserInterface/Widget/full_searchresult_widget.cpp +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + #include "full_searchresult_widget.h" + #include +@@ -29,7 +28,10 @@ FullSearchResultWidget::FullSearchResultWidget(QWidget *parent) : + + FullSearchResultWidget::~FullSearchResultWidget() + { +- delete m_ukuiMenuInterface; ++ if (m_ukuiMenuInterface) { ++ delete m_ukuiMenuInterface; ++ m_ukuiMenuInterface = nullptr; ++ } + } + + void FullSearchResultWidget::initUi() +@@ -152,7 +154,7 @@ void FullSearchResultWidget::updateAppListView(QVector arg) + { + m_data.clear(); + +- Q_FOREACH (QStringList appinfo, arg) { ++ Q_FOREACH(QStringList appinfo, arg) { + m_data.append(appinfo.at(0)); + } + +diff --git a/src/UserInterface/Widget/full_searchresult_widget.h b/src/UserInterface/Widget/full_searchresult_widget.h +index 73a42df..d5a47e1 100755 +--- a/src/UserInterface/Widget/full_searchresult_widget.h ++++ b/src/UserInterface/Widget/full_searchresult_widget.h +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #ifndef FULLSEARCHRESULTWIDGET_H +diff --git a/src/UserInterface/Widget/function_Widget.cpp b/src/UserInterface/Widget/function_Widget.cpp +index 5cf1f5e..cc0eee7 100755 +--- a/src/UserInterface/Widget/function_Widget.cpp ++++ b/src/UserInterface/Widget/function_Widget.cpp +@@ -1,3 +1,20 @@ ++/* ++ * Copyright (C) 2022, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . ++ */ ++ + #include "function_Widget.h" + #include "style.h" + #include +@@ -6,7 +23,6 @@ + #include + #include + #include +-#include + #include + #include "currenttime_interface.h" + #include "style.h" +@@ -210,7 +226,7 @@ void FunctionWidget::initUi() + } + + mainLayout->addWidget(searchEditBtn); +- focusPlug = new pluginwidget(this); ++ focusPlug = new PluginWidget(this); + mainLayout->addWidget(focusPlug); + focusPlug->setFixedSize(400, 638); + mainLayout->addStretch(); +diff --git a/src/UserInterface/Widget/function_Widget.h b/src/UserInterface/Widget/function_Widget.h +index 3681c78..9fe81d9 100755 +--- a/src/UserInterface/Widget/function_Widget.h ++++ b/src/UserInterface/Widget/function_Widget.h +@@ -1,3 +1,20 @@ ++/* ++ * Copyright (C) 2022, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . ++ */ ++ + #ifndef FUNCTIONWIDGET_H + #define FUNCTIONWIDGET_H + +@@ -11,7 +28,6 @@ + #include + #include + #include +-#include "AbstractInterface.h" + #include + #include "plugin_widget.h" + #include "currenttime_interface.h" +@@ -23,7 +39,7 @@ public: + FunctionWidget(QWidget *parent); + ~FunctionWidget(); + //QWidget* focusPlug=nullptr; +- pluginwidget *focusPlug = nullptr; ++ PluginWidget *focusPlug = nullptr; + void setDownOpacityEffect(const qreal &num); + + protected: +diff --git a/src/UserInterface/Widget/function_button_widget.cpp b/src/UserInterface/Widget/function_button_widget.cpp +index dbb116c..22d3553 100755 +--- a/src/UserInterface/Widget/function_button_widget.cpp ++++ b/src/UserInterface/Widget/function_button_widget.cpp +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #include "function_button_widget.h" +@@ -55,9 +54,9 @@ void FunctionButtonWidget::initUi() + + for (int row = 0; row < 6; row++) + for (int col = 0; col < 2; col++) { +- FunctionClassifyButton *iconbtn = new FunctionClassifyButton(Style::LeftBtnWidth, +- Style::LeftBtnHeight, +- Style::LeftIconSize, ++ FunctionClassifyButton *iconbtn = new FunctionClassifyButton(Style::m_leftBtnWidth, ++ Style::m_leftBtnHeight, ++ Style::m_leftIconSize, + m_categoryList.at(row * 2 + col), + false, + false); +@@ -73,7 +72,7 @@ void FunctionButtonWidget::initUi() + if (QGSettings::isSchemaInstalled(QString("org.ukui.style").toLocal8Bit())) { + QGSettings *gsetting = new QGSettings(QString("org.ukui.style").toLocal8Bit()); + connect(gsetting, &QGSettings::changed, this, [ = ] { +- Q_FOREACH (QAbstractButton *btn, m_buttonList) ++ Q_FOREACH(QAbstractButton *btn, m_buttonList) + { + FunctionClassifyButton *fbtn = qobject_cast(btn); + fbtn->updateBtnState(); +diff --git a/src/UserInterface/Widget/function_button_widget.h b/src/UserInterface/Widget/function_button_widget.h +index 3faed62..419a0e8 100755 +--- a/src/UserInterface/Widget/function_button_widget.h ++++ b/src/UserInterface/Widget/function_button_widget.h +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #ifndef FUNCTIONBUTTONWIDGET_H +diff --git a/src/UserInterface/Widget/letter_button_widget.cpp b/src/UserInterface/Widget/letter_button_widget.cpp +index f110340..667dfec 100755 +--- a/src/UserInterface/Widget/letter_button_widget.cpp ++++ b/src/UserInterface/Widget/letter_button_widget.cpp +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #include "letter_button_widget.h" +diff --git a/src/UserInterface/Widget/letter_button_widget.h b/src/UserInterface/Widget/letter_button_widget.h +index bf50598..ee13f27 100755 +--- a/src/UserInterface/Widget/letter_button_widget.h ++++ b/src/UserInterface/Widget/letter_button_widget.h +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #ifndef LETTERBUTTONWIDGET_H +diff --git a/src/UserInterface/Widget/main_view_widget.cpp b/src/UserInterface/Widget/main_view_widget.cpp +index 8a883d8..c459745 100755 +--- a/src/UserInterface/Widget/main_view_widget.cpp ++++ b/src/UserInterface/Widget/main_view_widget.cpp +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #include "main_view_widget.h" +diff --git a/src/UserInterface/Widget/main_view_widget.h b/src/UserInterface/Widget/main_view_widget.h +index ebebf5a..2466398 100755 +--- a/src/UserInterface/Widget/main_view_widget.h ++++ b/src/UserInterface/Widget/main_view_widget.h +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #ifndef MAINVIEWWIDGET_H +diff --git a/src/UserInterface/Widget/plugin_widget.cpp b/src/UserInterface/Widget/plugin_widget.cpp +index 2881e05..b975203 100755 +--- a/src/UserInterface/Widget/plugin_widget.cpp ++++ b/src/UserInterface/Widget/plugin_widget.cpp +@@ -1,14 +1,31 @@ ++/* ++ * Copyright (C) 2022, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . ++ */ ++ + #include "plugin_widget.h" + #include "KySmallPluginInterface.h" + #include +-pluginwidget::pluginwidget(QWidget *parent) : QWidget(parent) ++PluginWidget::PluginWidget(QWidget *parent) : QWidget(parent) + { + this->setWindowFlags(Qt::CustomizeWindowHint | Qt::FramelessWindowHint); + this->setAttribute(Qt::WA_StyledBackground, true); + this->setFocusPolicy(Qt::NoFocus); + init(); + } +-void pluginwidget::init() ++void PluginWidget::init() + { + QPluginLoader loader("/opt/small-plugin/bin/libsmall-plugin-manage.so"); + QObject *plugin = loader.instance(); +diff --git a/src/UserInterface/Widget/plugin_widget.h b/src/UserInterface/Widget/plugin_widget.h +index af41deb..8541ce9 100755 +--- a/src/UserInterface/Widget/plugin_widget.h ++++ b/src/UserInterface/Widget/plugin_widget.h +@@ -1,3 +1,20 @@ ++/* ++ * Copyright (C) 2022, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . ++ */ ++ + #ifndef PLUGINWIDGET_H + #define PLUGINWIDGET_H + +@@ -8,8 +25,6 @@ + #include + #include + #include +-#include +-#include + #include + #include + #include +@@ -17,11 +32,11 @@ + #include + #include + #include +-class pluginwidget : public QWidget ++class PluginWidget : public QWidget + { + Q_OBJECT + public: +- explicit pluginwidget(QWidget *parent = nullptr); ++ explicit PluginWidget(QWidget *parent = nullptr); + void init(); + }; + +diff --git a/src/UserInterface/Widget/splitbar_frame.cpp b/src/UserInterface/Widget/splitbar_frame.cpp +index 00b9d4a..83cfbaa 100755 +--- a/src/UserInterface/Widget/splitbar_frame.cpp ++++ b/src/UserInterface/Widget/splitbar_frame.cpp +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #include "splitbar_frame.h" +@@ -45,7 +44,7 @@ void SplitBarFrame::initAppBtn() + layout->setContentsMargins(15, 0, 0, 0); + layout->setSpacing(6); + m_textLabel->setAutoFillBackground(false); +- m_textLabel->setAlignment(Qt::AlignCenter); ++ m_textLabel->setAlignment(Qt::AlignTop); + m_textLabel->setText(m_category); + m_textLabel->adjustSize(); + QPalette pe = m_textLabel->palette(); +diff --git a/src/UserInterface/Widget/splitbar_frame.h b/src/UserInterface/Widget/splitbar_frame.h +index cafd1e0..079d757 100755 +--- a/src/UserInterface/Widget/splitbar_frame.h ++++ b/src/UserInterface/Widget/splitbar_frame.h +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #ifndef PUSHBUTTON_H +diff --git a/src/UserInterface/Widget/tabview_widget.cpp b/src/UserInterface/Widget/tabview_widget.cpp +deleted file mode 100755 +index c07987b..0000000 +--- a/src/UserInterface/Widget/tabview_widget.cpp ++++ /dev/null +@@ -1,36 +0,0 @@ +-#include "tabview_widget.h" +-#include +- +-TabViewWidget::TabViewWidget() +-{ +- setStyleSheet("background:transparent"); +- collectionTab = new QWidget(); +- recentTab = new QWidget(); +- collectionTab->setObjectName(QString::fromUtf8("collectionTab")); +- recentTab->setObjectName(QString::fromUtf8("recentTab")); +- this->addTab(collectionTab, QString()); +- this->addTab(recentTab, QString()); +- this->tabBar()->hide(); +- this->setCurrentIndex(0); +- initAppListWidget(); +- updateListView(); +-} +- +-void TabViewWidget::initAppListWidget() +-{ +- m_collectListView = new RightListView(collectionTab); +- m_collectListView->setFixedSize(352, 428); +- m_collectListView->show(); +-} +- +-void TabViewWidget::updateListView() +-{ +- m_data.clear(); +- +- Q_FOREACH (QString desktopfp, m_ukuiMenuInterface->getAllClassification()) { +- m_data.append(desktopfp); +- } +- +- m_collectListView->addData(m_data); +-} +- +diff --git a/src/UserInterface/Widget/tabview_widget.h b/src/UserInterface/Widget/tabview_widget.h +deleted file mode 100755 +index ca9e999..0000000 +--- a/src/UserInterface/Widget/tabview_widget.h ++++ /dev/null +@@ -1,25 +0,0 @@ +-#ifndef TABVIEWWIDGET_H +-#define TABVIEWWIDGET_H +-#include +-#include "rightlistview.h" +- +-class TabViewWidget: public QTabWidget +-{ +-public: +- TabViewWidget(); +- +-protected: +- +- void initAppListWidget(); +- void updateListView(); +- +-private: +- +- UkuiMenuInterface *m_ukuiMenuInterface = nullptr; +- QWidget *collectionTab = nullptr; +- QWidget *recentTab = nullptr; +- RightListView *m_collectListView = nullptr; +- QStringList m_data; +-}; +- +-#endif // TABVIEWWIDGET_H +diff --git a/src/UserInterface/full_mainwindow.cpp b/src/UserInterface/full_mainwindow.cpp +index 3a3e2cd..d614bb9 100755 +--- a/src/UserInterface/full_mainwindow.cpp ++++ b/src/UserInterface/full_mainwindow.cpp +@@ -1,3 +1,20 @@ ++/* ++ * Copyright (C) 2022, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . ++ */ ++ + #include "full_mainwindow.h" + #include + #include +@@ -319,7 +336,7 @@ bool FullMainWindow::eventFilter(QObject *watched, QEvent *event) + m_queryText->setParent(nullptr); + } + +- m_queryWid->setGeometry(6, 2, m_queryIcon->width() + 5, Style::QueryLineEditHeight); ++ m_queryWid->setGeometry(6, 2, m_queryIcon->width() + 5, Style::m_queryLineEditHeight); + m_queryWid->layout()->setAlignment(Qt::AlignVCenter); + m_lineEdit->setTextMargins(26, 0, 0, 0); + } +diff --git a/src/UserInterface/full_mainwindow.h b/src/UserInterface/full_mainwindow.h +index 1f7bc24..09a7c01 100755 +--- a/src/UserInterface/full_mainwindow.h ++++ b/src/UserInterface/full_mainwindow.h +@@ -1,3 +1,20 @@ ++/* ++ * Copyright (C) 2022, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . ++ */ ++ + #ifndef FULLMAINWINDOW_H + #define FULLMAINWINDOW_H + +diff --git a/src/UserInterface/mainwindow.cpp b/src/UserInterface/mainwindow.cpp +index c45be17..53451fd 100755 +--- a/src/UserInterface/mainwindow.cpp ++++ b/src/UserInterface/mainwindow.cpp +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #include "mainwindow.h" +@@ -41,7 +40,7 @@ MainWindow::MainWindow(QWidget *parent) : + Style::initWidStyle(); + openDataBase("MainThreadDataBase"); + initDatabase(); +- this->resize(Style::minw, Style::minh); ++ this->resize(Style::m_minw, Style::m_minh); + this->setAutoFillBackground(false); + m_centralwidget = new QWidget(this); + m_centerLayout = new QHBoxLayout(m_centralwidget); +@@ -62,8 +61,6 @@ MainWindow::MainWindow(QWidget *parent) : + + m_softwareDbThread = new SoftwareDatabaseUpdateThread; + m_animationPage = new AnimationPage(); +- m_maxAnimation = new QPropertyAnimation(m_animationPage, "geometry", this); +- m_minAnimation = new QPropertyAnimation(m_animationPage, "geometry", this); + m_searchAppThread = new SearchAppThread; + m_functionBtnWid = new FunctionButtonWidget(m_minFuncPage); + m_functionBtnWid->hide(); +@@ -209,8 +206,6 @@ void MainWindow::initSignalConnect() + connect(m_letterBtnWid, &LetterButtonWidget::sendLetterBtnSignal, this, &MainWindow::recvFunctionBtnSignal); + connect(m_functionBtnWid, &FunctionButtonWidget::sendResetFunctionPage, this, &MainWindow::resetFunctionPage); + connect(m_letterBtnWid, &LetterButtonWidget::sendResetLetterPage, this, &MainWindow::resetLetterPage); +- connect(m_maxAnimation, &QPropertyAnimation::finished, this, &MainWindow::maxAnimationFinished); +- connect(m_minAnimation, &QPropertyAnimation::finished, this, &MainWindow::minAnimationFinished); + connect(m_lineEdit, &QLineEdit::textChanged, this, &MainWindow::searchAppSlot); + connect(this, &MainWindow::sendSearchKeyword, m_searchAppThread, &SearchAppThread::recvSearchKeyword); + connect(m_searchAppThread, &SearchAppThread::sendSearchResult, this, &MainWindow::recvSearchResult); +@@ -323,7 +318,7 @@ void MainWindow::initSearchUi() + m_selectMenuButton->setAcceptDrops(true); + m_selectMenuButton->setFocusPolicy(Qt::StrongFocus); + m_selectMenuButton->setIcon(getCurIcon(":/data/img/mainviewwidget/downarrow.svg", true) +- .pixmap(QSize(Style::miniIconSize, Style::miniIconSize))); ++ .pixmap(QSize(Style::m_minIconSize, Style::m_minIconSize))); + //搜索框展开页 + m_minSearchPage = new QWidget(); + m_leftTopSearchHorizontalLayout = new QHBoxLayout(m_minSearchPage); +@@ -350,32 +345,32 @@ void MainWindow::initLeftWidget() + { + //左侧列表区 + m_leftStackedWidget = new QStackedWidget(m_viewWidget); +- m_leftStackedWidget->setFixedSize(QSize(300, Style::leftPageHeight)); ++ m_leftStackedWidget->setFixedSize(QSize(300, Style::m_leftPageHeight)); + m_minAllPage = new QWidget(); +- m_minAllPage->setFixedSize(QSize(Style::leftPageWidth, Style::leftPageHeight)); ++ m_minAllPage->setFixedSize(QSize(Style::m_leftPageWidth, Style::m_leftPageHeight)); + m_minAllListView = new ListView(m_minAllPage); +- m_minAllListView->setFixedSize(QSize(Style::leftPageWidth, Style::leftPageHeight)); ++ m_minAllListView->setFixedSize(QSize(Style::m_leftPageWidth, Style::m_leftPageHeight)); + m_minAllListView->setFrameShape(QFrame::NoFrame); + m_leftStackedWidget->addWidget(m_minAllPage); + m_minAllListView->installEventFilter(this); + m_minLetterPage = new QWidget(); +- m_minLetterPage->setFixedSize(QSize(Style::leftPageWidth, Style::leftPageHeight)); ++ m_minLetterPage->setFixedSize(QSize(Style::m_leftPageWidth, Style::m_leftPageHeight)); + m_minLetterListView = new ListView(m_minLetterPage); +- m_minLetterListView->setFixedSize(QSize(Style::leftPageWidth, Style::leftPageHeight)); ++ m_minLetterListView->setFixedSize(QSize(Style::m_leftPageWidth, Style::m_leftPageHeight)); + m_minLetterListView->setFrameShape(QFrame::NoFrame); + m_leftStackedWidget->addWidget(m_minLetterPage); + m_minLetterListView->installEventFilter(this); + m_minFuncPage = new QWidget(); +- m_minFuncPage->setFixedSize(QSize(Style::leftPageWidth, Style::leftPageHeight)); ++ m_minFuncPage->setFixedSize(QSize(Style::m_leftPageWidth, Style::m_leftPageHeight)); + m_minFuncListView = new ListView(m_minFuncPage); +- m_minFuncListView->setFixedSize(QSize(Style::leftPageWidth, Style::leftPageHeight)); ++ m_minFuncListView->setFixedSize(QSize(Style::m_leftPageWidth, Style::m_leftPageHeight)); + m_minFuncListView->setFrameShape(QFrame::NoFrame); + m_leftStackedWidget->addWidget(m_minFuncPage); + m_minFuncListView->installEventFilter(this); + m_minSearchResultPage = new QWidget(); +- m_minSearchResultPage->setFixedSize(QSize(Style::leftPageWidth, Style::leftPageHeight)); ++ m_minSearchResultPage->setFixedSize(QSize(Style::m_leftPageWidth, Style::m_leftPageHeight)); + m_minSearchResultListView = new ListView(m_minSearchResultPage); +- m_minSearchResultListView->setFixedSize(QSize(Style::leftPageWidth, Style::leftPageHeight)); ++ m_minSearchResultListView->setFixedSize(QSize(Style::m_leftPageWidth, Style::m_leftPageHeight)); + m_minSearchResultListView->installEventFilter(this); + m_leftStackedWidget->addWidget(m_minSearchResultPage); + } +@@ -450,9 +445,9 @@ void MainWindow::initRecentWidget() + //最近视图 + m_recentListView = new ListView(m_recentPage); + m_recentListView->installEventFilter(this); +- m_recentListView->setFixedSize(QSize(Style::rightViewWidth, Style::rightViewHeight)); ++ m_recentListView->setFixedSize(QSize(Style::m_rightViewWidth, Style::m_rightViewHeight)); + m_recentTextlabel = new QLabel(m_recentPage); +- m_recentTextlabel->setFixedSize(QSize(Style::rightViewWidth, Style::rightViewHeight)); ++ m_recentTextlabel->setFixedSize(QSize(Style::m_rightViewWidth, Style::m_rightViewHeight)); + m_recentTextlabel->setAlignment(Qt::AlignCenter); + m_recentTextlabel->setText(QApplication::translate("MainWindow", "No recent files")); + +@@ -773,12 +768,13 @@ void MainWindow::minAnimationFinished() + m_viewWidget->setFocus(); + // m_collectPushButton->clicked(true); + on_collectPushButton_clicked(); +- QEventLoop loop; +- QTimer::singleShot(100, &loop, SLOT(quit())); +- loop.exec(); +- m_animationPage->hide(); ++ ++ QTimer::singleShot(200, [ = ]() { ++ m_animationPage->hide(); ++ }); + } + ++ + void MainWindow::iconAnimationFinished() + { + m_dropDownMenu->raise(); +@@ -792,11 +788,12 @@ void MainWindow::maxAnimationFinished() + m_fullWindow->showNormal(); + setMaxWindowPos(); + m_fullWindow->activateWindow(); +- QEventLoop loop; +- QTimer::singleShot(100, &loop, SLOT(quit())); +- loop.exec(); +- m_animationPage->hide(); ++ ++ QTimer::singleShot(200, [ = ]() { ++ m_animationPage->hide(); ++ }); + } ++ + void MainWindow::resetLetterPage() + { + m_minLetterListView->show(); +@@ -846,12 +843,13 @@ void MainWindow::primaryScreenChangeSlot() + { + repaintWidget(); + } ++ + void MainWindow::appClassificationBtnClickedSlot() + { +- m_leaveAnimation->setStartValue(QRect(0, 0, Style::leftPageWidth, Style::leftPageHeight)); ++ m_leaveAnimation->setStartValue(QRect(0, 0, Style::m_leftPageWidth, Style::m_leftPageHeight)); + m_leaveAnimation->setEndValue(QRect(0, 0, 0, 0)); +- m_enterAnimation->setStartValue(QRect(-40, -40, Style::leftPageWidth + 80, Style::leftPageHeight + 80)); +- m_enterAnimation->setEndValue(QRect(10, 0, Style::leftPageWidth - 20, Style::leftPageHeight - 60)); ++ m_enterAnimation->setStartValue(QRect(-40, -40, Style::m_leftPageWidth + 80, Style::m_leftPageHeight + 80)); ++ m_enterAnimation->setEndValue(QRect(10, 0, Style::m_leftPageWidth - 20, Style::m_leftPageHeight - 60)); + m_leaveAnimation->setDuration(10); + m_enterAnimation->setDuration(100); + +@@ -949,7 +947,7 @@ bool MainWindow::eventFilter(QObject *target, QEvent *event) + + if (target == m_selectMenuButton) { + m_selectMenuButton->setIcon(getCurIcon(":/data/img/mainviewwidget/downarrow.svg", true) +- .pixmap(QSize(Style::miniIconSize, Style::miniIconSize))); ++ .pixmap(QSize(Style::m_minIconSize, Style::m_minIconSize))); + selectIconAnimation(true); + } + } +@@ -1135,7 +1133,7 @@ void MainWindow::recvSearchResult(QVector arg) + m_minSearchResultListView->verticalScrollBar()->setSliderPosition(0); + m_minSearchResultListView->addData(m_data, 3); + +- Q_FOREACH (QStringList appinfo, arg) { ++ Q_FOREACH(QStringList appinfo, arg) { + m_data.append(QStringList() << appinfo.at(0) << "1"); + } + +@@ -1153,7 +1151,7 @@ void MainWindow::searchAppSlot(QString arg) + } + void MainWindow::on_selectMenuButton_triggered(QAction *arg1) + { +- m_selectMenuButton->setIcon(getCurIcon(":/data/img/mainviewwidget/downarrow.svg", true).pixmap(QSize(Style::miniIconSize, Style::miniIconSize))); ++ m_selectMenuButton->setIcon(getCurIcon(":/data/img/mainviewwidget/downarrow.svg", true).pixmap(QSize(Style::m_minIconSize, Style::m_minIconSize))); + selectIconAnimation(false); + + if (arg1 == m_allAction) { +@@ -1271,12 +1269,14 @@ void MainWindow::on_minMaxChangeButton_clicked() + { + m_canHide = true; + m_isFullScreen = true; ++ QPropertyAnimation *m_maxAnimation = new QPropertyAnimation(m_animationPage, "geometry", this); ++ connect(m_maxAnimation, &QPropertyAnimation::finished, this, &MainWindow::maxAnimationFinished); + + if (g_platform.startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) { + m_maxAnimation->setDuration(1); + } else { + m_animationPage->show(); +- m_animationPage->setGeometry(this->x(), this->y(), Style::minw, Style::minh); ++ m_animationPage->setGeometry(this->x(), this->y(), Style::m_minw, Style::m_minh); + m_animationPage->raise(); + m_animationPage->repaint(); + m_maxAnimation->setDuration(260); +@@ -1287,12 +1287,13 @@ 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::minw, Style::minh)); ++ m_maxAnimation->setStartValue(QRect(this->x(), this->y(), Style::m_minw, Style::m_minh)); + m_maxAnimation->setEndValue(QRect(0, 0, Style::m_availableScreenWidth, Style::m_availableScreenHeight)); + +- m_maxAnimation->start(); ++ m_maxAnimation->start(QAbstractAnimation::DeleteWhenStopped); + this->hide(); + } ++ + void MainWindow::showWindow() + { + Style::initWidStyle(); +@@ -1339,27 +1340,27 @@ void MainWindow::setMinWindowPos() + + if (position == 0) { + if (g_platform.startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) { +- kdk::WindowManager::setGeometry(this->windowHandle(), QRect(x + 4, y + height - Style::minh - 3, Style::minw, Style::minh)); ++ kdk::WindowManager::setGeometry(this->windowHandle(), QRect(x + 4, y + height - Style::m_minh - 3, Style::m_minw, Style::m_minh)); + } else { +- this->setGeometry(QRect(x + 4, y + height - Style::minh - 3, Style::minw, Style::minh)); ++ this->setGeometry(QRect(x + 4, y + height - Style::m_minh - 3, Style::m_minw, Style::m_minh)); + } + } else if (position == 1) { + if (g_platform.startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) { +- kdk::WindowManager::setGeometry(this->windowHandle(), QRect(x + 4, y + 4, Style::minw, Style::minh)); ++ kdk::WindowManager::setGeometry(this->windowHandle(), QRect(x + 4, y + 4, Style::m_minw, Style::m_minh)); + } else { +- this->setGeometry(QRect(x + 4, y + 4, Style::minw, Style::minh)); ++ this->setGeometry(QRect(x + 4, y + 4, Style::m_minw, Style::m_minh)); + } + } else if (position == 2) { + if (g_platform.startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) { +- kdk::WindowManager::setGeometry(this->windowHandle(), QRect(x + 4, y + 4, Style::minw, Style::minh)); ++ kdk::WindowManager::setGeometry(this->windowHandle(), QRect(x + 4, y + 4, Style::m_minw, Style::m_minh)); + } else { +- this->setGeometry(QRect(x + 4, y + 4, Style::minw, Style::minh)); ++ this->setGeometry(QRect(x + 4, y + 4, Style::m_minw, Style::m_minh)); + } + } else { + if (g_platform.startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) { +- kdk::WindowManager::setGeometry(this->windowHandle(), QRect(x + width - Style::minw - 4, y + 4, Style::minw, Style::minh)); ++ kdk::WindowManager::setGeometry(this->windowHandle(), QRect(x + width - Style::m_minw - 4, y + 4, Style::m_minw, Style::m_minh)); + } else { +- this->setGeometry(QRect(x + width - Style::minw - 4, y + 4, Style::minw, Style::minh)); ++ this->setGeometry(QRect(x + width - Style::m_minw - 4, y + 4, Style::m_minw, Style::m_minh)); + } + } + } +@@ -1374,7 +1375,7 @@ void MainWindow::setMaxWindowPos() + void MainWindow::repaintWidget() + { + Style::initWidStyle(); +- this->setMinimumSize(Style::minw, Style::minh); ++ this->setMinimumSize(Style::m_minw, Style::m_minh); + int x = Style::m_primaryScreenX; + int y = Style::m_primaryScreenY; + int width = Style::m_availableScreenWidth; +@@ -1389,6 +1390,9 @@ void MainWindow::showNormalWindowSlot() + { + myDebug() << "Style::m_availableScreenWidth" << Style::m_availableScreenWidth << "Style::m_availableScreenHeight" << Style::m_availableScreenHeight; + ++ QPropertyAnimation *m_minAnimation = new QPropertyAnimation(m_animationPage, "geometry", this); ++ connect(m_minAnimation, &QPropertyAnimation::finished, this, &MainWindow::minAnimationFinished); ++ + if (g_platform.startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) { + m_minAnimation->setDuration(1); + } else { +@@ -1406,9 +1410,9 @@ 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::minw, Style::minh)); ++ m_minAnimation->setEndValue(QRect(this->x(), this->y(), Style::m_minw, Style::m_minh)); + +- m_minAnimation->start(); ++ m_minAnimation->start(QAbstractAnimation::DeleteWhenStopped); + m_fullWindow->hide(); + } + void MainWindow::on_powerOffButton_clicked() +diff --git a/src/UserInterface/mainwindow.h b/src/UserInterface/mainwindow.h +index 1b5363d..2afcb93 100755 +--- a/src/UserInterface/mainwindow.h ++++ b/src/UserInterface/mainwindow.h +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #ifndef MAINWINDOW_H +@@ -38,7 +37,6 @@ + #include "convert_winid_to_desktop.h" + #include "style.h" + #include "main_view_widget.h" +-#include "tabview_widget.h" + #include "dbus.h" + #include "dbus-adaptor.h" + #include "software_database_update_thread.h" +@@ -54,6 +52,7 @@ + #include "letter_button_widget.h" + #include "animationpage.h" + #include "rotationlabel.h" ++#include "rightlistview.h" + #include "ukuistylehelper/ukuistylehelper.h" + #include "windowmanager/windowmanager.h" + +@@ -144,6 +143,7 @@ public Q_SLOTS: + void iconAnimationFinished(); + void changeStyle(); + void tabletModeChangeSlot(bool flag); ++ + private Q_SLOTS: + void on_selectMenuButton_triggered(QAction *arg1); + +@@ -236,8 +236,6 @@ private: + DesktopWatcher *m_desktopWatcher = nullptr; + QPropertyAnimation *m_enterAnimation = nullptr; + QPropertyAnimation *m_leaveAnimation = nullptr; +- QPropertyAnimation *m_minAnimation = nullptr; +- QPropertyAnimation *m_maxAnimation = nullptr; + QPropertyAnimation *iconAnimation = nullptr; + int m_widgetState = -1; + FunctionButtonWidget *m_functionBtnWid = nullptr; +diff --git a/src/UserInterface/tabletwindow.cpp b/src/UserInterface/tabletwindow.cpp +index 378ad1f..4d7d945 100755 +--- a/src/UserInterface/tabletwindow.cpp ++++ b/src/UserInterface/tabletwindow.cpp +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #include "tabletwindow.h" +@@ -69,12 +68,12 @@ void TabletWindow::initSize() + { + Style::initWidStyle(); + this->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); +- this->setFixedSize(Style::ScreenWidth, Style::ScreenHeight); +- m_leftWidget->setFixedSize(Style::m_leftWidWidth, Style::CenterWindHeight); +- m_leftWidget->layout()->setContentsMargins(Style::TimeWidgetLeft, Style::TimeWidgetTop, 0, 0); +- m_scrollAreaWid->setFixedHeight(Style::CenterWindHeight); +- m_scrollArea->setFixedSize(Style::ScreenWidth, Style::CenterWindHeight); +- m_buttonWidget->setFixedSize(Style::OtherPageViewWidth, 30); ++ this->setFixedSize(Style::m_screenWidth, Style::m_screenHeight); ++ m_leftWidget->setFixedSize(Style::m_leftWidWidth, Style::m_centerWindHeight); ++ m_leftWidget->layout()->setContentsMargins(Style::m_timeWidgetLeft, Style::m_timeWidgetTop, 0, 0); ++ m_scrollAreaWid->setFixedHeight(Style::m_centerWindHeight); ++ m_scrollArea->setFixedSize(Style::m_screenWidth, Style::m_centerWindHeight); ++ m_buttonWidget->setFixedSize(Style::m_otherPageViewWidth, 30); + } + + void TabletWindow::initUi() +@@ -557,15 +556,15 @@ void TabletWindow::insertAppList(QStringList desktopfplist) + m_firstPageLayout->setContentsMargins(0, 0, 0, 0); + m_firstPageWidget->setLayout(m_firstPageLayout); + m_firstPageLayout->addWidget(m_leftWidget); +- listview->setFixedSize(Style::FirsPageViewWidth, Style::CenterWindHeight); ++ listview->setFixedSize(Style::m_firsPageViewWidth, Style::m_centerWindHeight); + m_firstPageLayout->addWidget(listview); + m_scrollAreaWidLayout->addWidget(m_firstPageWidget); +- listview->setGridSize(QSize(Style::TabletItemSizeWidthFirst, Style::AppListItemSizeHeight)); ++ listview->setGridSize(QSize(Style::m_tabletItemSizeWidthFirst, Style::m_appListItemSizeHeight)); + m_isFirstPage = false; + } else { + listview = new TabletListView(this, 1); +- listview->setFixedSize(Style::OtherPageViewWidth, Style::CenterWindHeight); +- listview->setGridSize(QSize(Style::TabletItemSizeWidthOther, Style::AppListItemSizeHeight)); ++ listview->setFixedSize(Style::m_otherPageViewWidth, Style::m_centerWindHeight); ++ listview->setGridSize(QSize(Style::m_tabletItemSizeWidthOther, Style::m_appListItemSizeHeight)); + m_scrollAreaWidLayout->addWidget(listview); + } + +@@ -936,7 +935,7 @@ void TabletWindow::buttonClicked(QAbstractButton *button) + if (!(m_scrollAnimation->state() == QPropertyAnimation::Running)) { + int idd = m_buttonGroup->id(button); + int preNum = m_curPageNum; +- Style::nowpagenum = idd; ++ Style::m_nowpagenum = idd; + + // QDBusReply res = usrInterface->call("get_current_tabletmode"); + for (int page = 1; page <= m_pagemanager->getAppPageVector().size(); page++) { +diff --git a/src/UserInterface/tabletwindow.h b/src/UserInterface/tabletwindow.h +index 7b6a03d..6d05c27 100755 +--- a/src/UserInterface/tabletwindow.h ++++ b/src/UserInterface/tabletwindow.h +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #ifndef TABLETWINDOW_H +diff --git a/src/UserInterface/userinterface.pri b/src/UserInterface/userinterface.pri +index 56b58f8..00b893b 100755 +--- a/src/UserInterface/userinterface.pri ++++ b/src/UserInterface/userinterface.pri +@@ -40,7 +40,6 @@ HEADERS += \ + $$PWD/Widget/main_view_widget.h \ + $$PWD/Widget/plugin_widget.h \ + $$PWD/Widget/splitbar_frame.h \ +- $$PWD/Widget/tabview_widget.h \ + $$PWD/full_mainwindow.h \ + $$PWD/mainwindow.h \ + $$PWD/tabletwindow.h +@@ -78,7 +77,6 @@ SOURCES += \ + $$PWD/Widget/main_view_widget.cpp \ + $$PWD/Widget/plugin_widget.cpp \ + $$PWD/Widget/splitbar_frame.cpp \ +- $$PWD/Widget/tabview_widget.cpp \ + $$PWD/full_mainwindow.cpp \ + $$PWD/mainwindow.cpp \ + $$PWD/tabletwindow.cpp +diff --git a/src/UtilityFunction/AbstractInterface.h b/src/UtilityFunction/AbstractInterface.h +deleted file mode 100755 +index 90ed8ff..0000000 +--- a/src/UtilityFunction/AbstractInterface.h ++++ /dev/null +@@ -1,13 +0,0 @@ +-#ifndef ABSTRACTINTERFACE_H +-#define ABSTRACTINTERFACE_H +-#include +-class QWidget; +-class AbstractInterface +-{ +-public: +- virtual ~AbstractInterface() {} +- virtual QWidget *createPluginWidget(QWidget *parent, bool type) = 0; +-}; +-#define AbstractInterface_iid "Welcome to use focusmode" +-Q_DECLARE_INTERFACE(AbstractInterface, AbstractInterface_iid) +-#endif // ABSTRACTINTERFACE_H +diff --git a/src/UtilityFunction/KySmallPluginInterface.h b/src/UtilityFunction/KySmallPluginInterface.h +index cf9ad21..44ef75e 100755 +--- a/src/UtilityFunction/KySmallPluginInterface.h ++++ b/src/UtilityFunction/KySmallPluginInterface.h +@@ -1,3 +1,20 @@ ++/* ++ * Copyright (C) 2022, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . ++ */ ++ + #ifndef KYSMALLPLUGININTERFACE_H + #define KYSMALLPLUGININTERFACE_H + +diff --git a/src/UtilityFunction/Style/style.cpp b/src/UtilityFunction/Style/style.cpp +index 70198af..84d71aa 100755 +--- a/src/UtilityFunction/Style/style.cpp ++++ b/src/UtilityFunction/Style/style.cpp +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #include "style.h" +@@ -31,11 +30,11 @@ int Style::m_primaryScreenX = 0; + int Style::m_primaryScreenY = 0; + int Style::m_panelPosition = 0; + //默认窗口 +-int Style::minw = 0; +-int Style::minh = 0; +-int Style::leftPageWidth = 0; +-int Style::leftPageHeight = 0; +-int Style::defaultQueryLineEditIconSize = 0; ++int Style::m_minw = 0; ++int Style::m_minh = 0; ++int Style::m_leftPageWidth = 0; ++int Style::m_leftPageHeight = 0; ++int Style::m_defaultQueryLineEditIconSize = 0; + /** + * 全屏窗口 + */ +@@ -43,72 +42,62 @@ int Style::defaultQueryLineEditIconSize = 0; + int Style::m_availableScreenWidth = 0; + int Style::m_availableScreenHeight = 0; + //搜索栏 +-int Style::QueryLineEditHeight = 0; ++int Style::m_queryLineEditHeight = 0; + //左侧栏 + int Style::m_leftWidWidth = 0; +-int Style::LeftMargin = 0; +-int Style::LeftBtnWidth = 0; +-int Style::LeftBtnHeight = 0; +-int Style::LeftLetterBtnHeight = 0; +-int Style::LeftLetterFontSize = 0; +-int Style::LeftIconSize = 0; +-int Style::LeftSpaceIconText = 0; +-int Style::LeftSpaceBetweenItem = 0; ++int Style::m_leftMargin = 0; ++int Style::m_leftBtnWidth = 0; ++int Style::m_leftBtnHeight = 0; ++int Style::m_leftLetterBtnHeight = 0; ++int Style::m_leftLetterFontSize = 0; ++int Style::m_leftIconSize = 0; ++int Style::m_leftSpaceIconText = 0; ++int Style::m_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; +-int Style::AppListItemSizeWidth = 0; +-int Style::TabletItemSizeWidthOther = 0; +-int Style::TabletItemSizeWidthFirst = 0; +-int Style::FirsPageViewWidth = 0; +-int Style::OtherPageViewWidth = 0; ++int Style::m_scrollBarHeight = 0; ++int Style::m_appListIconSize = 0; ++int Style::m_appListBigIconSize = 0; ++int Style::m_appTextRectHeight = 0; ++int Style::m_boundaryOffset = 0; ++int Style::m_appListItemSizeWidth = 0; ++int Style::m_tabletItemSizeWidthOther = 0; ++int Style::m_tabletItemSizeWidthFirst = 0; ++int Style::m_firsPageViewWidth = 0; ++int Style::m_otherPageViewWidth = 0; + int Style::m_applistGridSizeWidth = 0; +-int Style::AppLeftSpace = 0; +-int Style::AppTopSpace = 0; +-int Style::AppSpaceBetweenIconText = 0; +-int Style::FirstPageSpace = 0; +-int Style::OtherPageSpace = 0; ++int Style::m_appLeftSpace = 0; ++int Style::m_appTopSpace = 0; ++int Style::m_appSpaceBetweenIconText = 0; ++int Style::m_firstPageSpace = 0; ++int Style::m_otherPageSpace = 0; + + //侧边栏primaryScreen +-int Style::SideBarWidWidth = 0; +- +-int Style::appLine = 0; +-int Style::appColumn = 0; +-int Style::appLineFirst = 0; +-int Style::appColumnFirst = 0; +-int Style::appPage = 1; +-int Style::appNum = 0; +-int Style::nowpagenum = 1; +-int Style::appRows = 0; +-bool Style::ScreenRotation = false; +-int Style::AppListItemSizeHeight = 270; +-int Style::AppListViewTopMargin = 0; +-int Style::ScreenWidth = 0; +-int Style::ScreenHeight = 0; +-int Style::AppListViewLeftMargin = 52; +-int Style::AppListViewBottomMargin = 20; +-int Style::AppListViewRightMargin = 0; +-int Style::TimeWidgetTop = 81; +-int Style::TimeWidgetLeft = 112; +-int Style::CenterWindHeight = 0; +- +-int Style::GroupAppColumn = 1; +-int Style::GroupAppRow = 1; ++int Style::m_sideBarWidWidth = 0; + +-int Style::ButtonWidgetWidth = 56; ++int Style::m_appLine = 0; ++int Style::m_appColumn = 0; ++int Style::m_appLineFirst = 0; ++int Style::m_appColumnFirst = 0; ++int Style::m_appPage = 1; ++int Style::m_appNum = 0; ++int Style::m_nowpagenum = 1; ++int Style::m_appRows = 0; ++bool Style::m_screenRotation = false; ++int Style::m_appListItemSizeHeight = 270; ++int Style::m_appListViewTopMargin = 0; ++int Style::m_screenWidth = 0; ++int Style::m_screenHeight = 0; ++int Style::m_appListViewBottomMargin = 20; ++int Style::m_timeWidgetTop = 81; ++int Style::m_timeWidgetLeft = 112; ++int Style::m_centerWindHeight = 0; + +-int Style::ToolWidgetLeft = 24; +-bool Style::IsWideScreen = false; +- +-int Style::DropMenuWidth = 0; +-int Style::DropMenuHeight = 0; +-int Style::miniIconSize = 0; +- +-int Style::rightViewWidth = 0; +-int Style::rightViewHeight = 0; ++int Style::m_minIconSize = 0; ++int Style::m_rightViewWidth = 0; ++int Style::m_rightViewHeight = 0; + + void Style::initWidStyle() + { +@@ -129,129 +118,130 @@ void Style::initWidStyle() + } + + if (m_availableScreenWidth == 800 && m_availableScreenHeight == 600) { +- minw = 320; +- minh = 500; +- leftPageWidth = 300; +- leftPageHeight = 517; ++ m_minw = 320; ++ m_minh = 500; ++ m_leftPageWidth = 300; ++ m_leftPageHeight = 517; + } else { +- minw = 652; +- minh = 590; +- leftPageWidth = 300; +- leftPageHeight = 517; ++ m_minw = 652; ++ m_minh = 590; ++ m_leftPageWidth = 300; ++ m_leftPageHeight = 517; + } + + if (m_availableScreenWidth >= 2000 && m_availableScreenWidth <= 4000) { +- LeftMargin = 20; +- LeftLetterFontSize = 14; +- LeftSpaceBetweenItem = 15; +- AppListIconSize = 96; +- AppListItemSizeWidth = 168; ++ m_leftMargin = 20; ++ m_leftLetterFontSize = 14; ++ m_leftSpaceBetweenItem = 15; ++ m_appListIconSize = 96; ++ m_appListItemSizeWidth = 168; + m_applistGridSizeWidth = 240; +- AppSpaceBetweenIconText = 20; ++ m_appSpaceBetweenIconText = 20; + } else if (m_availableScreenWidth >= 1920 && m_availableScreenWidth < 2000) { +- LeftMargin = 20; +- LeftLetterFontSize = 14; +- LeftSpaceBetweenItem = 15; +- AppListIconSize = 86; +- AppListItemSizeWidth = 168; ++ m_leftMargin = 20; ++ m_leftLetterFontSize = 14; ++ m_leftSpaceBetweenItem = 15; ++ m_appListIconSize = 86; ++ m_appListItemSizeWidth = 168; + m_applistGridSizeWidth = 220; +- AppSpaceBetweenIconText = 18; ++ m_appSpaceBetweenIconText = 18; + } else if (m_availableScreenWidth >= 1600 && m_availableScreenWidth < 1920) { +- LeftMargin = 10; +- LeftLetterFontSize = 11; +- LeftSpaceBetweenItem = 10; +- AppListIconSize = 86; +- AppListItemSizeWidth = 150; ++ m_leftMargin = 10; ++ m_leftLetterFontSize = 11; ++ m_leftSpaceBetweenItem = 10; ++ m_appListIconSize = 86; ++ m_appListItemSizeWidth = 150; + m_applistGridSizeWidth = 180; +- AppSpaceBetweenIconText = 14; ++ m_appSpaceBetweenIconText = 14; + } else if (m_availableScreenWidth >= 1366 && m_availableScreenWidth < 1600) { +- LeftMargin = 10; +- LeftLetterFontSize = 11; +- LeftSpaceBetweenItem = 10; +- AppListIconSize = 64; +- AppListItemSizeWidth = 112; ++ m_leftMargin = 10; ++ m_leftLetterFontSize = 11; ++ m_leftSpaceBetweenItem = 10; ++ m_appListIconSize = 64; ++ m_appListItemSizeWidth = 112; + m_applistGridSizeWidth = 140; +- AppSpaceBetweenIconText = 0; ++ m_appSpaceBetweenIconText = 0; + } else if (m_availableScreenWidth >= 1280 && m_availableScreenWidth < 1366) { +- LeftMargin = 10; +- LeftLetterFontSize = 11; +- LeftSpaceBetweenItem = 10; +- AppListIconSize = 64; +- AppListItemSizeWidth = 112; ++ m_leftMargin = 10; ++ m_leftLetterFontSize = 11; ++ m_leftSpaceBetweenItem = 10; ++ m_appListIconSize = 64; ++ m_appListItemSizeWidth = 112; + m_applistGridSizeWidth = 142; +- AppSpaceBetweenIconText = 14; ++ m_appSpaceBetweenIconText = 14; + } else if (m_availableScreenWidth >= 1152 && m_availableScreenWidth < 1280) { +- LeftMargin = 10; +- LeftLetterFontSize = 11; +- LeftSpaceBetweenItem = 10; +- AppListIconSize = 64; +- AppListItemSizeWidth = 112; ++ m_leftMargin = 10; ++ m_leftLetterFontSize = 11; ++ m_leftSpaceBetweenItem = 10; ++ m_appListIconSize = 64; ++ m_appListItemSizeWidth = 112; + m_applistGridSizeWidth = 142; +- AppSpaceBetweenIconText = 14; ++ m_appSpaceBetweenIconText = 14; + } else if (m_availableScreenWidth > 800 && m_availableScreenWidth < 1152) { +- LeftMargin = 10; +- LeftLetterFontSize = 11; +- LeftSpaceBetweenItem = 10; +- AppListIconSize = 64; +- AppListItemSizeWidth = 112; ++ m_leftMargin = 10; ++ m_leftLetterFontSize = 11; ++ m_leftSpaceBetweenItem = 10; ++ m_appListIconSize = 64; ++ m_appListItemSizeWidth = 112; + m_applistGridSizeWidth = 141; +- AppSpaceBetweenIconText = 14; ++ m_appSpaceBetweenIconText = 14; + } else { +- LeftMargin = 10; +- LeftLetterFontSize = 11; +- LeftSpaceBetweenItem = 10; +- AppListIconSize = 64; +- AppListItemSizeWidth = 112; ++ m_leftMargin = 10; ++ m_leftLetterFontSize = 11; ++ m_leftSpaceBetweenItem = 10; ++ m_appListIconSize = 64; ++ m_appListItemSizeWidth = 112; + m_applistGridSizeWidth = 138; +- AppSpaceBetweenIconText = 14; ++ m_appSpaceBetweenIconText = 14; + } + +- LeftBtnWidth = 68 + 5 * len; +- LeftBtnHeight = 34; +- QueryLineEditHeight = 30; +- LeftLetterBtnHeight = 25; +- LeftIconSize = 19; +- DropMenuWidth = 170; +- DropMenuHeight = 112; +- miniIconSize = 8; +- rightViewWidth = 324; +- rightViewHeight = 470; +- LeftSpaceIconText = 14; ++ m_leftBtnWidth = 68 + 5 * len; ++ m_leftBtnHeight = 34; ++ m_queryLineEditHeight = 30; ++ m_leftLetterBtnHeight = 25; ++ m_leftIconSize = 19; ++ m_rightViewWidth = 324; ++ m_rightViewHeight = 470; ++ m_leftSpaceIconText = 14; ++ m_appTextRectHeight = 30; ++ m_minIconSize = 8; ++ ++ m_appTopSpace = (m_appListItemSizeWidth - m_appSpaceBetweenIconText - m_appListIconSize - m_appTextRectHeight) / 2; ++ m_boundaryOffset = (m_applistGridSizeWidth - m_appListItemSizeWidth) + m_appTopSpace + 10; + m_applistWidWidth = m_availableScreenWidth / 1.25; + m_applistWidWidth = m_applistWidWidth - (m_applistWidWidth % m_applistGridSizeWidth) + 2; + m_applistWidHeight = m_availableScreenHeight - 120; + m_applistWidHeight = m_applistWidHeight - (m_applistWidHeight % m_applistGridSizeWidth); + m_leftWidWidth = (m_availableScreenWidth - m_applistWidWidth) / 2 + 1; + m_applistAreaWidth = m_applistWidWidth + 20; ++ m_scrollBarHeight = 10; + } else { +- ScreenWidth = QApplication::primaryScreen()->geometry().width(); +- ScreenHeight = QApplication::primaryScreen()->geometry().height(); ++ m_screenWidth = QApplication::primaryScreen()->geometry().width(); ++ m_screenHeight = QApplication::primaryScreen()->geometry().height(); + myDebug() << "Winches" << qApp->desktop()->widthMM(); + myDebug() << "Hinches" << qApp->desktop()->heightMM(); +- myDebug() << "ScreenWidth" << ScreenWidth; +- myDebug() << "ScreenHeight" << ScreenHeight; +- appColumn = 6; +- appLine = 4; +- appLineFirst = 4; +- AppListViewTopMargin = 70; +- AppListViewLeftMargin = 52; +- AppListViewBottomMargin = AppListViewTopMargin - 30; +- AppListViewRightMargin = 0; +- m_leftWidWidth = ScreenWidth * 0.3; +- FirsPageViewWidth = ScreenWidth - m_leftWidWidth - 5; +- appColumnFirst = FirsPageViewWidth / 220; +- OtherPageViewWidth = ScreenWidth; +- TabletItemSizeWidthFirst = FirsPageViewWidth / appColumnFirst; +- TabletItemSizeWidthOther = (ScreenWidth - 5) / appColumn; +- CenterWindHeight = ScreenHeight - AppListViewBottomMargin - AppListViewTopMargin; +- AppListItemSizeHeight = CenterWindHeight / appLine; +- AppListIconSize = 96; +- AppListBigIconSize = 108; +- AppTopSpace = (AppListItemSizeHeight - AppListIconSize) / 2; +- AppLeftSpace = (TabletItemSizeWidthFirst - AppListIconSize) / 2; +- TimeWidgetTop = (CenterWindHeight - 870) / 2; +- TimeWidgetLeft = (m_leftWidWidth - 400) / 2; +- FirstPageSpace = AppLeftSpace; +- OtherPageSpace = (TabletItemSizeWidthOther - AppListIconSize) / 2; ++ myDebug() << "ScreenWidth" << m_screenWidth; ++ myDebug() << "ScreenHeight" << m_screenHeight; ++ m_appColumn = 6; ++ m_appLine = 4; ++ m_appLineFirst = 4; ++ m_appListViewTopMargin = 70; ++ m_appListViewBottomMargin = m_appListViewTopMargin - 30; ++ m_leftWidWidth = m_screenWidth * 0.3; ++ m_firsPageViewWidth = m_screenWidth - m_leftWidWidth - 5; ++ m_appColumnFirst = m_firsPageViewWidth / 220; ++ m_otherPageViewWidth = m_screenWidth; ++ m_tabletItemSizeWidthFirst = m_firsPageViewWidth / m_appColumnFirst; ++ m_tabletItemSizeWidthOther = (m_screenWidth - 5) / m_appColumn; ++ m_centerWindHeight = m_screenHeight - m_appListViewBottomMargin - m_appListViewTopMargin; ++ m_appListItemSizeHeight = m_centerWindHeight / m_appLine; ++ m_appListIconSize = 96; ++ m_appListBigIconSize = 108; ++ m_appTopSpace = (m_appListItemSizeHeight - m_appListIconSize) / 2; ++ m_appLeftSpace = (m_tabletItemSizeWidthFirst - m_appListIconSize) / 2; ++ m_timeWidgetTop = (m_centerWindHeight - 870) / 2; ++ m_timeWidgetLeft = (m_leftWidWidth - 400) / 2; ++ m_firstPageSpace = m_appLeftSpace; ++ m_otherPageSpace = (m_tabletItemSizeWidthOther - m_appListIconSize) / 2; + } + } +diff --git a/src/UtilityFunction/Style/style.h b/src/UtilityFunction/Style/style.h +index 547a072..6ca2f80 100755 +--- a/src/UtilityFunction/Style/style.h ++++ b/src/UtilityFunction/Style/style.h +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #ifndef STYLE_H +@@ -85,11 +84,11 @@ public: + static int m_primaryScreenY; + static int m_panelPosition; + //默认窗口 +- static int minw; +- static int minh; +- static int leftPageWidth; +- static int leftPageHeight; +- static int defaultQueryLineEditIconSize; ++ static int m_minw; ++ static int m_minh; ++ static int m_leftPageWidth; ++ static int m_leftPageHeight; ++ static int m_defaultQueryLineEditIconSize; + + /** + * 全屏 +@@ -98,86 +97,71 @@ public: + static int m_availableScreenWidth; + static int m_availableScreenHeight; + //搜索栏 +- static int QueryLineEditHeight;//搜索框高度 ++ static int m_queryLineEditHeight;//搜索框高度 + //左侧栏 + static int m_leftWidWidth; //宽度 +- static int LeftMargin; //内左侧边距 +- static int LeftBtnWidth;//按钮宽度 +- static int LeftBtnHeight;//按钮高度 +- static int LeftLetterBtnHeight;//按钮高度 +- static int LeftLetterFontSize; //字体大小 +- static int LeftIconSize; //图标大小 +- static int LeftSpaceIconText; //按钮图标与文字内边距 +- static int LeftSpaceBetweenItem; //item间距 ++ static int m_leftMargin; //内左侧边距 ++ static int m_leftBtnWidth;//按钮宽度 ++ static int m_leftBtnHeight;//按钮高度 ++ static int m_leftLetterBtnHeight;//按钮高度 ++ static int m_leftLetterFontSize; //字体大小 ++ static int m_leftIconSize; //图标大小 ++ static int m_leftSpaceIconText; //按钮图标与文字内边距 ++ static int m_leftSpaceBetweenItem; //item间距 + //应用列表栏 + static int m_applistWidWidth; //宽度 + static int m_applistAreaWidth; + static int m_applistWidHeight; //高度 +- static int AppListIconSize; //图标大小 +- static int AppListBigIconSize; +- static int AppListItemSizeWidth; //item大小 +- static int TabletItemSizeWidthFirst; +- static int TabletItemSizeWidthOther; +- static int FirsPageViewWidth; +- static int OtherPageViewWidth; ++ static int m_scrollBarHeight; ++ static int m_appListIconSize; //图标大小 ++ static int m_appListBigIconSize; ++ static int m_appTextRectHeight; ++ static int m_boundaryOffset; ++ static int m_appListItemSizeWidth; //item大小 ++ static int m_tabletItemSizeWidthFirst; ++ static int m_tabletItemSizeWidthOther; ++ static int m_firsPageViewWidth; ++ static int m_otherPageViewWidth; + static int m_applistGridSizeWidth; //网格大小 +- static int AppLeftSpace;//左侧边距 +- static int AppTopSpace;//上侧边距 +- static int AppSpaceBetweenIconText;//图标与文字边距 +- static int FirstPageSpace; +- static int OtherPageSpace; ++ static int m_appLeftSpace;//左侧边距 ++ static int m_appTopSpace;//上侧边距 ++ static int m_appSpaceBetweenIconText;//图标与文字边距 ++ static int m_firstPageSpace; ++ static int m_otherPageSpace; + + /** + * 侧边栏 + */ +- static int SideBarWidWidth; //宽度 ++ static int m_sideBarWidWidth; //宽度 + +- static int appLine; +- static int appColumn; +- static int appLineFirst; +- static int appColumnFirst; +- static int appNum; +- static int appPage; +- static int nowpagenum; +- static int appRows; //app的总行数 +- static bool ScreenRotation; ++ static int m_appLine; ++ static int m_appColumn; ++ static int m_appLineFirst; ++ static int m_appColumnFirst; ++ static int m_appNum; ++ static int m_appPage; ++ static int m_nowpagenum; ++ static int m_appRows; //app的总行数 ++ static bool m_screenRotation; + +- static int AppListItemSizeHeight; ++ static int m_appListItemSizeHeight; + + // static int ScreenWidth; + // static int ScreenHeight; + ++ static int m_screenWidth; ++ static int m_screenHeight; ++ static int m_appListViewTopMargin; ++ static int m_appListViewBottomMargin; ++ static int m_centerWindHeight; + +- static int LeftWidgetWidth; +- +- static int ScreenWidth; +- static int ScreenHeight; +- static int AppListViewTopMargin; +- static int AppListViewLeftMargin; +- static int AppListViewBottomMargin; +- static int AppListViewRightMargin; +- static int CenterWindHeight; +- +- static int GroupAppRow; +- static int GroupAppColumn; +- +- static int TimeWidgetTop; +- static int TimeWidgetLeft; +- +- static int ButtonWidgetWidth; ++ static int m_timeWidgetTop; ++ static int m_timeWidgetLeft; + +- //扩展的开始菜单应用列表 +- static int ToolWidgetLeft; +- static int WideAppListItemSizeWidth; +- static int WideAppListItemSizeHeight; +- static int WideAppViewLeftMargin; +- static bool IsWideScreen; +- static int DropMenuWidth; +- static int DropMenuHeight; +- static int miniIconSize; ++ static int m_minIconSize; + +- static int rightViewWidth; +- static int rightViewHeight; ++ static int m_rightViewWidth; ++ static int m_rightViewHeight; + + }; + +diff --git a/src/UtilityFunction/abstractInterface.h b/src/UtilityFunction/abstractInterface.h +deleted file mode 100755 +index f484d73..0000000 +--- a/src/UtilityFunction/abstractInterface.h ++++ /dev/null +@@ -1,20 +0,0 @@ +-#ifndef OOBE_PLUGIN_INFACE_H +-#define OOBE_PLUGIN_INFACE_H +- +-#include +-#include +-#include +-#include +- +-class QWidget; +-class kyMenuPluginInterface +-{ +- +-public: +- virtual ~kyMenuPluginInterface() {} +- virtual const QString name() = 0; +- virtual const QString description() = 0; +- virtual QWidget *createWidget(QWidget *parent) = 0; +-}; +-Q_DECLARE_INTERFACE(kyMenuPluginInterface, "org.kyMenuPlugin.AbstractInterface") +-#endif +\ No newline at end of file +diff --git a/src/UtilityFunction/thumbnail.cpp b/src/UtilityFunction/thumbnail.cpp +index 55a1f79..eda6562 100755 +--- a/src/UtilityFunction/thumbnail.cpp ++++ b/src/UtilityFunction/thumbnail.cpp +@@ -1,3 +1,20 @@ ++/* ++ * Copyright (C) 2022, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . ++ */ ++ + #include "thumbnail.h" + #include + #include "style.h" +@@ -22,11 +39,11 @@ void ThumbNail::initUi() + setWindowFlags(Qt::FramelessWindowHint); + setAttribute(Qt::WA_TranslucentBackground); + this->setStyleSheet("border:0px;background:transparent;"); +- this->setFixedSize(Style::AppListIconSize, Style::AppListIconSize); ++ this->setFixedSize(Style::m_appListIconSize, Style::m_appListIconSize); + iconLabel = new QLabel(this); + iconLabel->setStyleSheet("border:0px;background-color:transparent;"); + iconLabel->setFocusPolicy(Qt::NoFocus); +- iconLabel->setFixedSize(Style::AppListIconSize, Style::AppListIconSize); ++ iconLabel->setFixedSize(Style::m_appListIconSize, Style::m_appListIconSize); + layout = new QVBoxLayout(this); + layout->setContentsMargins(0, 0, 0, 0); + layout->setSpacing(0); +@@ -116,11 +133,11 @@ void ThumbNail::setupthumbnail(QString desktopfp) + QPixmap pixmap ; + + if (appDisable(desktopfp) == 1) { +- pixmap = icon.pixmap((Style::AppListIconSize, Style::AppListIconSize), QIcon::Disabled, QIcon::Off); ++ pixmap = icon.pixmap((Style::m_appListIconSize, Style::m_appListIconSize), QIcon::Disabled, QIcon::Off); + //qDebug()<<"appDisable(desktopfp)"<setPixmap(pixmap); +@@ -219,19 +236,13 @@ bool ThumbNail::appDisable(QString desktopfp)//判断是否是禁用应用(这 + char *name = g_key_file_get_locale_string(keyfile, "Desktop Entry", "Exec", nullptr, nullptr); + //取出value值 + QString execnamestr = QString::fromLocal8Bit(name); +- //处理value值 +- str = execnamestr; +- // str = execnamestr.section(' ', 0, 0); +- // QStringList list = str.split('/'); +- // str = list[list.size()-1]; +- //关闭文件 ++ + g_key_file_free(keyfile); +- QString desktopfp1 =/*"application/"+*/str; + //QString group=desktopfp.split('/').last(); + disableSetting->beginGroup("application"); + //判断 +- bool bo = disableSetting->contains(desktopfp1.toLocal8Bit().data()); // iskey +- bool bo1 = disableSetting->QSettings::value(desktopfp1.toLocal8Bit().data()).toBool(); //isvalue ++ bool bo = disableSetting->contains(execnamestr.toLocal8Bit().data()); // iskey ++ bool bo1 = disableSetting->QSettings::value(execnamestr.toLocal8Bit().data()).toBool(); //isvalue + disableSetting->endGroup(); + + //qDebug()<. ++ */ ++ + #ifndef THUMBNAIL_H + #define THUMBNAIL_H + +diff --git a/src/UtilityFunction/utility.cpp b/src/UtilityFunction/utility.cpp +index 1e320a3..c7b63e7 100755 +--- a/src/UtilityFunction/utility.cpp ++++ b/src/UtilityFunction/utility.cpp +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #include "utility.h" +@@ -234,7 +233,7 @@ QString getEnvOverriddenDesktopFile(int pid) + if (file.open(QIODevice::ReadOnly)) { + QList list = file.readLine().split('\x00'); + +- Q_FOREACH (QByteArray array, list) { ++ Q_FOREACH(QByteArray array, list) { + if (array.contains("GIO_LAUNCHED_DESKTOP_FILE=")) { + ret = QString(array.split('=').at(1)); + break; +@@ -279,7 +278,7 @@ void initDatabase() + setting->beginGroup("application"); + QString desktopfp; + +- Q_FOREACH (QString desktopfn, setting->allKeys()) { ++ Q_FOREACH(QString desktopfn, setting->allKeys()) { + if (setting->value(desktopfn).toInt() == 1) { + desktopfp.clear(); + +@@ -306,7 +305,7 @@ void initDatabase() + + bool b = sql.exec("create table if not exists appInfo(desktop char primary key, times int, time int, type int, recent int, num int, collect int)"); + +- Q_FOREACH (QString desktopfn, desktopfnList) { ++ Q_FOREACH(QString desktopfn, desktopfnList) { + myDebug() << "void initDatabase()" << desktopfn; + QDateTime dt = QDateTime::currentDateTime(); + int datetime = dt.toTime_t(); +@@ -691,7 +690,7 @@ void cleanTimeoutApp() + } + } + +- Q_FOREACH (QString desktopfn, list) { ++ Q_FOREACH(QString desktopfn, list) { + cmd = QString("delete from appInfo where desktop=\"%1\"") + .arg(desktopfn); + sql.exec(cmd); +diff --git a/src/UtilityFunction/utility.h b/src/UtilityFunction/utility.h +index 4491673..66a047c 100755 +--- a/src/UtilityFunction/utility.h ++++ b/src/UtilityFunction/utility.h +@@ -1,10 +1,10 @@ + /* +- * Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. ++ * Copyright (C) 2022, KylinSoft Co., Ltd. + * +- * This program is free software; you can redistribute it and/or modify ++ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, or (at your option) +- * any later version. ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of +@@ -12,8 +12,7 @@ + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License +- * along with this program; if not, see . + */ + + #ifndef UTILITY_H +diff --git a/src/UtilityFunction/utilityfunction.pri b/src/UtilityFunction/utilityfunction.pri +index 3cc89d4..f153ab3 100755 +--- a/src/UtilityFunction/utilityfunction.pri ++++ b/src/UtilityFunction/utilityfunction.pri +@@ -3,10 +3,8 @@ INCLUDEPATH += \ + $$PWD/Style + + HEADERS += \ +- $$PWD/AbstractInterface.h \ + $$PWD/KySmallPluginInterface.h \ + $$PWD/Style/style.h \ +- $$PWD/abstractInterface.h \ + $$PWD/thumbnail.h \ + $$PWD/utility.h + +diff --git a/translations/ukui-menu_bo_CN.ts b/translations/ukui-menu_bo_CN.ts +index d92f153..6677791 100644 +--- a/translations/ukui-menu_bo_CN.ts ++++ b/translations/ukui-menu_bo_CN.ts +@@ -4,22 +4,22 @@ + + FullMainWindow + +- ++ + Search + འཚོལ་ཞིབ། + + +- ++ + All + ཚང་མ། + + +- ++ + Letter + འཕྲིན་ཡིག + + +- ++ + Function + བྱེད་ནུས། + +@@ -27,7 +27,7 @@ + + FunctionWidget + +- ++ + Search + འཚོལ་ཞིབ། + +@@ -43,55 +43,65 @@ + 打开字母排序菜单 + + +- ++ + Open the function sort menu + བྱེད་ལས་རིགས་ཀྱི་ཟས་ཐོའི་ཁ་ཕྱེ་བ། + + +- ++ + Open the alphabetical menu + དབྱངས་གསལ་ཡི་གེའི་ཟས་ཐོའི་ཁ་ཕྱེ་བ། + ++ ++ ++ ++ path: ++ འགྲོ་ལམ་: ++ ++ ++ path ++ འགྲོ་ལམ་ ++ + + + MainWindow + +- +- ++ ++ + Search + འཚོལ་ཞིབ། + + +- ++ + No recent files + ཉེ་དུས་ཀྱི་ཡིག་ཆ་མེད། + + +- +- +- +- +- ++ ++ ++ ++ ++ + All + ཚང་མ། + + +- ++ + collection + བསྡུ་ཉར། + + +- ++ + recent + ཉེ་ཆར། + + +- ++ + Max + མའེ་ཁེ་སི། + + +- ++ + PowerOff + སྒུལ་ཤུགས་ཀྱི་ནུས་པ། + +@@ -100,16 +110,16 @@ + 搜索应用 + + +- +- +- ++ ++ ++ + Letter + འཕྲིན་ཡིག + + +- +- +- ++ ++ ++ + Function + བྱེད་ནུས། + +@@ -117,68 +127,68 @@ + + QObject + +- +- ++ ++ + Office + གཞུང་ལས་ཁང་། + + +- +- ++ ++ + Development + འཕེལ་རྒྱས་ + + +- +- ++ ++ + Image + པར་རིས། + + +- +- ++ ++ + Video + བརྙན་ཕབ། + + +- +- ++ ++ + Internet + དྲ་སྦྲེལ། + + +- +- ++ ++ + Game + རོལ་རྩེད། + + +- +- ++ ++ + Education + སློབ་གསོ། + + +- +- ++ ++ + Social + སྤྱི་ཚོགས། + + +- +- ++ ++ + System + ལམ་ལུགས། + + +- +- ++ ++ + Safe + བདེ་འཇགས། + + +- +- ++ ++ + Others + དེ་མིན་ད་དུང་ + +@@ -186,82 +196,82 @@ + + RightClickMenu + +- ++ + Pin to all + མི་ཚང་མར་ཁབ་རྒྱག་པ། + + +- ++ + Unpin from all + མི་ཚང་མའི་ཁྲོད་ནས་བཀག་འགོག་བྱེད་ + + +- ++ + Pin to taskbar + ལས་འགན་སྒྲུབ་པར་ཁབ་རྒྱག་པ། + + +- ++ + Unpin from taskbar + ལས་འགན་སྒྲུབ་ས་ནས་ཁ་པར་གཏོང་བ། + + +- ++ + Add to desktop shortcuts + ཅོག་ཙེའི་སྟེང་གི་མགྱོགས་ལམ་ཁ་སྣོན་བྱས་ཡོད། + + +- ++ + Pin to collection + འཚོལ་སྡུད་བྱེད་པའི་ཁབ་སྐུད། + + +- ++ + Remove from collection + བསྡུ་ཉར་དངོས་རྫས་ཁྲོད་ནས་ཕྱིར་ + + +- ++ + Uninstall + སྒྲིག་སྦྱོར་བྱས་མེད་པ། + + +- ++ + Switch user + གློག་སྒོ་འབྱེད་པའི་སྤྱོད་མཁན + + +- ++ + Hibernate + ཧིན་རྡུ་ཉི་ཞི་ཡ། + + +- ++ + Sleep + གཉིད་ཁུག་པ། + + +- ++ + Lock Screen + སྒོ་ལྕགས་ཀྱི་བརྙན་ཤེལ། + + +- ++ + Log Out + ཕྱིར་འཐེན་བྱ་དགོས། + + +- ++ + Restart + ཡང་བསྐྱར་འགོ་འཛུགས་ + + +- ++ + Power Off + གློག་ཆད་པ། + + +- ++ + Personalize this list + མིང་ཐོ་འདི་རང་གཤིས་ཅན་དུ་བསྒྱུར + +@@ -269,22 +279,22 @@ + + TabletRightClickMenu + +- ++ + Pin to taskbar + ལས་འགན་སྒྲུབ་པར་ཁབ་རྒྱག་པ། + + +- ++ + Unpin from taskbar + ལས་འགན་སྒྲུབ་ས་ནས་ཁ་པར་གཏོང་བ། + + +- ++ + Add to desktop shortcuts + ཅོག་ཙེའི་སྟེང་གི་མགྱོགས་ལམ་ཁ་སྣོན་བྱས་ཡོད། + + +- ++ + Uninstall + སྒྲིག་སྦྱོར་བྱས་མེད་པ། + +diff --git a/translations/ukui-menu_tr.ts b/translations/ukui-menu_tr.ts +index 756c8b1..c453759 100755 +--- a/translations/ukui-menu_tr.ts ++++ b/translations/ukui-menu_tr.ts +@@ -4,22 +4,22 @@ + + FullMainWindow + +- ++ + Search + Ara + + +- ++ + All + Tümü + + +- ++ + Letter + Alfabetik + + +- ++ + Function + Kategori + +@@ -118,7 +118,7 @@ + Diğer + + +- ++ + Search + Ara + +@@ -173,15 +173,21 @@ + + ItemDelegate + +- ++ + Open the function sort menu + + + +- ++ + Open the alphabetical menu + + ++ ++ ++ ++ path: ++ ++ + + + MainViewWidget +@@ -205,56 +211,56 @@ + + MainWindow + +- ++ + collection + + + +- +- +- +- +- ++ ++ ++ ++ ++ + All + Tümü + + +- +- ++ ++ + Search + Ara + + +- ++ + No recent files + + + +- ++ + recent + + + +- ++ + Max + + + +- ++ + PowerOff + + + +- +- +- ++ ++ ++ + Letter + Alfabetik + + +- +- +- ++ ++ ++ + Function + Kategori + +@@ -309,68 +315,68 @@ + + QObject + +- +- ++ ++ + Office + Ofis Uygulamaları + + +- +- ++ ++ + Development + Programlama + + +- +- ++ ++ + Image + Grafik + + +- +- ++ ++ + Video + Video + + +- +- ++ ++ + Internet + İnternet + + +- +- ++ ++ + Game + Oyunlar + + +- +- ++ ++ + Education + Eğitim + + +- +- ++ ++ + Social + Sosyal + + +- +- ++ ++ + System + Sistem + + +- +- ++ ++ + Safe + + + +- +- ++ ++ + Others + Diğer + +@@ -378,62 +384,62 @@ + + RightClickMenu + +- ++ + Pin to all + Tümünü sabitle + + +- ++ + Unpin from all + Tüm sabitlemeleri kaldır + + +- ++ + Pin to taskbar + Görev çubuğuna sabitle + + +- ++ + Unpin from taskbar + Görev çubuğundan sabitlemeyi kaldır + + +- ++ + Add to desktop shortcuts + Masaüstü kısayollarına ekle + + +- ++ + Pin to collection + + + +- ++ + Remove from collection + + + +- ++ + Uninstall + Kaldır + + +- ++ + Switch user + + + +- ++ + Hibernate + Beklemeye Al + + +- ++ + Sleep + Uyku Modu + + +- ++ + Lock Screen + Ekranı Kilitle + +@@ -442,22 +448,22 @@ + Kullanıcı Değiştir + + +- ++ + Log Out + Çıkış + + +- ++ + Restart + Yeniden Başlat + + +- ++ + Power Off + Kapat + + +- ++ + Personalize this list + Bu listeyi özelleştirin + +@@ -551,22 +557,22 @@ + + TabletRightClickMenu + +- ++ + Pin to taskbar + Görev çubuğuna sabitle + + +- ++ + Unpin from taskbar + Görev çubuğundan sabitlemeyi kaldır + + +- ++ + Add to desktop shortcuts + Masaüstü kısayollarına ekle + + +- ++ + Uninstall + Kaldır + +diff --git a/translations/ukui-menu_zh_CN.ts b/translations/ukui-menu_zh_CN.ts +index 4d04dbf..59aa5fd 100755 +--- a/translations/ukui-menu_zh_CN.ts ++++ b/translations/ukui-menu_zh_CN.ts +@@ -4,22 +4,22 @@ + + FullMainWindow + +- ++ + Search + 搜索应用 + + +- ++ + All + 全部 + + +- ++ + Letter + 字母排序 + + +- ++ + Function + 功能分类 + +@@ -27,7 +27,7 @@ + + FunctionWidget + +- ++ + Search + 全局搜索 + +@@ -43,55 +43,65 @@ + 打开字母排序菜单 + + +- ++ + Open the function sort menu + 打开功能排序菜单 + + +- ++ + Open the alphabetical menu + 打开字母排序菜单 + ++ ++ ++ ++ path: ++ 路径: ++ ++ ++ path ++ 路径 ++ + + + MainWindow + +- +- ++ ++ + Search + 搜索应用 + + +- ++ + No recent files + 暂无最近文件 + + +- +- +- +- +- ++ ++ ++ ++ ++ + All + 全部 + + +- ++ + collection + 收藏 + + +- ++ + recent + 最近 + + +- ++ + Max + 放大 + + +- ++ + PowerOff + 电源 + +@@ -100,16 +110,16 @@ + 搜索应用 + + +- +- +- ++ ++ ++ + Letter + 字母排序 + + +- +- +- ++ ++ ++ + Function + 功能分类 + +@@ -117,68 +127,68 @@ + + QObject + +- +- ++ ++ + Office + 办公 + + +- +- ++ ++ + Development + 开发 + + +- +- ++ ++ + Image + 图像 + + +- +- ++ ++ + Video + 影音 + + +- +- ++ ++ + Internet + 网络 + + +- +- ++ ++ + Game + 游戏 + + +- +- ++ ++ + Education + 教育 + + +- +- ++ ++ + Social + 社交 + + +- +- ++ ++ + System + 系统 + + +- +- ++ ++ + Safe + 安全 + + +- +- ++ ++ + Others + 其他 + +@@ -186,82 +196,82 @@ + + RightClickMenu + +- ++ + Pin to all + 固定到“所有软件” + + +- ++ + Unpin from all + 从“所有软件”取消固定 + + +- ++ + Pin to taskbar + 固定到任务栏 + + +- ++ + Unpin from taskbar + 从任务栏取消固定 + + +- ++ + Add to desktop shortcuts + 添加到桌面快捷方式 + + +- ++ + Pin to collection + 固定到收藏 + + +- ++ + Remove from collection + 从收藏移除 + + +- ++ + Uninstall + 卸载 + + +- ++ + Switch user + 切换用户 + + +- ++ + Hibernate + 休眠 + + +- ++ + Sleep + 睡眠 + + +- ++ + Lock Screen + 锁屏 + + +- ++ + Log Out + 注销 + + +- ++ + Restart + 重启 + + +- ++ + Power Off + 关机 + + +- ++ + Personalize this list + + +@@ -269,22 +279,22 @@ + + TabletRightClickMenu + +- ++ + Pin to taskbar + 固定到任务栏 + + +- ++ + Unpin from taskbar + 从任务栏取消固定 + + +- ++ + Add to desktop shortcuts + 固定到桌面快捷方式 + + +- ++ + Uninstall + 卸载 + diff --git a/0015-22.patch b/0015-22.patch new file mode 100644 index 0000000..c1a8a62 --- /dev/null +++ b/0015-22.patch @@ -0,0 +1,189 @@ +From: lixueman +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 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(); diff --git a/0016-25-upstream.patch b/0016-25-upstream.patch new file mode 100644 index 0000000..2e45536 --- /dev/null +++ b/0016-25-upstream.patch @@ -0,0 +1,121 @@ +From: lixueman +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 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 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; + } + diff --git a/0017-27.patch b/0017-27.patch new file mode 100644 index 0000000..dc66616 --- /dev/null +++ b/0017-27.patch @@ -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) { diff --git a/0018-update-changelog.patch b/0018-update-changelog.patch new file mode 100644 index 0000000..5506080 --- /dev/null +++ b/0018-update-changelog.patch @@ -0,0 +1,95 @@ +From: lixueman +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(""); +@@ -252,7 +252,7 @@ void ItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, + tipString += tr("path:") + url; + } + tipString += QString(""); +- 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) + { diff --git a/0019-32.patch b/0019-32.patch new file mode 100644 index 0000000..89dd1b7 --- /dev/null +++ b/0019-32.patch @@ -0,0 +1,150 @@ +From: lixueman +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 + #include + #include ++#include + + 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().at(0); ++ QMimeData *mimeData = new QMimeData; ++ ThumbNail *dragImage = new ThumbNail; ++ QDrag *drag = new QDrag(this); ++ QList 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 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)); + } + } + diff --git a/0020-43-upstream-Debian.patch b/0020-43-upstream-Debian.patch new file mode 100644 index 0000000..304ac3b --- /dev/null +++ b/0020-43-upstream-Debian.patch @@ -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 ++#include ++#include ++#include ++#include ++#include ++#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 ++ ++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 ++#include ++#include ++#include ++#include ++ ++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 . + */ + +-#ifndef PUSHBUTTON_H +-#define PUSHBUTTON_H ++#ifndef SPLITBARFRAME_H ++#define SPLITBARFRAME_H + #include + #include + #include +@@ -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 diff --git a/0021-48-wayland.patch b/0021-48-wayland.patch new file mode 100644 index 0000000..709e232 --- /dev/null +++ b/0021-48-wayland.patch @@ -0,0 +1,112 @@ +From: lixueman +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 + + 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 + #include ++#include + +-class LetterToolTip : public QDialog ++class LetterToolTip : public QWidget + { + Q_OBJECT + public: diff --git a/ukui-menu.spec b/ukui-menu.spec index 99c7a37..f8cb9d0 100644 --- a/ukui-menu.spec +++ b/ukui-menu.spec @@ -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 - 3.1.1-11 +- add patch from upstream + * Fri May 12 2023 peijiankang - 3.1.1-10 - add 0006-changelog.patch 0007-changelog.patch 0008-changelog.patch