mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Fix crash on OS-switch of dark/light mode (#12786)
At least for Mac and Linux. Windows needs testing and possibly its own fix.
This commit is contained in:
parent
eb35e26016
commit
3af906e9f3
@ -1746,7 +1746,9 @@ bool GuiView::event(QEvent * e)
|
||||
}
|
||||
|
||||
case QEvent::ApplicationPaletteChange: {
|
||||
// runtime switch from/to dark mode
|
||||
// runtime switch from/to dark mode (Mac OS)
|
||||
// We need to update metrics here to avoid a crash (#12786)
|
||||
theBufferList().changed(true);
|
||||
refillToolbars();
|
||||
return QMainWindow::event(e);
|
||||
}
|
||||
@ -1772,6 +1774,13 @@ bool GuiView::event(QEvent * e)
|
||||
return QMainWindow::event(e);
|
||||
}
|
||||
|
||||
case QEvent::StyleChange: {
|
||||
// This might be a change from dark to light mode (Linux)
|
||||
// We need to update metrics here to avoid a crash (#12786)
|
||||
theBufferList().changed(true);
|
||||
return QMainWindow::event(e);
|
||||
}
|
||||
|
||||
default:
|
||||
return QMainWindow::event(e);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user