ukui-menu/0011-.patch
peijiankang 3eb98cb553 add patch from openkylin
(cherry picked from commit 49080eb14485c039ea6bdf00f09cff10c0c98c9f)
2023-05-25 10:20:45 +08:00

431 lines
22 KiB
Diff

From: lixueman <lixueman@kylinos.cn>
Date: Thu, 18 Aug 2022 11:40:49 +0800
Subject: =?utf-8?b?5L+u5pS55YWo5bGP5byA5aeL6I+c5Y2V5Zu65a6a5Yiw5pS26JeP5LiN?=
=?utf-8?b?55Sf5pWI6Zeu6aKY?=
---
.../FileWatcher/convert_winid_to_desktop.cpp | 1 -
src/UserInterface/ListView/klistview.cpp | 13 ++++++++++---
src/UserInterface/ListView/klistview.h | 1 +
src/UserInterface/Other/scrollarea.cpp | 20 +++++---------------
src/UserInterface/Widget/full_commonuse_widget.cpp | 9 +++++----
src/UserInterface/Widget/full_commonuse_widget.h | 1 +
src/UserInterface/Widget/full_function_widget.cpp | 7 ++++---
src/UserInterface/Widget/full_function_widget.h | 1 +
src/UserInterface/Widget/full_letter_widget.cpp | 14 +++++++-------
src/UserInterface/Widget/full_letter_widget.h | 2 ++
.../Widget/full_searchresult_widget.cpp | 5 +++--
src/UserInterface/Widget/full_searchresult_widget.h | 1 +
src/UserInterface/full_mainwindow.cpp | 11 ++++++++++-
src/UserInterface/full_mainwindow.h | 2 ++
src/UserInterface/mainwindow.cpp | 1 +
src/UtilityFunction/Style/style.cpp | 6 ++++--
src/UtilityFunction/Style/style.h | 1 +
17 files changed, 58 insertions(+), 38 deletions(-)
diff --git a/src/BackProcess/FileWatcher/convert_winid_to_desktop.cpp b/src/BackProcess/FileWatcher/convert_winid_to_desktop.cpp
index cf17b36..f7bc939 100755
--- a/src/BackProcess/FileWatcher/convert_winid_to_desktop.cpp
+++ b/src/BackProcess/FileWatcher/convert_winid_to_desktop.cpp
@@ -18,7 +18,6 @@
#include "convert_winid_to_desktop.h"
#include "utility.h"
-#include <KWindowSystem>
#include <QFile>
#include <QDebug>
#include <QDir>
diff --git a/src/UserInterface/ListView/klistview.cpp b/src/UserInterface/ListView/klistview.cpp
index 3954bc9..fcf4480 100755
--- a/src/UserInterface/ListView/klistview.cpp
+++ b/src/UserInterface/ListView/klistview.cpp
@@ -69,14 +69,21 @@ void KListView::mouseMoveEvent(QMouseEvent *e)
void KListView::mousePressEvent(QMouseEvent *event)
{
- if (!(this->indexAt(event->pos()).isValid()) && event->button() == Qt::LeftButton) {
- Q_EMIT sendHideMainWindowSignal();
- } else {
+ if ((this->indexAt(event->pos()).isValid()) && event->button() == Qt::LeftButton) {
pressApp = listmodel->data(this->indexAt(event->pos()), Qt::DisplayRole);
}
return QListView::mousePressEvent(event);
}
+void KListView::mouseReleaseEvent(QMouseEvent *e)
+{
+ if (!(this->indexAt(e->pos()).isValid()) && e->button() == Qt::LeftButton) {
+ Q_EMIT sendHideMainWindowSignal();
+ } else {
+ return QListView::mouseReleaseEvent(e);
+ }
+}
+
void KListView::rightClickedSlot(const QPoint &pos)
{
if (!(this->selectionModel()->selectedIndexes().isEmpty())) {
diff --git a/src/UserInterface/ListView/klistview.h b/src/UserInterface/ListView/klistview.h
index e932fd2..37359b7 100755
--- a/src/UserInterface/ListView/klistview.h
+++ b/src/UserInterface/ListView/klistview.h
@@ -24,6 +24,7 @@ protected:
void paintEvent(QPaintEvent *e);
void mousePressEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *e);
+ void mouseReleaseEvent(QMouseEvent *e);
public:
void addData(QStringList data);
void updateData(QStringList data);
diff --git a/src/UserInterface/Other/scrollarea.cpp b/src/UserInterface/Other/scrollarea.cpp
index 65c26e5..2bb4d2d 100755
--- a/src/UserInterface/Other/scrollarea.cpp
+++ b/src/UserInterface/Other/scrollarea.cpp
@@ -74,23 +74,13 @@ void ScrollAreaWid::paintEvent(QPaintEvent *event)
ScrollArea::ScrollArea()
{
- // this->verticalScrollBar()->setVisible(false);
- // this->setFocusPolicy(Qt::NoFocus);
- //// this->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
- this->setFixedWidth(1330);
- // this->verticalScrollBar()->setContextMenuPolicy(Qt::NoContextMenu);
+ this->setFocusPolicy(Qt::NoFocus);
+ this->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
+ this->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
this->setFrameShape(QFrame::NoFrame);
- // this->verticalScrollBar()->setProperty("drawScrollBarGroove",false);
- // this->verticalScrollBar()->setAttribute(Qt::WA_TranslucentBackground, false);
- this->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
- this->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
this->verticalScrollBar()->setVisible(false);
- //滚动条设置
- QPalette p = this->verticalScrollBar()->palette();
- QColor color(255, 255, 255);
- color.setAlphaF(0.25);
- p.setColor(QPalette::Active, QPalette::Button, color);
- this->verticalScrollBar()->setPalette(p);
+ this->horizontalScrollBar()->setVisible(false);
+ this->setStyleSheet("QWidget{background:transparent;}");
}
void ScrollArea::setFocusToNextChild()
diff --git a/src/UserInterface/Widget/full_commonuse_widget.cpp b/src/UserInterface/Widget/full_commonuse_widget.cpp
index 26d86b5..6f138f1 100755
--- a/src/UserInterface/Widget/full_commonuse_widget.cpp
+++ b/src/UserInterface/Widget/full_commonuse_widget.cpp
@@ -48,11 +48,11 @@ void FullCommonUseWidget::initUi()
m_scrollArea = new ScrollArea();
m_scrollAreaWid = new ScrollAreaWid(this);
m_scrollAreaWid->setAttribute(Qt::WA_TranslucentBackground);
- m_scrollArea->setFixedSize(Style::m_applistWidWidth, Style::m_applistWidHeight);
+ m_scrollArea->setFixedSize(Style::m_applistAreaWidth, Style::m_applistWidHeight);
m_scrollArea->setWidget(m_scrollAreaWid);
+ m_scrollArea->setAlignment(Qt::AlignCenter);
m_scrollArea->setStyleSheet("QWidget{background:transparent;}");
m_scrollArea->setWidgetResizable(true);
- m_scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
m_scrollAreaWidLayout = new QVBoxLayout(m_scrollAreaWid);
m_scrollAreaWidLayout->setContentsMargins(0, 0, 0, 0);
m_scrollAreaWidLayout->setSpacing(10);
@@ -146,9 +146,10 @@ void FullCommonUseWidget::initAppListWidget()
m_listView = new FullListView(this, 0);
m_listView->installEventFilter(this);
m_scrollAreaWidLayout->addWidget(m_listView);
- m_listView->setFixedWidth(m_scrollArea->width());
+ m_listView->setFixedWidth(m_scrollAreaWid->width());
connect(m_listView, &FullListView::sendItemClickedSignal, this, &FullCommonUseWidget::execApplication);
connect(m_listView, &FullListView::sendUpdateAppListSignal, this, &FullCommonUseWidget::updateListViewSlot);
+ connect(m_listView, &FullListView::sendCollectViewUpdate, this, &FullCommonUseWidget::sendCollectViewUpdate);
connect(m_listView, &FullListView::sendHideMainWindowSignal, this, &FullCommonUseWidget::sendHideMainWindowSignal);
connect(m_listView, &FullListView::sendSetslidebar, this, &FullCommonUseWidget::onSetSlider);
}
@@ -281,7 +282,7 @@ void FullCommonUseWidget::updateListView()
void FullCommonUseWidget::repaintWidget()
{
- m_scrollArea->setFixedSize(Style::m_applistWidWidth, Style::m_applistWidHeight);
+ m_scrollArea->setFixedSize(Style::m_applistAreaWidth, Style::m_applistWidHeight);
m_scrollAreaWidLayout->removeWidget(m_listView);
m_listView->setParent(nullptr);
delete m_listView;
diff --git a/src/UserInterface/Widget/full_commonuse_widget.h b/src/UserInterface/Widget/full_commonuse_widget.h
index 9f60538..d13ad45 100755
--- a/src/UserInterface/Widget/full_commonuse_widget.h
+++ b/src/UserInterface/Widget/full_commonuse_widget.h
@@ -134,6 +134,7 @@ Q_SIGNALS:
void changeScrollValue(int value, int maximumValue);
void setFocusToSideWin();
void sendUpdateOtherView();
+ void sendCollectViewUpdate();
};
#endif // FULLCOMMONUSEWIDGET_H
diff --git a/src/UserInterface/Widget/full_function_widget.cpp b/src/UserInterface/Widget/full_function_widget.cpp
index 7cc8464..b07133f 100755
--- a/src/UserInterface/Widget/full_function_widget.cpp
+++ b/src/UserInterface/Widget/full_function_widget.cpp
@@ -45,7 +45,7 @@ void FullFunctionWidget::initUi()
m_iconListWid = new QWidget(this);
m_iconListWid->setAttribute(Qt::WA_TranslucentBackground);
m_iconListWid->setAutoFillBackground(false);
- m_applistWid->setFixedSize(Style::m_applistWidWidth, Style::m_applistWidHeight);
+ m_applistWid->setFixedSize(Style::m_applistAreaWidth, Style::m_applistWidHeight);
m_iconListWid->setFixedSize(Style::m_leftWidWidth, Style::m_applistWidHeight);
m_verticalScrollBar = new QScrollBar(m_scrollArea);
m_verticalScrollBar->installEventFilter(this);
@@ -111,10 +111,10 @@ void FullFunctionWidget::initAppListWidget()
layout->setContentsMargins(0, 0, 0, 0);
m_applistWid->setLayout(layout);
m_scrollArea = new ScrollArea;
- m_scrollArea->setStyleSheet("background:transparent");
m_scrollAreaWid = new ScrollAreaWid(this);
m_scrollAreaWid->setAttribute(Qt::WA_TranslucentBackground);
m_scrollArea->setFixedSize(m_applistWid->width(), m_applistWid->height());
+ m_scrollAreaWid->adjustSize();
m_scrollArea->setWidget(m_scrollAreaWid);
m_scrollArea->setWidgetResizable(true);
m_scrollAreaWidLayout = new QVBoxLayout(m_scrollAreaWid);
@@ -211,6 +211,7 @@ void FullFunctionWidget::insertAppList(QStringList desktopfplist)
connect(listview, &FullListView::sendItemClickedSignal, this, &FullFunctionWidget::execApplication);
connect(listview, &FullListView::sendHideMainWindowSignal, this, &FullFunctionWidget::sendHideMainWindowSignal);
connect(listview, &FullListView::sendUpdateAppListSignal, this, &FullFunctionWidget::sendUpdateCommonView);
+ connect(listview, &FullListView::sendCollectViewUpdate, this, &FullFunctionWidget::sendCollectViewUpdate);
}
/**
@@ -473,7 +474,7 @@ void FullFunctionWidget::setFunctionBtnGeometry()
void FullFunctionWidget::repaintWidget()
{
- m_applistWid->setFixedSize(Style::m_applistWidWidth, Style::m_applistWidHeight);
+ m_applistWid->setFixedSize(Style::m_applistAreaWidth, Style::m_applistWidHeight);
m_iconListWid->setFixedSize(Style::m_leftWidWidth, Style::m_applistWidHeight);
m_scrollArea->setFixedSize(m_applistWid->width(), m_applistWid->height());
updateAppListView();
diff --git a/src/UserInterface/Widget/full_function_widget.h b/src/UserInterface/Widget/full_function_widget.h
index 931104c..22e2a99 100755
--- a/src/UserInterface/Widget/full_function_widget.h
+++ b/src/UserInterface/Widget/full_function_widget.h
@@ -197,6 +197,7 @@ Q_SIGNALS:
void sendUpdateCommonView();
+ void sendCollectViewUpdate();
};
#endif // FULLFUNCTIONWIDGET_H
diff --git a/src/UserInterface/Widget/full_letter_widget.cpp b/src/UserInterface/Widget/full_letter_widget.cpp
index 1ebc2c5..64e7537 100755
--- a/src/UserInterface/Widget/full_letter_widget.cpp
+++ b/src/UserInterface/Widget/full_letter_widget.cpp
@@ -77,12 +77,10 @@ void FullLetterWidget::initAppListWidget()
// layout->setContentsMargins(0,0,0,0);
// m_applistWid->setLayout(layout);
m_scrollArea = new ScrollArea();
- m_scrollArea->setStyleSheet("background:transparent");
m_scrollAreaWid = new ScrollAreaWid(this);
m_scrollArea->setWidget(m_scrollAreaWid);
- m_scrollArea->setFixedSize(Style::m_applistWidWidth, Style::m_applistWidHeight);
- m_scrollArea->setWidgetResizable(true);
- // m_scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+ m_scrollAreaWid->setFixedWidth(Style::m_applistWidWidth);
+ m_scrollArea->setFixedSize(Style::m_applistAreaWidth, Style::m_applistWidHeight);
m_scrollAreaWidLayout = new QVBoxLayout;
m_scrollAreaWidLayout->setContentsMargins(0, 0, 0, 0);
m_scrollAreaWidLayout->setSpacing(10);
@@ -211,6 +209,7 @@ void FullLetterWidget::fillAppList()
connect(listview, &FullListView::sendItemClickedSignal, this, &FullLetterWidget::execApplication);
connect(listview, &FullListView::sendHideMainWindowSignal, this, &FullLetterWidget::sendHideMainWindowSignal);
connect(listview, &FullListView::sendUpdateAppListSignal, this, &FullLetterWidget::sendUpdateCommonView);
+ connect(listview, &FullListView::sendCollectViewUpdate, this, &FullLetterWidget::sendCollectViewUpdate);
}
}
@@ -304,12 +303,12 @@ void FullLetterWidget::resizeScrollAreaControls()
rowcount = listview->model()->rowCount() / dividend;
}
- listview->setFixedSize(m_scrollArea->width(), listview->gridSize().height()*rowcount);
+ listview->setFixedHeight(listview->gridSize().height()*rowcount);
areaHeight += listview->height() + 50;
row++;
}
- m_scrollArea->widget()->setFixedSize(m_scrollArea->width(), areaHeight - 10);
+ m_scrollArea->widget()->setFixedHeight(areaHeight - 10);
}
/**
@@ -480,7 +479,8 @@ void FullLetterWidget::setLetterBtnGeometry()
void FullLetterWidget::repaintWidget()
{
m_letterListWid->setFixedSize(Style::m_leftWidWidth, Style::m_applistWidHeight);
- m_scrollArea->setFixedSize(Style::m_applistWidWidth, Style::m_applistWidHeight);
+ m_scrollArea->setFixedSize(Style::m_applistAreaWidth, Style::m_applistWidHeight);
+ m_scrollAreaWid->setFixedWidth(Style::m_applistWidWidth);
updateAppListView();
}
diff --git a/src/UserInterface/Widget/full_letter_widget.h b/src/UserInterface/Widget/full_letter_widget.h
index 662408b..9799ee4 100755
--- a/src/UserInterface/Widget/full_letter_widget.h
+++ b/src/UserInterface/Widget/full_letter_widget.h
@@ -199,6 +199,8 @@ Q_SIGNALS:
void changeScrollValue(int value, int maximumValue);
void sendUpdateCommonView();
+
+ void sendCollectViewUpdate();
};
#endif // FULLLETTERWIDGET_H
diff --git a/src/UserInterface/Widget/full_searchresult_widget.cpp b/src/UserInterface/Widget/full_searchresult_widget.cpp
index efdee49..e42d151 100755
--- a/src/UserInterface/Widget/full_searchresult_widget.cpp
+++ b/src/UserInterface/Widget/full_searchresult_widget.cpp
@@ -47,7 +47,7 @@ void FullSearchResultWidget::initUi()
m_scrollArea->setStyleSheet("background:transparent");
m_scrollAreaWid = new ScrollAreaWid(this);
m_scrollAreaWid->setAttribute(Qt::WA_TranslucentBackground);
- m_scrollArea->setFixedSize(Style::m_applistWidWidth, Style::m_applistWidHeight);
+ m_scrollArea->setFixedSize(Style::m_applistAreaWidth, Style::m_applistWidHeight);
m_scrollArea->setWidget(m_scrollAreaWid);
m_scrollArea->setWidgetResizable(true);
m_scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
@@ -139,6 +139,7 @@ void FullSearchResultWidget::initAppListWidget()
connect(m_listView, &FullListView::sendItemClickedSignal, this, &FullSearchResultWidget::execApplication);
connect(m_listView, &FullListView::sendHideMainWindowSignal, this, &FullSearchResultWidget::sendHideMainWindowSignal);
connect(m_listView, &FullListView::sendSetslidebar, this, &FullSearchResultWidget::onSetSlider);
+ connect(m_listView, &FullListView::sendCollectViewUpdate, this, &FullSearchResultWidget::sendCollectViewUpdate);
}
void FullSearchResultWidget::fillAppList()
@@ -228,7 +229,7 @@ void FullSearchResultWidget::selectFirstItemTab()
void FullSearchResultWidget::repaintWidget()
{
- m_scrollArea->setFixedSize(Style::m_applistWidWidth, Style::m_applistWidHeight);
+ m_scrollArea->setFixedSize(Style::m_applistAreaWidth, Style::m_applistWidHeight);
resizeScrollAreaControls();
m_scrollAreaWidHeight = m_scrollAreaWid->height() + 1;
initVerticalScrollBar();
diff --git a/src/UserInterface/Widget/full_searchresult_widget.h b/src/UserInterface/Widget/full_searchresult_widget.h
index 43c1955..e557b7d 100755
--- a/src/UserInterface/Widget/full_searchresult_widget.h
+++ b/src/UserInterface/Widget/full_searchresult_widget.h
@@ -114,6 +114,7 @@ Q_SIGNALS:
*/
void sendHideMainWindowSignal();
void setFocusToSideWin();
+ void sendCollectViewUpdate();
};
#endif // FULLSEARCHRESULTWIDGET_H
diff --git a/src/UserInterface/full_mainwindow.cpp b/src/UserInterface/full_mainwindow.cpp
index dfd692f..3a3e2cd 100755
--- a/src/UserInterface/full_mainwindow.cpp
+++ b/src/UserInterface/full_mainwindow.cpp
@@ -216,11 +216,15 @@ void FullMainWindow::initConnect()
connect(this, &FullMainWindow::sendSetFocusToResult, m_fullResultPage, &FullSearchResultWidget::selectFirstItemTab);
// connect(m_fullSelectMenuButton, &QToolButton::clicked, this, &FullMainWindow::on_fullSelectMenuButton_clicked);
connect(m_fullCommonPage, &FullCommonUseWidget::sendUpdateOtherView, this, &FullMainWindow::sendUpdateOtherView);
+ connect(m_fullCommonPage, &FullCommonUseWidget::sendCollectViewUpdate, this, &FullMainWindow::sendCollectViewUpdate);
connect(m_fullFunctionPage, &FullFunctionWidget::sendUpdateCommonView, m_fullCommonPage, &FullCommonUseWidget::updateListViewSlot);
+ connect(m_fullFunctionPage, &FullFunctionWidget::sendCollectViewUpdate, this, &FullMainWindow::sendCollectViewUpdate);
connect(m_fullLetterPage, &FullLetterWidget::sendUpdateCommonView, m_fullCommonPage, &FullCommonUseWidget::updateListViewSlot);
+ connect(m_fullLetterPage, &FullLetterWidget::sendCollectViewUpdate, this, &FullMainWindow::sendCollectViewUpdate);
connect(m_fullCommonPage, &FullCommonUseWidget::sendHideMainWindowSignal, this, &FullMainWindow::fullWindowHide);
connect(m_fullFunctionPage, &FullFunctionWidget::sendHideMainWindowSignal, this, &FullMainWindow::fullWindowHide);
connect(m_fullLetterPage, &FullLetterWidget::sendHideMainWindowSignal, this, &FullMainWindow::fullWindowHide);
+ connect(m_fullResultPage, &FullSearchResultWidget::sendCollectViewUpdate, this, &FullMainWindow::sendCollectViewUpdate);
connect(m_fullResultPage, &FullSearchResultWidget::sendHideMainWindowSignal, this, &FullMainWindow::fullWindowHide);
connect(m_dropDownMenu, &MenuBox::triggered, this, &FullMainWindow::on_fullSelectMenuButton_triggered);
connect(m_dropDownMenu, &MenuBox::sendMainWinActiveSignal, [ = ]() {
@@ -511,10 +515,15 @@ void FullMainWindow::searchAppSlot(QString arg)
void FullMainWindow::mousePressEvent(QMouseEvent *event)
{
resetEditline();
+ return QMainWindow::mousePressEvent(event);
+}
+
+void FullMainWindow::mouseReleaseEvent(QMouseEvent *event)
+{
if (event->button() == Qt::LeftButton) {
this->hide();
}
- return QMainWindow::mousePressEvent(event);
+ return QMainWindow::mouseReleaseEvent(event);
}
void FullMainWindow::recvSearchResult(QVector<QStringList> arg)
diff --git a/src/UserInterface/full_mainwindow.h b/src/UserInterface/full_mainwindow.h
index 9592169..1f7bc24 100755
--- a/src/UserInterface/full_mainwindow.h
+++ b/src/UserInterface/full_mainwindow.h
@@ -35,6 +35,7 @@ Q_SIGNALS:
void sendSetFocusToLet();
void sendSetFocusToResult();
void sendUpdateOtherView();
+ void sendCollectViewUpdate();
private Q_SLOTS:
@@ -53,6 +54,7 @@ protected:
bool event(QEvent *event);
bool eventFilter(QObject *watched, QEvent *event);
void mousePressEvent(QMouseEvent *event);
+ void mouseReleaseEvent(QMouseEvent *event);
void changeStyle();
void initConnect();
void initTabOrder();
diff --git a/src/UserInterface/mainwindow.cpp b/src/UserInterface/mainwindow.cpp
index 8427b34..c45be17 100755
--- a/src/UserInterface/mainwindow.cpp
+++ b/src/UserInterface/mainwindow.cpp
@@ -216,6 +216,7 @@ void MainWindow::initSignalConnect()
connect(m_searchAppThread, &SearchAppThread::sendSearchResult, this, &MainWindow::recvSearchResult);
connect(m_fullWindow, &FullMainWindow::showNormalWindow, this, &MainWindow::showNormalWindowSlot);
connect(m_fullWindow, &FullMainWindow::sendUpdateOtherView, this, &MainWindow::updateMinAllView);
+ connect(m_fullWindow, &FullMainWindow::sendCollectViewUpdate, this, &MainWindow::updateCollectView);
connect(m_minSelectButton, &QToolButton::clicked, this, &MainWindow::on_minSelectButton_clicked);
connect(m_dropDownMenu, &MenuBox::triggered, this, &MainWindow::on_selectMenuButton_triggered);
connect(m_dropDownMenu, &MenuBox::sendMainWinActiveSignal, [ = ]() {
diff --git a/src/UtilityFunction/Style/style.cpp b/src/UtilityFunction/Style/style.cpp
index 53378bd..70198af 100755
--- a/src/UtilityFunction/Style/style.cpp
+++ b/src/UtilityFunction/Style/style.cpp
@@ -56,6 +56,7 @@ int Style::LeftSpaceIconText = 0;
int Style::LeftSpaceBetweenItem = 0;
//应用列表栏
int Style::m_applistWidWidth = 0;
+int Style::m_applistAreaWidth = 0;
int Style::m_applistWidHeight = 0;
int Style::AppListIconSize = 0;
int Style::AppListBigIconSize = 0;
@@ -217,10 +218,11 @@ void Style::initWidStyle()
rightViewHeight = 470;
LeftSpaceIconText = 14;
m_applistWidWidth = m_availableScreenWidth / 1.25;
- m_applistWidWidth = m_applistWidWidth - (m_applistWidWidth % m_applistGridSizeWidth) + 1;
+ m_applistWidWidth = m_applistWidWidth - (m_applistWidWidth % m_applistGridSizeWidth) + 2;
m_applistWidHeight = m_availableScreenHeight - 120;
- m_applistWidHeight = m_applistWidHeight - (m_applistWidHeight % m_applistGridSizeWidth) + 1;
+ m_applistWidHeight = m_applistWidHeight - (m_applistWidHeight % m_applistGridSizeWidth);
m_leftWidWidth = (m_availableScreenWidth - m_applistWidWidth) / 2 + 1;
+ m_applistAreaWidth = m_applistWidWidth + 20;
} else {
ScreenWidth = QApplication::primaryScreen()->geometry().width();
ScreenHeight = QApplication::primaryScreen()->geometry().height();
diff --git a/src/UtilityFunction/Style/style.h b/src/UtilityFunction/Style/style.h
index a74e0da..547a072 100755
--- a/src/UtilityFunction/Style/style.h
+++ b/src/UtilityFunction/Style/style.h
@@ -111,6 +111,7 @@ public:
static int LeftSpaceBetweenItem; //item间距
//应用列表栏
static int m_applistWidWidth; //宽度
+ static int m_applistAreaWidth;
static int m_applistWidHeight; //高度
static int AppListIconSize; //图标大小
static int AppListBigIconSize;