Skip to content

Commit ac489b2

Browse files
committed
Merge #9130: Mention the new network toggle functionality in the tooltip.
1260c11 Mention the new network toggle functionality in the tooltip. (Pavel Janík)
2 parents 55b2edd + 1260c11 commit ac489b2

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/qt/bitcoingui.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -713,13 +713,19 @@ void BitcoinGUI::updateNetworkState()
713713
default: icon = ":/icons/connect_4"; break;
714714
}
715715

716+
QString tooltip;
717+
716718
if (clientModel->getNetworkActive()) {
717-
connectionsControl->setToolTip(tr("%n active connection(s) to Bitcoin network", "", count));
719+
tooltip = tr("%n active connection(s) to Bitcoin network", "", count) + QString(".<br>") + tr("Click to disable network activity.");
718720
} else {
719-
connectionsControl->setToolTip(tr("Network activity disabled"));
721+
tooltip = tr("Network activity disabled.") + QString("<br>") + tr("Click to enable network activity again.");
720722
icon = ":/icons/network_disabled";
721723
}
722724

725+
// Don't word-wrap this (fixed-width) tooltip
726+
tooltip = QString("<nobr>") + tooltip + QString("</nobr>");
727+
connectionsControl->setToolTip(tooltip);
728+
723729
connectionsControl->setPixmap(platformStyle->SingleColorIcon(icon).pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE));
724730
}
725731

0 commit comments

Comments
 (0)