qt: Use GUIUtil::bringToFront where possible

This commit is contained in:
João Barbosa committed 2018-11-05 11:21:50 +00:00
1 parent 5796671e1d
commit 6fc21aca6d
2 files changed
+7 -27

No files matched your search

+5 -21
View File
@@ -667,10 +667,7 @@ void BitcoinGUI::aboutClicked()
void BitcoinGUI::showDebugWindow()
{
rpcConsole->showNormal();
rpcConsole->show();
rpcConsole->raise();
rpcConsole->activateWindow();
GUIUtil::bringToFront(rpcConsole);
}
void BitcoinGUI::showDebugWindowActivateConsole()
@@ -1152,24 +1149,11 @@ void BitcoinGUI::showNormalIfMinimized(bool fToggleHidden)
if(!clientModel)
return;
// activateWindow() (sometimes) helps with keyboard focus on Windows
if (isHidden())
{
show();
activateWindow();
}
else if (isMinimized())
{
showNormal();
activateWindow();
}
else if (GUIUtil::isObscured(this))
{
raise();
activateWindow();
}
else if(fToggleHidden)
if (!isHidden() && !isMinimized() && !GUIUtil::isObscured(this) && fToggleHidden) {
hide();
} else {
GUIUtil::bringToFront(this);
}
}
void BitcoinGUI::toggleHidden()
+2 -6
View File
@@ -292,9 +292,7 @@ void WalletView::usedSendingAddresses()
if(!walletModel)
return;
usedSendingAddressesPage->show();
usedSendingAddressesPage->raise();
usedSendingAddressesPage->activateWindow();
GUIUtil::bringToFront(usedSendingAddressesPage);
}
void WalletView::usedReceivingAddresses()
@@ -302,9 +300,7 @@ void WalletView::usedReceivingAddresses()
if(!walletModel)
return;
usedReceivingAddressesPage->show();
usedReceivingAddressesPage->raise();
usedReceivingAddressesPage->activateWindow();
GUIUtil::bringToFront(usedReceivingAddressesPage);
}
void WalletView::showProgress(const QString &title, int nProgress)