mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Show main window with click on system icon when the main window is minimized.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4688 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
379927a846
commit
a124c928d5
@ -1209,16 +1209,16 @@ void MainWindow::closeEvent(QCloseEvent *e)
|
||||
|
||||
void MainWindow::updateMenu()
|
||||
{
|
||||
toggleVisibilityAction->setText(isVisible() ? tr("Hide") : tr("Show"));
|
||||
toggleVisibilityAction->setText(isVisible() && !isMinimized() ? tr("Hide") : tr("Show"));
|
||||
}
|
||||
|
||||
void MainWindow::toggleVisibility(QSystemTrayIcon::ActivationReason e)
|
||||
{
|
||||
if(e == QSystemTrayIcon::Trigger || e == QSystemTrayIcon::DoubleClick){
|
||||
if(isHidden()){
|
||||
if (e == QSystemTrayIcon::Trigger || e == QSystemTrayIcon::DoubleClick) {
|
||||
if (isHidden() || isMinimized()) {
|
||||
show();
|
||||
if(isMinimized()){
|
||||
if(isMaximized()){
|
||||
if (isMinimized()) {
|
||||
if (isMaximized()) {
|
||||
showMaximized();
|
||||
}else{
|
||||
showNormal();
|
||||
@ -1226,7 +1226,7 @@ void MainWindow::toggleVisibility(QSystemTrayIcon::ActivationReason e)
|
||||
}
|
||||
raise();
|
||||
activateWindow();
|
||||
}else{
|
||||
} else {
|
||||
hide();
|
||||
}
|
||||
}
|
||||
@ -1277,7 +1277,7 @@ void MainWindow::trayIconTransfersClicked(QSystemTrayIcon::ActivationReason e)
|
||||
|
||||
void MainWindow::toggleVisibilitycontextmenu()
|
||||
{
|
||||
if (isVisible())
|
||||
if (isVisible() && !isMinimized())
|
||||
hide();
|
||||
else
|
||||
show();
|
||||
|
Loading…
Reference in New Issue
Block a user