qt: Use GUIUtil::bringToFront where possible
This commit is contained in:
parent
5796671e1d
commit
6fc21aca6d
2 changed files with 7 additions and 27 deletions
|
@ -667,10 +667,7 @@ void BitcoinGUI::aboutClicked()
|
||||||
|
|
||||||
void BitcoinGUI::showDebugWindow()
|
void BitcoinGUI::showDebugWindow()
|
||||||
{
|
{
|
||||||
rpcConsole->showNormal();
|
GUIUtil::bringToFront(rpcConsole);
|
||||||
rpcConsole->show();
|
|
||||||
rpcConsole->raise();
|
|
||||||
rpcConsole->activateWindow();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void BitcoinGUI::showDebugWindowActivateConsole()
|
void BitcoinGUI::showDebugWindowActivateConsole()
|
||||||
|
@ -1152,24 +1149,11 @@ void BitcoinGUI::showNormalIfMinimized(bool fToggleHidden)
|
||||||
if(!clientModel)
|
if(!clientModel)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// activateWindow() (sometimes) helps with keyboard focus on Windows
|
if (!isHidden() && !isMinimized() && !GUIUtil::isObscured(this) && fToggleHidden) {
|
||||||
if (isHidden())
|
|
||||||
{
|
|
||||||
show();
|
|
||||||
activateWindow();
|
|
||||||
}
|
|
||||||
else if (isMinimized())
|
|
||||||
{
|
|
||||||
showNormal();
|
|
||||||
activateWindow();
|
|
||||||
}
|
|
||||||
else if (GUIUtil::isObscured(this))
|
|
||||||
{
|
|
||||||
raise();
|
|
||||||
activateWindow();
|
|
||||||
}
|
|
||||||
else if(fToggleHidden)
|
|
||||||
hide();
|
hide();
|
||||||
|
} else {
|
||||||
|
GUIUtil::bringToFront(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BitcoinGUI::toggleHidden()
|
void BitcoinGUI::toggleHidden()
|
||||||
|
|
|
@ -292,9 +292,7 @@ void WalletView::usedSendingAddresses()
|
||||||
if(!walletModel)
|
if(!walletModel)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
usedSendingAddressesPage->show();
|
GUIUtil::bringToFront(usedSendingAddressesPage);
|
||||||
usedSendingAddressesPage->raise();
|
|
||||||
usedSendingAddressesPage->activateWindow();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void WalletView::usedReceivingAddresses()
|
void WalletView::usedReceivingAddresses()
|
||||||
|
@ -302,9 +300,7 @@ void WalletView::usedReceivingAddresses()
|
||||||
if(!walletModel)
|
if(!walletModel)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
usedReceivingAddressesPage->show();
|
GUIUtil::bringToFront(usedReceivingAddressesPage);
|
||||||
usedReceivingAddressesPage->raise();
|
|
||||||
usedReceivingAddressesPage->activateWindow();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void WalletView::showProgress(const QString &title, int nProgress)
|
void WalletView::showProgress(const QString &title, int nProgress)
|
||||||
|
|
Loading…
Reference in a new issue