Fix visibility

This commit is contained in:
reionwong 2021-09-08 00:12:09 +08:00
parent d9a5064ea6
commit ffe9852909

View file

@ -320,7 +320,8 @@ void MainWindow::onPositionChanged()
{ {
initScreens(); initScreens();
if (m_settings->visibility() == DockSettings::AlwaysHide) { if (m_settings->visibility() == DockSettings::AlwaysHide ||
m_settings->visibility() == DockSettings::IntellHide) {
setVisible(false); setVisible(false);
initSlideWindow(); initSlideWindow();
// Setting geometry needs to be displayed, otherwise it will be invalid. // Setting geometry needs to be displayed, otherwise it will be invalid.
@ -329,17 +330,7 @@ void MainWindow::onPositionChanged()
updateViewStruts(); updateViewStruts();
m_hideTimer->start(); m_hideTimer->start();
} } else if (m_settings->visibility() == DockSettings::AlwaysShow) {
if (m_settings->visibility() == DockSettings::AlwaysShow) {
setVisible(false);
initSlideWindow();
setVisible(true);
setGeometry(windowRect());
updateViewStruts();
}
if (m_settings->visibility() == DockSettings::IntellHide) {
setVisible(false); setVisible(false);
initSlideWindow(); initSlideWindow();
setVisible(true); setVisible(true);