mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-21 18:22:29 +01:00
Disable monitor selection when using KDE
Fix missing enum register Fix hardcoded colors
This commit is contained in:
parent
dd64e93afe
commit
10dacd0ba6
@ -123,7 +123,7 @@ App::App()
|
||||
qmlRegisterAnonymousType<Util>("ScreenPlay", 1);
|
||||
qmlRegisterAnonymousType<Create>("ScreenPlay", 1);
|
||||
qmlRegisterAnonymousType<Wizards>("ScreenPlay", 1);
|
||||
qmlRegisterAnonymousType<Settings>("ScreenPlay", 1);
|
||||
qmlRegisterAnonymousType<Settings>("Settings", 1);
|
||||
|
||||
// ScreenPlayManager first to check if another ScreenPlay Instace is running
|
||||
m_screenPlayManager = std::make_unique<ScreenPlayManager>();
|
||||
@ -195,7 +195,7 @@ void App::init()
|
||||
// Set visible if the -silent parameter was not set
|
||||
if (QApplication::instance()->arguments().contains("-silent")) {
|
||||
qInfo() << "Starting in silent mode.";
|
||||
settings()->setSilentStart(true);
|
||||
m_settings->setSilentStart(true);
|
||||
}
|
||||
|
||||
qmlRegisterSingletonInstance("ScreenPlay", 1, 0, "ScreenPlay", this);
|
||||
@ -257,7 +257,7 @@ bool App::loadSteamPlugin()
|
||||
|
||||
const ScreenPlayWorkshopPlugin* workshopPlugin = reinterpret_cast<ScreenPlayWorkshopPlugin*>(m_workshopPlugin.instance());
|
||||
Q_UNUSED(workshopPlugin)
|
||||
settings()->setSteamVersion(true);
|
||||
m_settings->setSteamVersion(true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -7,6 +7,8 @@ import QtQuick.Controls.Material 2.12
|
||||
import QtQuick.Controls.Material.impl 2.12
|
||||
|
||||
import ScreenPlay 1.0
|
||||
import Settings 1.0
|
||||
|
||||
import ScreenPlay.Enums.FillMode 1.0
|
||||
import ScreenPlay.Enums.InstalledType 1.0
|
||||
|
||||
@ -243,6 +245,7 @@ Item {
|
||||
ColumnLayout {
|
||||
Layout.fillWidth: true
|
||||
|
||||
|
||||
Text {
|
||||
id: txtHeadlineMonitor
|
||||
height: 20
|
||||
@ -250,7 +253,7 @@ Item {
|
||||
font.family: ScreenPlay.settings.font
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
font.pointSize: 10
|
||||
color: "#626262"
|
||||
color: Material.primaryTextColor
|
||||
}
|
||||
|
||||
MonitorSelection {
|
||||
@ -296,7 +299,7 @@ Item {
|
||||
font.family: ScreenPlay.settings.font
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
font.pointSize: 10
|
||||
color: "#626262"
|
||||
color: Material.primaryTextColor
|
||||
wrapMode: Text.WrapAnywhere
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
@ -3,13 +3,16 @@ import QtQuick.Controls 2.14
|
||||
import QtGraphicalEffects 1.0
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
|
||||
import ScreenPlay 1.0
|
||||
import Settings 1.0
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
color: Material.theme === Material.Light ? Material.background : Qt.darker(
|
||||
Material.background)
|
||||
|
||||
enabled: ScreenPlay.settings.desktopEnvironment === Settings.Windows
|
||||
height: availableHeight
|
||||
width: parent.width
|
||||
clip: true
|
||||
@ -146,6 +149,7 @@ Rectangle {
|
||||
Flickable {
|
||||
id: flickable
|
||||
anchors.fill: parent
|
||||
opacity: root.enabled ? 1 : .2
|
||||
|
||||
contentWidth: rp.contentWidth
|
||||
contentHeight: rp.contentHeight
|
||||
@ -167,6 +171,7 @@ Rectangle {
|
||||
property int contentHeight
|
||||
delegate: MonitorSelectionItem {
|
||||
id: delegate
|
||||
enabled: root.enabled
|
||||
monitorID: m_monitorID
|
||||
monitorName: m_name
|
||||
appID: m_appID
|
||||
@ -186,4 +191,14 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
id: name
|
||||
text: qsTr("KDE only supports one Wallpaper")
|
||||
font.family: ScreenPlay.settings.font
|
||||
font.capitalization: Font.Capitalize
|
||||
color: Material.primaryTextColor
|
||||
anchors.centerIn: parent
|
||||
opacity: !root.enabled ? 1 : 0
|
||||
}
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ Item {
|
||||
|
||||
Rectangle {
|
||||
id: wrapper
|
||||
color: "#828282"
|
||||
color: root.enabled ? "#828282" : Qt.lighter("#828282")
|
||||
anchors.fill: parent
|
||||
anchors.margins: 10
|
||||
border.color: "#1e1e1e"
|
||||
@ -83,6 +83,9 @@ Item {
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
if(!root.enabled)
|
||||
return
|
||||
|
||||
if (monitorWithoutContentSelectable) {
|
||||
monitorSelected(index)
|
||||
return
|
||||
|
@ -85,7 +85,8 @@ void ScreenPlayManager::init(
|
||||
|
||||
if (m_settings->desktopEnvironment() == Settings::DesktopEnvironment::KDE) {
|
||||
m_websocketServer = std::make_unique<QWebSocketServer>(QStringLiteral("ScreenPlayWebSocket"), QWebSocketServer::SslMode::NonSecureMode);
|
||||
m_websocketServer->listen(QHostAddress::Any, m_webSocketPort);
|
||||
const bool websocket_server = m_websocketServer->listen(QHostAddress::Any, m_webSocketPort);
|
||||
qInfo() << "Starting kde websocket server : " << websocket_server;
|
||||
QObject::connect(m_websocketServer.get(), &QWebSocketServer::newConnection, this, [this]() {
|
||||
qInfo() << "New Websocket Connection";
|
||||
auto* socket = m_websocketServer->nextPendingConnection();
|
||||
|
@ -112,6 +112,7 @@ public:
|
||||
Unity,
|
||||
XFCE,
|
||||
};
|
||||
Q_ENUM(DesktopEnvironment)
|
||||
|
||||
enum class Language {
|
||||
En,
|
||||
|
@ -1,12 +1,12 @@
|
||||
import QtQuick 2.11
|
||||
import QtQuick 2.12
|
||||
import QtGraphicalEffects 1.0
|
||||
import QtQuick.Window 2.0
|
||||
import Qt.WebSockets 1.15
|
||||
import QtWebEngine 1.8
|
||||
import Qt.WebSockets 1.0
|
||||
import QtWebEngine 1.6
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
color: "#333333"
|
||||
color: "green"
|
||||
property string fullContentPath
|
||||
property real volume: 1.0
|
||||
property string fillMode: "Cover"
|
||||
@ -64,6 +64,7 @@ Rectangle {
|
||||
WebEngineView {
|
||||
id: webView
|
||||
anchors.fill: parent
|
||||
anchors.margins:20
|
||||
opacity: loadProgress === 100 ? 1 : 0
|
||||
onLoadProgressChanged: {
|
||||
if (loadProgress === 100)
|
||||
|
4
ScreenPlayWallpaper/kde/ScreenPlay/update.sh
Executable file
4
ScreenPlayWallpaper/kde/ScreenPlay/update.sh
Executable file
@ -0,0 +1,4 @@
|
||||
cd ..
|
||||
plasmapkg2 --upgrade ScreenPlay
|
||||
kquitapp5 plasmashell
|
||||
kstart5 plasmashell
|
Loading…
Reference in New Issue
Block a user