From 0e26f520c40a7211bed5df91bdd31ec5ed35d86a Mon Sep 17 00:00:00 2001 From: jzxc95 <907297917@qq.com> Date: Thu, 11 Nov 2021 19:47:46 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E6=BB=9A=E5=8A=A8=E6=AD=A5?= =?UTF-8?q?=E9=95=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/tab-pages/wlanpage.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/frontend/tab-pages/wlanpage.cpp b/src/frontend/tab-pages/wlanpage.cpp index b2f93059..cb8c800f 100644 --- a/src/frontend/tab-pages/wlanpage.cpp +++ b/src/frontend/tab-pages/wlanpage.cpp @@ -11,6 +11,7 @@ #define EMPTY_SSID "emptyssid" #define LOG_FLAG "[WlanPage]" #define LAN_PAGE_INDEX 0 +#define SCROLL_STEP 4 WlanPage::WlanPage(QWidget *parent) : TabPage(parent) { @@ -83,6 +84,9 @@ void WlanPage::initWlanUI() m_inactivatedNetListWidget->setSpacing(NET_LIST_SPACING); m_inactivatedNetListWidget->setFrameShape(QFrame::Shape::NoFrame); m_inactivatedNetListWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + m_inactivatedNetListWidget->setVerticalScrollMode(QAbstractItemView::ScrollMode::ScrollPerPixel); + m_inactivatedNetListWidget->verticalScrollBar()->setSingleStep(SCROLL_STEP); + addWlanMoreItem(); m_inactivatedAreaLayout->addWidget(m_inactivatedNetListWidget); @@ -1377,6 +1381,7 @@ void WlanPage::addWlanMoreItem() m_hiddenWlanWidget->setFixedHeight(NORMAL_HEIGHT); m_hiddenItem = new QListWidgetItem(m_inactivatedNetListWidget); + m_hiddenItem->setSizeHint(QSize(m_inactivatedNetListWidget->width(), m_hiddenWlanWidget->height())); m_inactivatedNetListWidget->addItem(m_hiddenItem); m_inactivatedNetListWidget->setItemWidget(m_hiddenItem, m_hiddenWlanWidget); return;