From fcd2ef420a067ad1a204211fb3c6ef8b42d41b8f Mon Sep 17 00:00:00 2001 From: zhangyuanyuan1 Date: Thu, 22 Sep 2022 18:00:07 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20bug=20141204=20=E7=BD=91=E7=BB=9C?= =?UTF-8?q?=E9=A1=B9=E9=97=B4=E8=B7=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/list-items/listitem.cpp | 4 +++- src/frontend/list-items/wlanlistitem.cpp | 1 + src/frontend/tab-pages/tabpage.cpp | 2 ++ src/frontend/tab-pages/tabpage.h | 1 + src/frontend/tools/infobutton.cpp | 6 +++--- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/frontend/list-items/listitem.cpp b/src/frontend/list-items/listitem.cpp index e6809c1d..b7f70067 100644 --- a/src/frontend/list-items/listitem.cpp +++ b/src/frontend/list-items/listitem.cpp @@ -22,7 +22,8 @@ #define MAIN_LAYOUT_MARGINS 0,0,0,0 #define MAIN_LAYOUT_SPACING 0 -#define ITEM_FRAME_MARGINS 12,6,16,6 +#define ITEM_FRAME_MARGINS 12,4,16,4 + #define ITEM_FRAME_SPACING 8 #define FRAME_WIDTH 404 #define INFO_ICON_WIDTH 16 @@ -156,6 +157,7 @@ void ListItem::initUI() m_hItemLayout = new QHBoxLayout(m_itemFrame); m_hItemLayout->setContentsMargins(ITEM_FRAME_MARGINS); m_hItemLayout->setSpacing(ITEM_FRAME_SPACING); + m_hItemLayout->setAlignment(Qt::AlignHCenter); m_netButton = new RadioItemButton(m_itemFrame); m_nameLabel = new FixLabel(m_itemFrame); diff --git a/src/frontend/list-items/wlanlistitem.cpp b/src/frontend/list-items/wlanlistitem.cpp index 56b83382..b0b88ce4 100644 --- a/src/frontend/list-items/wlanlistitem.cpp +++ b/src/frontend/list-items/wlanlistitem.cpp @@ -311,6 +311,7 @@ void WlanListItem::initWlanUI() m_mainLayout->addWidget(m_pwdFrame); m_mainLayout->addWidget(m_autoConnectFrame); + m_mainLayout->addStretch(); m_pwdFrame->hide(); m_autoConnectFrame->hide(); diff --git a/src/frontend/tab-pages/tabpage.cpp b/src/frontend/tab-pages/tabpage.cpp index b7835788..b9cd27ae 100644 --- a/src/frontend/tab-pages/tabpage.cpp +++ b/src/frontend/tab-pages/tabpage.cpp @@ -81,6 +81,7 @@ void TabPage::initUI() // m_activatedNetLayout->setSpacing(NET_LAYOUT_SPACING); m_activatedNetLabel = new QLabel(m_activatedNetFrame); m_activatedNetLabel->setContentsMargins(TEXT_MARGINS); + m_activatedNetLabel->setFixedHeight(TEXT_HEIGHT); m_activatedNetLayout->addWidget(m_activatedNetLabel); m_activatedNetDivider = new Divider(this); @@ -93,6 +94,7 @@ void TabPage::initUI() m_inactivatedNetLabel = new QLabel(m_inactivatedNetFrame); m_inactivatedNetLabel->setContentsMargins(TEXT_MARGINS); + m_inactivatedNetLabel->setFixedHeight(TEXT_HEIGHT); // m_inactivatedNetListArea = new QScrollArea(m_inactivatedNetFrame); // m_inactivatedNetListArea->setFrameShape(QFrame::Shape::NoFrame); diff --git a/src/frontend/tab-pages/tabpage.h b/src/frontend/tab-pages/tabpage.h index a673d4a7..ae79047f 100644 --- a/src/frontend/tab-pages/tabpage.h +++ b/src/frontend/tab-pages/tabpage.h @@ -57,6 +57,7 @@ enum network_mode { #define NET_LAYOUT_SPACING 8 #define NET_LIST_SPACING 0 #define TEXT_MARGINS 16,0,0,0 +#define TEXT_HEIGHT 20 //#define SCROLL_AREA_HEIGHT 200 #define SETTINGS_LAYOUT_MARGINS 23,0,24,0 #define TRANSPARENT_COLOR QColor(0,0,0,0) diff --git a/src/frontend/tools/infobutton.cpp b/src/frontend/tools/infobutton.cpp index 1591ea12..62ff0d01 100644 --- a/src/frontend/tools/infobutton.cpp +++ b/src/frontend/tools/infobutton.cpp @@ -30,9 +30,9 @@ //#define FOREGROUND_COLOR_PRESS QColor(36,109,212,255) #define FOREGROUND_COLOR_BRIGHTTEXT qApp->palette().brightText().color() #define FOREGROUND_COLOR_HIGHLIGHT qApp->palette().highlight().color() -#define OUTER_PATH 8,8,16,16 -#define INNER_PATH 9,9,14,14 -#define TEXT_POS 14,5,16,16,0 +#define OUTER_PATH 8,10,16,16 +#define INNER_PATH 9,11,14,14 +#define TEXT_POS 14,7,16,16,0 #define BUTTON_SIZE 36,36