forked from openkylin/ukui-search
Merge pull request #134 from mammonsama666/homepage
fix(frontend): Recently opened files displayed incorrectly in homepage.
This commit is contained in:
commit
133a36ebe1
|
@ -346,6 +346,11 @@ void ContentWidget::initHomePage() {
|
|||
item->setFixedSize(265, 48);
|
||||
layout->addWidget(item, j / 2, j % 2);
|
||||
}
|
||||
if (lists.at(i).length() == 1) {
|
||||
QWidget * emptyItem = new QWidget(itemWidget);
|
||||
emptyItem->setFixedSize(265, 48); //占位用widget,只有一项时在右方补全
|
||||
layout->addWidget(emptyItem, 1, 2);
|
||||
}
|
||||
} else {
|
||||
itemWidget->setFixedHeight(136);
|
||||
QHBoxLayout * layout = new QHBoxLayout(itemWidget);
|
||||
|
|
|
@ -53,6 +53,7 @@ void HomePageItem::setupUi(const int& type, const QString& path) {
|
|||
g_object_unref(desktopAppInfo);
|
||||
break;
|
||||
}
|
||||
case SearchListView::ResType::Best:
|
||||
case SearchListView::ResType::Content:
|
||||
case SearchListView::ResType::Dir:
|
||||
case SearchListView::ResType::File: {
|
||||
|
@ -87,6 +88,7 @@ void HomePageItem::setupUi(const int& type, const QString& path) {
|
|||
this->setToolTip(name);
|
||||
break;
|
||||
}
|
||||
case SearchListView::ResType::Best :
|
||||
case SearchListView::ResType::Content:
|
||||
case SearchListView::ResType::Dir :
|
||||
case SearchListView::ResType::File : {
|
||||
|
|
|
@ -308,6 +308,7 @@ bool SearchDetailView::openAction(const int& type, const QString& path) {
|
|||
return true;
|
||||
break;
|
||||
}
|
||||
case SearchListView::ResType::Best:
|
||||
case SearchListView::ResType::Content:
|
||||
case SearchListView::ResType::Dir:
|
||||
case SearchListView::ResType::File: {
|
||||
|
|
Loading…
Reference in New Issue