Commit ca3d7a96 authored by Calvin Buckley's avatar Calvin Buckley 🤔
Browse files

on macOS, a window menu with zoom and minimize

This also needs a window list.
parent f169763e
......@@ -556,6 +556,16 @@ void QCGTopLevel::createActions()
_configureAction->setStatusTip(tr("Configure QCachegrind"));
connect(_configureAction, SIGNAL(triggered()), this, SLOT(configure()));
// window menu actions
_minimizeAction = new QAction(tr("&Minimize"), this);
_minimizeAction->setShortcut(Qt::CTRL + Qt::Key_M);
connect(_minimizeAction, &QAction::triggered, this, &QWidget::showMinimized);
_zoomAction = new QAction(tr("&Zoom"), this);
// on macOS, zoom doesn't have exactly the same semantics as maximize
// (it creates the best fit), but maximize is the usual copout answer
connect(_zoomAction, &QAction::triggered, this, &QWidget::showMaximized);
// help menu actions
_aboutAction = new QAction(tr("&About QCachegrind..."), this);
......@@ -624,6 +634,12 @@ void QCGTopLevel::createMenu()
#ifdef Q_OS_MAC
QMenu* windowMenu = mBar->addMenu(tr("&Window"));
QMenu* helpMenu = mBar->addMenu(tr("&Help"));
......@@ -230,6 +230,7 @@ private:
QAction *_layoutRestore, *_layoutSave;
QAction *_upAction, *_forwardAction, *_backAction;
QAction *_configureAction, *_aboutAction, *_aboutQtAction;
QAction *_minimizeAction, *_zoomAction;
QComboBox* _eventTypeBox;
TraceFunction* _function;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment