Skip to content

Commit 9ae1e6d

Browse files
committed
Fix tooltip color scheme for all stylesheet modes
Also fix grammer for connections.
1 parent e959d76 commit 9ae1e6d

File tree

4 files changed

+30
-6
lines changed

4 files changed

+30
-6
lines changed

src/qt/bitcoingui.cpp

+17-3
Original file line numberDiff line numberDiff line change
@@ -553,12 +553,12 @@ void BitcoinGUI::createToolBars()
553553
// Use a red color for the toolbars background if on testnet.
554554
if (GetBoolArg("-testnet"))
555555
{
556-
toolbar2->setStyleSheet("background-color:qlineargradient(x1: 0, y1: 0, x2: 0.5, y2: 0.5,stop: 0 darkRed, stop: 1 darkRed)");
556+
toolbar2->setStyleSheet("background-color:darkRed");
557557
toolbar3->setStyleSheet("background-color:darkRed");
558558
}
559559
else
560560
{
561-
toolbar2->setStyleSheet("background-color:qlineargradient(x1: 0, y1: 0, x2: 0.5, y2: 0.5,stop: 0 rgb(65,0,127), stop: 1 rgb(65,0,127))");
561+
toolbar2->setStyleSheet("background-color:rgb(65,0,127)");
562562
toolbar3->setStyleSheet("background-color:rgb(65,0,127)");
563563
}
564564

@@ -734,7 +734,21 @@ void BitcoinGUI::setNumConnections(int count)
734734
default: icon = ":/icons/connect_4"; break;
735735
}
736736
labelConnectionsIcon->setPixmap(QIcon(icon).pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE));
737-
labelConnectionsIcon->setToolTip(tr("%1 active connection(s) to Gridcoin network").arg(count));
737+
738+
if (count == 0)
739+
{
740+
labelConnectionsIcon->setToolTip(tr("No active connections to the Gridcoin network. "
741+
"If this persists more than a few minutes, please check your configuration "
742+
"and your network connectivity.").arg(count));
743+
}
744+
else if (count == 1)
745+
{
746+
labelConnectionsIcon->setToolTip(tr("%1 active connection to the Gridcoin network").arg(count));
747+
}
748+
else
749+
{
750+
labelConnectionsIcon->setToolTip(tr("%1 active connections to the Gridcoin network").arg(count));
751+
}
738752
}
739753

740754
void BitcoinGUI::setNumBlocks(int count, int nTotalBlocks)

src/qt/res/stylesheets/dark_stylesheet.qss

+6-2
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ QToolTip {
145145
border: none;
146146
}
147147

148-
149148
QTableView{
150149
background-color: rgb(49,54,59);
151150
color:white;
@@ -369,14 +368,15 @@ QCheckBox{
369368
border:none;
370369
padding-top:1.25em;
371370
min-width:8em;
372-
height:100%;
371+
height:100%;
373372
color: white;
374373
}
375374

376375
#toolbar2 {
377376
border:none;
378377
min-width:1.625em;
379378
max-width:3em;
379+
color: white;
380380
}
381381

382382
#toolbar3 {
@@ -401,6 +401,10 @@ QToolBar#toolbar2 QLabel{
401401
qproperty-alignment: AlignCenter;
402402
}
403403

404+
QToolBar#toolbar2 QToolTip {
405+
color:white
406+
}
407+
404408
QToolBar#toolbar3 QLabel{
405409
margin:0.5em;
406410
}

src/qt/res/stylesheets/light_stylesheet.qss

+6-1
Original file line numberDiff line numberDiff line change
@@ -359,14 +359,15 @@ QListWidget{
359359
border:none;
360360
padding-top:1.25em;
361361
min-width:8em;
362-
height:100%;
362+
height:100%;
363363
color: black;
364364
}
365365

366366
#toolbar2 {
367367
border:none;
368368
min-width:1.625em;
369369
max-width:3em;
370+
color: white;
370371
}
371372

372373
#toolbar3 {
@@ -391,6 +392,10 @@ QToolBar#toolbar2 QLabel{
391392
qproperty-alignment: AlignCenter;
392393
}
393394

395+
QToolBar#toolbar2 QToolTip {
396+
color:white
397+
}
398+
394399
QToolBar#toolbar3 QLabel{
395400
margin:0.5em;
396401
}

src/qt/res/stylesheets/native_stylesheet.qss

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ QMainWindow {
77
/* Main Window*/
88

99
#toolbar {
10+
border:none;
1011
padding-top:1.25em;
1112
min-width:8em;
1213
height:100%;

0 commit comments

Comments
 (0)