fix(frontend): Recently opened files displayed incorrectly in homepage.
Description: 修复主页面最近打开列表文件显示和排版有误的问题 Log: 修复主页面最近打开列表文件显示和排版有误的问题
This commit is contained in:
parent
a4e9d7f2c6
commit
75f7ef25f2
|
@ -335,6 +335,11 @@ void ContentWidget::initHomePage() {
|
||||||
item->setFixedSize(265, 48);
|
item->setFixedSize(265, 48);
|
||||||
layout->addWidget(item, j / 2, j % 2);
|
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 {
|
} else {
|
||||||
itemWidget->setFixedHeight(136);
|
itemWidget->setFixedHeight(136);
|
||||||
QHBoxLayout * layout = new QHBoxLayout(itemWidget);
|
QHBoxLayout * layout = new QHBoxLayout(itemWidget);
|
||||||
|
|
|
@ -53,6 +53,7 @@ void HomePageItem::setupUi(const int& type, const QString& path) {
|
||||||
g_object_unref(desktopAppInfo);
|
g_object_unref(desktopAppInfo);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case SearchListView::ResType::Best:
|
||||||
case SearchListView::ResType::Content:
|
case SearchListView::ResType::Content:
|
||||||
case SearchListView::ResType::Dir:
|
case SearchListView::ResType::Dir:
|
||||||
case SearchListView::ResType::File: {
|
case SearchListView::ResType::File: {
|
||||||
|
@ -87,6 +88,7 @@ void HomePageItem::setupUi(const int& type, const QString& path) {
|
||||||
this->setToolTip(name);
|
this->setToolTip(name);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case SearchListView::ResType::Best :
|
||||||
case SearchListView::ResType::Content:
|
case SearchListView::ResType::Content:
|
||||||
case SearchListView::ResType::Dir :
|
case SearchListView::ResType::Dir :
|
||||||
case SearchListView::ResType::File : {
|
case SearchListView::ResType::File : {
|
||||||
|
|
|
@ -307,6 +307,7 @@ bool SearchDetailView::openAction(const int& type, const QString& path) {
|
||||||
return true;
|
return true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case SearchListView::ResType::Best:
|
||||||
case SearchListView::ResType::Content:
|
case SearchListView::ResType::Content:
|
||||||
case SearchListView::ResType::Dir:
|
case SearchListView::ResType::Dir:
|
||||||
case SearchListView::ResType::File: {
|
case SearchListView::ResType::File: {
|
||||||
|
|
Loading…
Reference in New Issue