修复:完善终端开机及串流交接并接入云管平台
This commit is contained in:
1 parent
8276da0d45
commit
18a9ce995d
25 files changed
+922
-48
No files matched your search
@@ -4,6 +4,7 @@
|
||||
#include <QFont>
|
||||
#include <QGuiApplication>
|
||||
#include <QLabel>
|
||||
#include <QPalette>
|
||||
#include <QScreen>
|
||||
#include <QTimer>
|
||||
#include <QVBoxLayout>
|
||||
@@ -23,9 +24,18 @@ const char* kSpinnerFrames[] = {"◐", "◓", "◑", "◒"};
|
||||
TransitionOverlay::TransitionOverlay(QWidget* parent) : QWidget(parent) {
|
||||
// 独立置顶无边框窗口只在启动时映射一次,后续不再与 Moonlight 抢焦点。
|
||||
setWindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint |
|
||||
Qt::WindowDoesNotAcceptFocus);
|
||||
Qt::WindowDoesNotAcceptFocus
|
||||
#ifdef Q_OS_UNIX
|
||||
| Qt::X11BypassWindowManagerHint
|
||||
#endif
|
||||
);
|
||||
setAttribute(Qt::WA_ShowWithoutActivating);
|
||||
setStyleSheet(QStringLiteral("TransitionOverlay { background-color: #000000; }"));
|
||||
// A plain QWidget subclass needs an explicit opaque palette; a type-name
|
||||
// stylesheet alone may leave the native window using its default white.
|
||||
setAutoFillBackground(true);
|
||||
QPalette background = palette();
|
||||
background.setColor(QPalette::Window, QColor(QStringLiteral("#0f1420")));
|
||||
setPalette(background);
|
||||
|
||||
auto* layout = new QVBoxLayout(this);
|
||||
layout->setSpacing(28);
|
||||
@@ -82,6 +92,14 @@ void TransitionOverlay::finish() {
|
||||
}
|
||||
|
||||
void TransitionOverlay::onFirstFrame() {
|
||||
// The exclusive X11 kiosk has no compositor to apply window opacity.
|
||||
// Once the full-screen stream is ready, unmap the opaque cover directly.
|
||||
#ifdef Q_OS_UNIX
|
||||
if (QGuiApplication::platformName() == QStringLiteral("xcb")) {
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
// 首帧已出画:停止动画并淡出;若尚未显示/已在淡出则忽略
|
||||
if (!isVisible() || fadeTimer_->isActive()) {
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user