diff --git a/src/content-widget.cpp b/src/content-widget.cpp
index 01b4d32..4aab233 100644
--- a/src/content-widget.cpp
+++ b/src/content-widget.cpp
@@ -28,8 +28,13 @@ ContentWidget::ContentWidget(QWidget * parent):QStackedWidget(parent)
{
initUI();
initListView();
-// m_quicklyOpenList<<"/usr/share/applications/peony.desktop"<<"/usr/share/applications/ukui-control-center.desktop"<<"Background/背景/更改壁纸";
- m_quicklyOpenList<<"/usr/share/applications/peony.desktop"<<"/usr/share/applications/ukui-control-center.desktop"<<"/usr/share/applications/ksc-defender.desktop";
+ //快速入口应用列表
+// m_quicklyOpenList<<"/usr/share/applications/peony.desktop"<<"/usr/share/applications/ukui-control-center.desktop"<<"/usr/share/applications/ksc-defender.desktop";
+ m_quicklyOpenList << "/usr/share/applications/ksc-defender.desktop"
+ << "/usr/share/applications/ukui-notebook.desktop"
+ << "/usr/share/applications/eom.desktop"
+ << "/usr/share/applications/pluma.desktop"
+ << "/usr/share/applications/claws-mail.desktop" ;
}
ContentWidget::~ContentWidget()
@@ -353,9 +358,10 @@ void ContentWidget::initHomePage() {
commonlyList = map.value("Commonly");
QStringList recentlyList;
recentlyList = map.value("Recently");
- lists.append(commonlyList);
- lists.append(recentlyList);
+
lists.append(m_quicklyOpenList);
+ lists.append(recentlyList);
+ lists.append(commonlyList);
for (int i = 0; i < lists.count(); i++) {
if (lists.at(i).isEmpty())
@@ -390,7 +396,7 @@ void ContentWidget::initHomePage() {
itemWidget->setLayout(layout);
int shownItem = lists.at(i).length();
Q_FOREACH(QString path, lists.at(i)){
- if (i && QString::compare(FileUtils::getAppName(path),"Unknown App") == 0) {
+ if (i == 0 && QString::compare(FileUtils::getAppName(path),"Unknown App") == 0) {
shownItem --;
continue;
}
@@ -403,7 +409,7 @@ void ContentWidget::initHomePage() {
emptyItem->setFixedSize(100, 100); //占位用widget,少于5项会补全后方占位
layout->addWidget(emptyItem);
}
- if (i && shownItem) titleLabel->setText(tr("Open Quickly"));
+ if (i == 0 && shownItem) titleLabel->setText(tr("Open Quickly"));
else titleLabel->setText(tr("Commonly Used"));
}
itemWidgetLyt->setSpacing(6);
diff --git a/src/control/home-page-item.cpp b/src/control/home-page-item.cpp
index 3f2f75d..8343a4b 100644
--- a/src/control/home-page-item.cpp
+++ b/src/control/home-page-item.cpp
@@ -123,8 +123,9 @@ void HomePageItem::setupUi(const int& type, const QString& path) {
} else if (type == ItemType::Quick) {
QIcon icon = FileUtils::getAppIcon(path);
m_iconlabel->setPixmap(icon.pixmap(icon.actualSize(QSize(48, 48))));
- m_namelabel->setText(FileUtils::getAppName(path));
- this->setToolTip(FileUtils::getAppName(path));
+ QString name = FileUtils::getAppName(path);
+ m_namelabel->setText(m_namelabel->fontMetrics().elidedText(name, Qt::ElideRight, 96));
+ this->setToolTip(name);
} else {
QIcon icon = FileUtils::getAppIcon(path);
m_iconlabel->setPixmap(icon.pixmap(icon.actualSize(QSize(48, 48))));
diff --git a/src/control/home-page-item.h b/src/control/home-page-item.h
index dbcb130..84fa765 100644
--- a/src/control/home-page-item.h
+++ b/src/control/home-page-item.h
@@ -36,9 +36,9 @@ public:
~HomePageItem();
enum ItemType { //homepage中item的类型,包括常用应用、最近打开、快捷打开
- Common,
+ Quick,
Recent,
- Quick
+ Common
};
protected:
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index f0ec91b..229dfcf 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -126,6 +126,7 @@ MainWindow::MainWindow(QWidget *parent) :
clearSearchResult();
this->moveToPanel();
this->show();
+ this->m_searchLayout->focusIn(); //打开主界面时输入框夺焦,可直接输入
this->raise();
this->activateWindow();
}
@@ -256,6 +257,7 @@ void MainWindow::bootOptionsFilter(QString opt)
clearSearchResult();
this->moveToPanel();
this->show();
+ this->m_searchLayout->focusIn();
this->raise();
this->activateWindow();
// m_search_result_thread->start();
diff --git a/translations/ukui-search/zh_CN.ts b/translations/ukui-search/zh_CN.ts
index 50347d5..f704d7f 100644
--- a/translations/ukui-search/zh_CN.ts
+++ b/translations/ukui-search/zh_CN.ts
@@ -11,7 +11,7 @@
- 快速
+ 快速入口