From c2b9cb7af82dec0600e187081e49356ca2b67689 Mon Sep 17 00:00:00 2001 From: zhangjiaping Date: Fri, 9 Apr 2021 15:08:58 +0800 Subject: [PATCH] =?UTF-8?q?Fix(frontend):=20Width=20of=20scrollArea=20is?= =?UTF-8?q?=20not=20enough=20which=20caused=20some=20text=20displayed=20in?= =?UTF-8?q?completely.=20=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86=E5=8C=BA?= =?UTF-8?q?=E5=9F=9F=E9=A2=84=E7=95=99=E5=AE=BD=E5=BA=A6=E4=B8=8D=E5=A4=9F?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E7=9A=84=E6=8E=A7=E4=BB=B6=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=B8=8D=E5=85=A8=E5=92=8C=E5=87=BA=E7=8E=B0=E4=B8=8D=E5=BF=85?= =?UTF-8?q?=E8=A6=81=E7=9A=84=E6=BB=9A=E5=8A=A8=E6=9D=A1=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20Link:=20http://172.17.66.192/biz/bug-view-45037.htm?= =?UTF-8?q?l=20Link:=20http://172.17.66.192/biz/bug-view-45035.html?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/content-widget.cpp | 2 +- src/settings-widget.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/content-widget.cpp b/src/content-widget.cpp index 5e39292..e9ca58f 100644 --- a/src/content-widget.cpp +++ b/src/content-widget.cpp @@ -78,7 +78,7 @@ void ContentWidget::initUI() { m_resultDetail = new QWidget(m_resultDetailArea); m_listLyt = new QVBoxLayout(m_resultList); m_detailLyt = new QVBoxLayout(m_resultDetail); - m_resultList->setFixedWidth(240); + m_resultList->setFixedWidth(236); m_resultList->setFixedHeight(0); m_resultList->setStyleSheet("QWidget{background:transparent;}"); m_listLyt->setContentsMargins(0, 0, 12, 0); diff --git a/src/settings-widget.cpp b/src/settings-widget.cpp index e477d72..2293989 100644 --- a/src/settings-widget.cpp +++ b/src/settings-widget.cpp @@ -227,12 +227,12 @@ void SettingsWidget::setupBlackList(const QStringList& list) { Q_FOREACH(QString path, list) { FolderListItem * item = new FolderListItem(m_dirListWidget, path); m_dirListLyt->addWidget(item); - item->setMaximumWidth(this->width() - 52); + item->setMaximumWidth(this->width() - 68); connect(item, SIGNAL(onDelBtnClicked(const QString&)), this, SLOT(onBtnDelClicked(const QString&))); m_blockdirs ++; } this->resize(); - m_dirListWidget->setFixedWidth(this->width() - 52); + m_dirListWidget->setFixedWidth(this->width() - 68); // m_dirListLyt->addStretch(); } @@ -481,11 +481,11 @@ void SettingsWidget::resize() // this->setFixedSize(528, 515); // } if (m_blockdirs <= 4) { - m_dirListArea->setFixedHeight(32 * m_blockdirs); + m_dirListArea->setFixedHeight(32 * m_blockdirs + 4); m_dirListWidget->setFixedHeight(32 * m_blockdirs); } else { m_dirListWidget->setFixedHeight(32 * m_blockdirs); - m_dirListArea->setFixedHeight(32 * 4); + m_dirListArea->setFixedHeight(32 * 4 + 4); } this->setFixedSize(528, 410 + m_dirListArea->height()); }