From 7afc241ff2982b763de630983865de1715a1e9a3 Mon Sep 17 00:00:00 2001 From: chenlelin Date: Tue, 21 Jul 2020 16:28:46 +0800 Subject: [PATCH] Change the style of setting button at left-down of mainwindow --- nmqrc.qrc | 2 +- res/x/setup.png | Bin 444 -> 2152 bytes src/mainwindow.cpp | 16 ++++++++-------- src/mainwindow.ui | 42 ++++++++++++++---------------------------- 4 files changed, 23 insertions(+), 37 deletions(-) diff --git a/nmqrc.qrc b/nmqrc.qrc index 69c4041d..b3a79529 100644 --- a/nmqrc.qrc +++ b/nmqrc.qrc @@ -1,6 +1,5 @@ - res/x/setup.png res/s/conning-b/1.png res/s/conning-b/2.png res/s/conning-b/3.png @@ -78,5 +77,6 @@ res/s/conning-s/10.png res/s/conning-s/11.png res/s/conning-s/12.png + res/x/setup.png diff --git a/res/x/setup.png b/res/x/setup.png index 718e9f6ef4e1975539751b8b34173f077d0663a5..fe242f89ca8be8b54c604ea34999ae85660e2072 100644 GIT binary patch literal 2152 zcmV-u2$%PXP) zaB^>EX>4U6ba`-PAZ2)IW&i+q+U-|cvg;@e{AU%j1SAj=%fVo(W(TwUY1xiX9_NwV zldq{Uu|)(HqFW#w)_?w<;V)bqOAJ}mN-ZVg$~9MRs94;ux;-i8?YaL+M;qPh!`Z-4 zdHwjW?dad2myZ`NW6*M|4|cS$9fs&Myj{sh_WHPX5_;bCln+C7-7BSDDg%f4EU7P#S`P67!lc>+NZ~2Wh_>ZpD)mp&zA!IwcJdDP4>KkelgUWQ^AU z-GF?lg?seR+8y}Z4t=`AvK$zp@@WIfo&JM%z8*N89`S7hASw^jIqo@!&AINgYqjJdZI&#X zSTQxTYOQij*aM}Os?}<(t#N1=sKHi4{|3#%OIq?GOIdWWr7o=_e0uKEOV@6__BME= zfo)=xp~FTUZKbecr&#kUYgu)*wXSU<)@GV{$}Cf-%{tr3+QI5Wd4V-LSmTW;@24kg z&<53u3G(ekoHH=SnZUR@0|;n#&Z1Gy?94f5u`(8gFq{kWw zeG=9zQ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Gvvh(nVK%lnP$yiJC7sJKb- zj4ey2;F;uMxf;>UqKE?9SccPxZWqb5ZjhwTF^N^4cjeIR0j2$G*#R5?o~*D6n`XWa zp&2t;Iam#$h}YIUJJC4wXT@)G7eE<8@5G^`;3JsnG!~UgYQ@X0000btnAdvConf->setFocusPolicy(Qt::NoFocus); QString txtAdvanced(tr("Advanced")); ui->btnAdvConf->setToolTip(txtAdvanced); - ui->lbBtnConfImg->setStyleSheet("QLabel{background-image:url(:/res/x/setup.png);}"); - ui->lbBtnConfBG->hide(); - ui->lbBtnConfBG->setStyleSheet(btnOffQss); + //ui->lbBtnConfImg->setStyleSheet("QLabel{background-image:url(:/res/x/setup.png);}"); + ui->btnConfImg->setStyleSheet("QPushButton{background-image:url(:/res/x/setup.png);}"); + //ui->btnConfImg->setIcon(QIcon::fromTheme("settings-app-symbolic.svg", QIcon(":/res/x/setup.png")) ); } // 初始化有线网列表 @@ -1755,12 +1755,12 @@ void MainWindow::on_btnAdvConf_clicked() void MainWindow::on_btnAdvConf_pressed() { - ui->lbBtnConfBG->setStyleSheet(btnOnQss); + //ui->lbBtnConfBG->setStyleSheet(btnOnQss); } void MainWindow::on_btnAdvConf_released() { - ui->lbBtnConfBG->setStyleSheet(btnOffQss); + //ui->lbBtnConfBG->setStyleSheet(btnOffQss); } void MainWindow::on_btnFlyMode_clicked() diff --git a/src/mainwindow.ui b/src/mainwindow.ui index 560d4b6d..c9492a52 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -66,32 +66,6 @@ - - - - 2 - 490 - 37 - 37 - - - - - - - - - - 10 - 498 - 22 - 22 - - - - - - @@ -303,6 +277,20 @@ Qt::Vertical + + + + 11 + 499 + 19 + 19 + + + + + + + btnConfImg lbFlyBG lbHotBG lbFlyImg @@ -310,8 +298,6 @@ lbBtnNetBG btnNet lbBtnWifiBG - lbBtnConfBG - lbBtnConfImg btnAdvConf btnHotspot btnFlyMode