فهرست منبع

UI: Fix preview state when minimizing to tray

Makes sure preview is properly enabled/disabled when minimizing to tray,
when restoring from tray, or when starting the program up minimized to
tray
jp9000 5 سال پیش
والد
کامیت
dff05d9fcc
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      UI/window-basic-main.cpp

+ 3 - 1
UI/window-basic-main.cpp

@@ -7180,8 +7180,10 @@ void OBSBasic::IconActivated(QSystemTrayIcon::ActivationReason reason)
 	AddProjectorMenuMonitors(studioProgramProjector, this,
 				 SLOT(OpenStudioProgramProjector()));
 
-	if (reason == QSystemTrayIcon::Trigger)
+	if (reason == QSystemTrayIcon::Trigger) {
+		EnablePreviewDisplay(previewEnabled && !isVisible());
 		ToggleShowHide();
+	}
 }
 
 void OBSBasic::SysTrayNotify(const QString &text,