From a6b573205e09c42c33ccee2a892f00ea90858b15 Mon Sep 17 00:00:00 2001 From: iaom <18504285112@163.com> Date: Mon, 16 Aug 2021 19:34:40 +0800 Subject: [PATCH] Update UI. --- frontend/control/stack-pages/search-page-section.cpp | 6 ++++-- frontend/control/stack-pages/search-result-page.cpp | 1 + frontend/main.cpp | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/frontend/control/stack-pages/search-page-section.cpp b/frontend/control/stack-pages/search-page-section.cpp index 1edb2ed..548be2d 100644 --- a/frontend/control/stack-pages/search-page-section.cpp +++ b/frontend/control/stack-pages/search-page-section.cpp @@ -167,7 +167,9 @@ void DetailArea::initUi() this->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); this->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); this->setWidgetResizable(true); - this->setFixedSize(368, 516); + this->setFixedSize(376, 516); +// this->setStyleSheet("QScrollArea{border:2px solid red;}"); + this->setContentsMargins(0,0,0,0); m_detailWidget = new DetailWidget(this); this->setWidget(m_detailWidget); this->hide(); @@ -330,7 +332,7 @@ void DetailWidget::paintEvent(QPaintEvent *event) QPainter p(this); style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this); - QRect rect = this->rect().adjusted(0, 0, -8, 0); + QRect rect = this->rect().adjusted(0, 0, 0, 0); p.setRenderHint(QPainter::Antialiasing); // 反锯齿; p.setBrush(opt.palette.color(QPalette::Text)); p.setOpacity(DETAIL_WIDGET_TRANSPARENT); diff --git a/frontend/control/stack-pages/search-result-page.cpp b/frontend/control/stack-pages/search-result-page.cpp index 45b2b27..19afdfe 100644 --- a/frontend/control/stack-pages/search-result-page.cpp +++ b/frontend/control/stack-pages/search-result-page.cpp @@ -115,6 +115,7 @@ void SearchResultPage::initUi() m_hlayout->addWidget(m_resultArea); m_hlayout->addWidget(m_detailArea); + m_hlayout->setSpacing(0); this->setLayout(m_hlayout); // m_splitter->addWidget(m_resultArea); // m_splitter->addWidget(m_detailArea); diff --git a/frontend/main.cpp b/frontend/main.cpp index 578d28a..97ea715 100644 --- a/frontend/main.cpp +++ b/frontend/main.cpp @@ -39,6 +39,7 @@ #include "libsearch.h" #include "global-settings.h" #include "ukui-search-dbus-service.h" +#include "plugin-manager.h" using namespace Zeeker; @@ -262,6 +263,7 @@ int main(int argc, char *argv[]) { qDebug() << "Load translations file" << QLocale() << "failed!"; } + PluginManager::getInstance(); //set main window to the center of screen MainWindow *w = new MainWindow; UkuiSearchDbusServices dbusService(w);