mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-09-20 04:42:18 +02:00
Revert "UI: Match Windows taskbar state to tray icon"
This reverts commit d442fda3fc
.
This commit is contained in:
parent
959dbb64ed
commit
ebb093b8a3
@ -57,9 +57,6 @@ set(CMAKE_INCLUDE_CURRENT_DIR TRUE)
|
||||
set(CMAKE_AUTOMOC TRUE)
|
||||
|
||||
find_package(Qt5Svg ${FIND_MODE})
|
||||
if(WIN32)
|
||||
find_package(Qt5WinExtras ${FIND_MODE})
|
||||
endif()
|
||||
find_package(Qt5Xml ${FIND_MODE})
|
||||
|
||||
find_package(FFmpeg REQUIRED COMPONENTS avcodec avutil avformat)
|
||||
@ -388,8 +385,6 @@ if(WIN32)
|
||||
set_target_properties(obs
|
||||
PROPERTIES
|
||||
OUTPUT_NAME "obs${_output_suffix}")
|
||||
target_link_libraries(obs
|
||||
Qt5::WinExtras)
|
||||
endif()
|
||||
|
||||
target_link_libraries(obs
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 3.3 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.9 KiB |
@ -12,8 +12,6 @@
|
||||
<file>images/obs.png</file>
|
||||
<file>images/obs_paused.png</file>
|
||||
<file>images/tray_active.png</file>
|
||||
<file>images/paused.png</file>
|
||||
<file>images/active.png</file>
|
||||
<file>images/expand.svg</file>
|
||||
<file>images/unlocked.svg</file>
|
||||
<file>images/locked.svg</file>
|
||||
|
@ -1837,11 +1837,6 @@ void OBSBasic::OBSInit()
|
||||
SystemTray(true);
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
taskBtn->setWindow(windowHandle());
|
||||
taskProg->setRange(0, 1);
|
||||
#endif
|
||||
|
||||
bool has_last_version = config_has_user_value(App()->GlobalConfig(),
|
||||
"General", "LastVersion");
|
||||
bool first_run =
|
||||
@ -5392,13 +5387,6 @@ inline void OBSBasic::OnActivate()
|
||||
App()->IncrementSleepInhibition();
|
||||
UpdateProcessPriority();
|
||||
|
||||
#ifdef _WIN32
|
||||
taskProg->show();
|
||||
taskProg->resume();
|
||||
taskProg->setValue(1);
|
||||
taskBtn->setOverlayIcon(QIcon::fromTheme(
|
||||
"obs-active", QIcon(":/res/images/active.png")));
|
||||
#endif
|
||||
if (trayIcon)
|
||||
trayIcon->setIcon(QIcon::fromTheme(
|
||||
"obs-tray-active",
|
||||
@ -5420,34 +5408,12 @@ inline void OBSBasic::OnDeactivate()
|
||||
if (trayIcon)
|
||||
trayIcon->setIcon(QIcon::fromTheme(
|
||||
"obs-tray", QIcon(":/res/images/obs.png")));
|
||||
#ifdef _WIN32
|
||||
taskProg->hide();
|
||||
taskBtn->clearOverlayIcon();
|
||||
#endif
|
||||
} else {
|
||||
if (os_atomic_load_bool(&recording_paused)) {
|
||||
#ifdef _WIN32
|
||||
taskProg->show();
|
||||
taskProg->pause();
|
||||
taskBtn->setOverlayIcon(QIcon::fromTheme(
|
||||
"obs-paused",
|
||||
QIcon(":/res/images/paused.png")));
|
||||
#endif
|
||||
if (trayIcon)
|
||||
trayIcon->setIcon(
|
||||
QIcon(":/res/images/obs_paused.png"));
|
||||
} else {
|
||||
#ifdef _WIN32
|
||||
taskProg->show();
|
||||
taskProg->resume();
|
||||
taskBtn->setOverlayIcon(QIcon::fromTheme(
|
||||
"obs-active",
|
||||
QIcon(":/res/images/active.png")));
|
||||
#endif
|
||||
if (trayIcon)
|
||||
trayIcon->setIcon(
|
||||
QIcon(":/res/images/tray_active.png"));
|
||||
}
|
||||
} else if (trayIcon) {
|
||||
if (os_atomic_load_bool(&recording_paused))
|
||||
trayIcon->setIcon(QIcon(":/res/images/obs_paused.png"));
|
||||
else
|
||||
trayIcon->setIcon(
|
||||
QIcon(":/res/images/tray_active.png"));
|
||||
}
|
||||
}
|
||||
|
||||
@ -7915,11 +7881,6 @@ void OBSBasic::PauseRecording()
|
||||
|
||||
ui->statusbar->RecordingPaused();
|
||||
|
||||
#ifdef _WIN32
|
||||
taskProg->pause();
|
||||
taskBtn->setOverlayIcon(QIcon::fromTheme(
|
||||
"obs-paused", QIcon(":/res/images/paused.png")));
|
||||
#endif
|
||||
if (trayIcon)
|
||||
trayIcon->setIcon(QIcon(":/res/images/obs_paused.png"));
|
||||
|
||||
@ -7949,11 +7910,6 @@ void OBSBasic::UnpauseRecording()
|
||||
|
||||
ui->statusbar->RecordingUnpaused();
|
||||
|
||||
#ifdef _WIN32
|
||||
taskProg->resume();
|
||||
taskBtn->setOverlayIcon(QIcon::fromTheme(
|
||||
"obs-active", QIcon(":/res/images/active.png")));
|
||||
#endif
|
||||
if (trayIcon)
|
||||
trayIcon->setIcon(
|
||||
QIcon(":/res/images/tray_active.png"));
|
||||
|
@ -21,10 +21,6 @@
|
||||
#include <QAction>
|
||||
#include <QWidgetAction>
|
||||
#include <QSystemTrayIcon>
|
||||
#ifdef _WIN32
|
||||
#include <QWinTaskbarButton>
|
||||
#include <QWinTaskbarProgress>
|
||||
#endif
|
||||
#include <QStyledItemDelegate>
|
||||
#include <obs.hpp>
|
||||
#include <vector>
|
||||
@ -282,11 +278,6 @@ private:
|
||||
QPointer<QMenu> perSceneTransitionMenu;
|
||||
QPointer<QObject> shortcutFilter;
|
||||
|
||||
#ifdef _WIN32
|
||||
QWinTaskbarButton *taskBtn = new QWinTaskbarButton(this);
|
||||
QWinTaskbarProgress *taskProg = taskBtn->progress();
|
||||
#endif
|
||||
|
||||
QPointer<QWidget> programWidget;
|
||||
QPointer<QVBoxLayout> programLayout;
|
||||
QPointer<QLabel> programLabel;
|
||||
|
@ -158,7 +158,6 @@ file(GLOB QT_DEBUG_BIN_FILES
|
||||
"${Qt5Core_DIR}/../../../bin/Qt5Guid.dll"
|
||||
"${Qt5Core_DIR}/../../../bin/Qt5Widgetsd.dll"
|
||||
"${Qt5Core_DIR}/../../../bin/Qt5Svgd.dll"
|
||||
"${Qt5Core_DIR}/../../../bin/Qt5WinExtrasd.dll"
|
||||
"${Qt5Core_DIR}/../../../bin/Qt5Xmld.dll"
|
||||
"${Qt5Core_DIR}/../../../bin/libGLESv2d.dll"
|
||||
"${Qt5Core_DIR}/../../../bin/libEGLd.dll")
|
||||
@ -177,7 +176,6 @@ file(GLOB QT_BIN_FILES
|
||||
"${Qt5Core_DIR}/../../../bin/Qt5Gui.dll"
|
||||
"${Qt5Core_DIR}/../../../bin/Qt5Widgets.dll"
|
||||
"${Qt5Core_DIR}/../../../bin/Qt5Svg.dll"
|
||||
"${Qt5Core_DIR}/../../../bin/Qt5WinExtras.dll"
|
||||
"${Qt5Core_DIR}/../../../bin/Qt5Xml.dll"
|
||||
"${Qt5Core_DIR}/../../../bin/libGLESv2.dll"
|
||||
"${Qt5Core_DIR}/../../../bin/libEGL.dll")
|
||||
|
Loading…
Reference in New Issue
Block a user