mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-22 22:21:09 -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->setShortcutContext(Qt::ApplicationShortcut);
|
||||||
actionMinimize->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_M));
|
actionMinimize->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_M));
|
||||||
actionMinimize->setShortcutVisibleInContextMenu(true);
|
actionMinimize->setShortcutVisibleInContextMenu(true);
|
||||||
connect(actionMinimize,SIGNAL(triggered()),this,SLOT(showMinimized())) ;
|
connect(actionMinimize,SIGNAL(triggered()),this,SLOT(minimizeWindow())) ;
|
||||||
|
|
||||||
menuBar = new QMenuBar(this);
|
menuBar = new QMenuBar(this);
|
||||||
QMenu *fileMenu = menuBar->addMenu("");
|
QMenu *fileMenu = menuBar->addMenu("");
|
||||||
|
@ -698,6 +698,13 @@ void MainWindow::createMenuBar()
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(Q_OS_DARWIN)
|
||||||
|
void MainWindow::minimizeWindow()
|
||||||
|
{
|
||||||
|
setWindowState(windowState() | Qt::WindowMinimized);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void MainWindow::showBandwidthGraph()
|
void MainWindow::showBandwidthGraph()
|
||||||
{
|
{
|
||||||
if(_bandwidthGraph == NULL)
|
if(_bandwidthGraph == NULL)
|
||||||
|
|
|
@ -265,6 +265,10 @@ private slots:
|
||||||
void toggleVisibility(QSystemTrayIcon::ActivationReason e);
|
void toggleVisibility(QSystemTrayIcon::ActivationReason e);
|
||||||
void toggleVisibilitycontextmenu();
|
void toggleVisibilitycontextmenu();
|
||||||
|
|
||||||
|
#if defined(Q_OS_DARWIN)
|
||||||
|
void minimizeWindow();
|
||||||
|
#endif
|
||||||
|
|
||||||
/** Toolbar fns. */
|
/** Toolbar fns. */
|
||||||
void addFriend();
|
void addFriend();
|
||||||
//void newRsCollection();
|
//void newRsCollection();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue