mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-01 17:46:52 -04:00
Fixed minimize on macOS with CTRL + M shortcut
This commit is contained in:
parent
3615ebf05e
commit
79977a0c37
2 changed files with 12 additions and 1 deletions
|
@ -673,7 +673,7 @@ void MainWindow::createMenuBar()
|
|||
actionMinimize->setShortcutContext(Qt::ApplicationShortcut);
|
||||
actionMinimize->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_M));
|
||||
actionMinimize->setShortcutVisibleInContextMenu(true);
|
||||
connect(actionMinimize,SIGNAL(triggered()),this,SLOT(showMinimized())) ;
|
||||
connect(actionMinimize,SIGNAL(triggered()),this,SLOT(minimizeWindow())) ;
|
||||
|
||||
menuBar = new QMenuBar(this);
|
||||
QMenu *fileMenu = menuBar->addMenu("");
|
||||
|
@ -698,6 +698,13 @@ void MainWindow::createMenuBar()
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_DARWIN)
|
||||
void MainWindow::minimizeWindow()
|
||||
{
|
||||
setWindowState(windowState() | Qt::WindowMinimized);
|
||||
}
|
||||
#endif
|
||||
|
||||
void MainWindow::showBandwidthGraph()
|
||||
{
|
||||
if(_bandwidthGraph == NULL)
|
||||
|
|
|
@ -265,6 +265,10 @@ private slots:
|
|||
void toggleVisibility(QSystemTrayIcon::ActivationReason e);
|
||||
void toggleVisibilitycontextmenu();
|
||||
|
||||
#if defined(Q_OS_DARWIN)
|
||||
void minimizeWindow();
|
||||
#endif
|
||||
|
||||
/** Toolbar fns. */
|
||||
void addFriend();
|
||||
//void newRsCollection();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue