Merge branch 'z2209bug' into 'dbus-interface'
rc6 走查bug 140440 140441 140442 140438 See merge request kylin-desktop/kylin-nm!711
This commit is contained in:
commit
b907594389
|
@ -22,9 +22,9 @@
|
|||
|
||||
#define MAIN_LAYOUT_MARGINS 0,0,0,0
|
||||
#define MAIN_LAYOUT_SPACING 0
|
||||
#define ITEM_FRAME_MARGINS 16,6,16,6
|
||||
#define ITEM_FRAME_SPACING 10
|
||||
#define FRAME_WIDTH 395
|
||||
#define ITEM_FRAME_MARGINS 12,6,16,6
|
||||
#define ITEM_FRAME_SPACING 8
|
||||
#define FRAME_WIDTH 404
|
||||
#define INFO_ICON_WIDTH 16
|
||||
#define INFO_ICON_HEIGHT 16
|
||||
#define LIGHT_HOVER_COLOR QColor(240,240,240,255)
|
||||
|
@ -155,7 +155,7 @@ void ListItem::initUI()
|
|||
|
||||
m_hItemLayout = new QHBoxLayout(m_itemFrame);
|
||||
m_hItemLayout->setContentsMargins(ITEM_FRAME_MARGINS);
|
||||
// m_hItemLayout->setSpacing(ITEM_FRAME_SPACING);
|
||||
m_hItemLayout->setSpacing(ITEM_FRAME_SPACING);
|
||||
|
||||
m_netButton = new RadioItemButton(m_itemFrame);
|
||||
m_nameLabel = new FixLabel(m_itemFrame);
|
||||
|
|
|
@ -375,7 +375,7 @@ void MainWindow::resetWindowPosition()
|
|||
return;
|
||||
}
|
||||
|
||||
#define MARGIN 4
|
||||
#define MARGIN 8
|
||||
#define PANEL_TOP 1
|
||||
#define PANEL_LEFT 2
|
||||
#define PANEL_RIGHT 3
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#define WINDOW_HEIGHT 602
|
||||
#define ICON_SIZE 22,22
|
||||
#define TITLE_LAYOUT_MARGINS 9,9,0,0
|
||||
#define CENTER_LAYOUT_MARGINS 24,0,0,0
|
||||
#define CENTER_LAYOUT_MARGINS 24,0,24,0
|
||||
#define BOTTOM_LAYOUT_MARGINS 24,0,24,0
|
||||
#define BOTTOM_LAYOUT_SPACING 16
|
||||
#define PAGE_LAYOUT_SPACING 1
|
||||
|
@ -328,7 +328,7 @@ void NetDetail::initUI()
|
|||
|
||||
pageFrame = new QFrame(this);
|
||||
QHBoxLayout *pageLayout = new QHBoxLayout(pageFrame);
|
||||
pageLayout->setSpacing(PAGE_LAYOUT_SPACING);
|
||||
// pageLayout->setSpacing(PAGE_LAYOUT_SPACING);
|
||||
|
||||
// TabBar
|
||||
// m_netTabBar = new KTabBar(KTabBarStyle::SegmentDark, this);
|
||||
|
@ -354,9 +354,7 @@ void NetDetail::initUI()
|
|||
}
|
||||
}
|
||||
|
||||
pageLayout->addStretch();
|
||||
pageLayout->addWidget(m_netTabBar);
|
||||
pageLayout->addStretch();
|
||||
pageLayout->addWidget(m_netTabBar, Qt::AlignCenter);
|
||||
|
||||
// TabBar关联选项卡页面
|
||||
connect(m_netTabBar, SIGNAL(currentChanged(int)), this, SLOT(currentRowChangeSlot(int)));
|
||||
|
|
|
@ -792,7 +792,7 @@ void LanPage::initUI()
|
|||
m_activatedLanListWidget->setPalette(pal);
|
||||
m_inactivatedLanListWidget->setPalette(pal);
|
||||
|
||||
m_settingsBtn->installEventFilter(this);
|
||||
m_settingsLabel->installEventFilter(this);
|
||||
m_netSwitch->installEventFilter(this);
|
||||
}
|
||||
|
||||
|
@ -1241,7 +1241,7 @@ void LanPage::setWiredDeviceEnable(const QString& devName, bool enable)
|
|||
|
||||
bool LanPage::eventFilter(QObject *watched, QEvent *event)
|
||||
{
|
||||
if (watched == m_settingsBtn) {
|
||||
if (watched == m_settingsLabel) {
|
||||
if (event->type() == QEvent::MouseButtonRelease) {
|
||||
onShowControlCenter();
|
||||
}
|
||||
|
|
|
@ -116,10 +116,16 @@ void TabPage::initUI()
|
|||
m_settingsLayout = new QHBoxLayout(m_settingsFrame);
|
||||
m_settingsLayout->setContentsMargins(SETTINGS_LAYOUT_MARGINS);
|
||||
|
||||
m_settingsBtn = new KBorderlessButton(m_settingsFrame);
|
||||
m_settingsBtn->setText(tr("Settings"));
|
||||
// m_settingsBtn = new KBorderlessButton(m_settingsFrame);
|
||||
// m_settingsBtn->setText(tr("Settings"));
|
||||
// m_settingsLayout->addWidget(m_settingsBtn);
|
||||
|
||||
m_settingsLayout->addWidget(m_settingsBtn);
|
||||
m_settingsLabel = new KyLable(m_settingsFrame);
|
||||
m_settingsLabel->setCursor(Qt::PointingHandCursor);
|
||||
m_settingsLabel->setText(tr("Settings"));
|
||||
m_settingsLabel->setScaledContents(true);
|
||||
|
||||
m_settingsLayout->addWidget(m_settingsLabel);
|
||||
m_settingsLayout->addStretch();
|
||||
m_settingsFrame->setLayout(m_settingsLayout);
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#define TABPAGE_H
|
||||
|
||||
#include "divider.h"
|
||||
#include "kylable.h"
|
||||
#include <QVBoxLayout>
|
||||
#include <QHBoxLayout>
|
||||
#include <QFormLayout>
|
||||
|
@ -36,7 +37,7 @@
|
|||
#include "firewalldialog.h"
|
||||
#include "kwidget.h"
|
||||
#include "kswitchbutton.h"
|
||||
#include "kborderlessbutton.h"
|
||||
//#include "kborderlessbutton.h"
|
||||
|
||||
using namespace kdk;
|
||||
|
||||
|
@ -57,14 +58,14 @@ enum network_mode {
|
|||
#define NET_LIST_SPACING 0
|
||||
#define TEXT_MARGINS 16,0,0,0
|
||||
//#define SCROLL_AREA_HEIGHT 200
|
||||
#define SETTINGS_LAYOUT_MARGINS 24,0,24,0
|
||||
#define SETTINGS_LAYOUT_MARGINS 23,0,24,0
|
||||
#define TRANSPARENT_COLOR QColor(0,0,0,0)
|
||||
#define INACTIVE_AREA_MIN_HEIGHT 170
|
||||
#define ACTIVE_AREA_MAX_HEIGHT 92
|
||||
|
||||
#define MAX_ITEMS 4
|
||||
#define MAX_WIDTH 408
|
||||
#define MIN_WIDTH 396
|
||||
#define MAX_WIDTH 412
|
||||
#define MIN_WIDTH 404
|
||||
|
||||
#define SCROLL_STEP 4
|
||||
|
||||
|
@ -141,7 +142,8 @@ protected:
|
|||
|
||||
QFrame * m_settingsFrame = nullptr;
|
||||
QHBoxLayout * m_settingsLayout = nullptr;
|
||||
KBorderlessButton *m_settingsBtn = nullptr;
|
||||
KyLable * m_settingsLabel = nullptr;
|
||||
// KBorderlessButton *m_settingsBtn = nullptr;
|
||||
|
||||
//临时增加的下拉框选择网卡区域
|
||||
QFrame * m_deviceFrame = nullptr;
|
||||
|
|
|
@ -82,7 +82,7 @@ WlanPage::WlanPage(QWidget *parent) : TabPage(parent)
|
|||
|
||||
bool WlanPage::eventFilter(QObject *w, QEvent *e)
|
||||
{
|
||||
if (w == m_settingsBtn) {
|
||||
if (w == m_settingsLabel) {
|
||||
if (e->type() == QEvent::MouseButtonRelease) {
|
||||
//ZJP_TODO 打开控制面板
|
||||
qDebug() << LOG_FLAG <<"recive event show control center";
|
||||
|
@ -134,7 +134,7 @@ void WlanPage::initWlanUI()
|
|||
m_activatedNetListWidget->setPalette(pal);
|
||||
m_inactivatedNetListWidget->setPalette(pal);
|
||||
|
||||
m_settingsBtn->installEventFilter(this);
|
||||
m_settingsLabel->installEventFilter(this);
|
||||
m_netSwitch->installEventFilter(this);
|
||||
}
|
||||
|
||||
|
|
|
@ -66,14 +66,15 @@ void KyLable::setPressColor()
|
|||
{
|
||||
QColor hightlight = this->palette().color(QPalette::Active,QPalette::Highlight);
|
||||
QColor mix = this->palette().color(QPalette::Active,QPalette::BrightText);
|
||||
m_foregroundColor = mixColor(hightlight, mix, 0.05);
|
||||
m_foregroundColor = mixColor(hightlight, mix, 0.2);
|
||||
}
|
||||
|
||||
void KyLable::setHoverColor()
|
||||
{
|
||||
QColor hightlight = this->palette().color(QPalette::Active,QPalette::Highlight);
|
||||
QColor mix = this->palette().color(QPalette::Active,QPalette::BrightText);
|
||||
m_foregroundColor = mixColor(hightlight, mix, 0.2);
|
||||
// QColor hightlight = this->palette().color(QPalette::Active,QPalette::Highlight);
|
||||
// QColor mix = this->palette().color(QPalette::Active,QPalette::BrightText);
|
||||
// m_foregroundColor = mixColor(hightlight, mix, 0.2);
|
||||
m_foregroundColor = this->palette().color(QPalette::Active,QPalette::Highlight);
|
||||
}
|
||||
|
||||
void KyLable::setNormalColor()
|
||||
|
|
Loading…
Reference in New Issue