mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-13 00:33:09 -07:00
Should fix toolbar toggling on mac
This commit is contained in:
parent
1ed565d8e5
commit
52f25c44eb
1 changed files with 2 additions and 3 deletions
|
@ -645,13 +645,12 @@ bool GUI::event(QEvent * e) {
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_WS_MAC
|
||||||
case QEvent::ToolBarChange: {
|
case QEvent::ToolBarChange: {
|
||||||
qDebug("MAC: Received a toolbar change event!")
|
qDebug("MAC: Received a toolbar change event!")
|
||||||
e->accept();
|
bool ret = QMainWindow::event(e);
|
||||||
const bool is_visible = toolBar->isVisible();
|
const bool is_visible = toolBar->isVisible();
|
||||||
qDebug("MAC: new toolbar visibility is %d", (int)is_visible);
|
qDebug("MAC: new toolbar visibility is %d", (int)is_visible);
|
||||||
actionTop_tool_bar->setChecked(is_visible);
|
actionTop_tool_bar->setChecked(is_visible);
|
||||||
Preferences::setToolbarDisplayed(is_visible);
|
Preferences::setToolbarDisplayed(is_visible);
|
||||||
return true;
|
return ret;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue