mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-22 20:44:15 +00:00
Process Mac toolbar toggling event
This commit is contained in:
parent
c0520146e9
commit
310433fb54
13
src/GUI.cpp
13
src/GUI.cpp
@ -624,7 +624,8 @@ void GUI::on_actionCreate_torrent_triggered() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool GUI::event(QEvent * e) {
|
bool GUI::event(QEvent * e) {
|
||||||
if(e->type() == QEvent::WindowStateChange) {
|
switch(e->type()) {
|
||||||
|
case QEvent::WindowStateChange: {
|
||||||
qDebug("Window change event");
|
qDebug("Window change event");
|
||||||
//Now check to see if the window is minimised
|
//Now check to see if the window is minimised
|
||||||
if(isMinimized()) {
|
if(isMinimized()) {
|
||||||
@ -639,6 +640,16 @@ bool GUI::event(QEvent * e) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
#ifdef Q_WS_MAC
|
||||||
|
case QEvent::ToolBarChange: {
|
||||||
|
actionTop_tool_bar->setChecked(toolBar->isVisible());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return QMainWindow::event(e);
|
return QMainWindow::event(e);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user