1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-09-18 16:32:33 +02:00

Fix monitor project settings being hard coded to monitor 0

This commit is contained in:
kelteseth 2018-03-12 15:53:36 +01:00
parent 025d6080ab
commit cd2df404e3
3 changed files with 61 additions and 43 deletions

View File

@ -99,5 +99,6 @@
<file>assets/particle/dot.png</file>
<file>assets/icons/icon_scene.svg</file>
<file>qml/NavigationWallpaperConfiguration.qml</file>
<file>qml/MonitorsProjectSettingItem.qml</file>
</qresource>
</RCC>

View File

@ -11,6 +11,7 @@ Item {
property string activeMonitorName: ""
onStateChanged: {
bgMouseArea.focus = monitors.state == "active" ? true : false
}
@ -114,6 +115,8 @@ Item {
cellHeight: 50
cacheBuffer: 10000
clip: true
anchors {
top: parent.top
topMargin: 60
@ -123,51 +126,11 @@ Item {
left: itmLeftWrapper.right
}
delegate: Rectangle {
delegate: MonitorsProjectSettingItem {
id: delegate
focus: true
height: isHeadline ? 50 : 30
width: 300
anchors {
left: parent.left
leftMargin: isHeadline ? 0 : 25
}
Text {
id: txtDescription
text: name
width: 100
font.pixelSize: isHeadline ? 21 : 14
anchors.verticalCenter: parent.verticalCenter
font.family: "Roboto"
font.weight: Font.Normal
renderType: Text.NativeRendering
anchors {
left: parent.left
}
}
Rectangle {
height: parent.height
visible: !isHeadline
anchors {
left: txtDescription.right
leftMargin: 20
right: parent.right
}
TextEdit {
anchors.fill: parent
anchors.margins: 4
focus: true
font.family: "Roboto"
font.weight: Font.Normal
renderType: Text.NativeRendering
// We need to convert to a string because of large numbers js uses scientific notation x*e^x
text: value.toString()
}
}
selectedMonitor: monitorSelection.activeMonitorIndex
}
ScrollBar.vertical: ScrollBar {
policy: ScrollBar.AlwaysOn
snapMode: ScrollBar.SnapOnRelease

View File

@ -0,0 +1,54 @@
import QtQuick 2.9
import QtQuick.Controls 2.3
import QtGraphicalEffects 1.0
import QtQuick.Controls.Material 2.2
import QtQuick.Layouts 1.3
Item {
id: delegate
focus: true
height: isHeadline ? 50 : 30
width: 300
anchors {
left: parent.left
leftMargin: isHeadline ? 0 : 25
}
Text {
id: txtDescription
text: name
width: 100
font.pixelSize: isHeadline ? 21 : 14
anchors.verticalCenter: parent.verticalCenter
font.family: "Roboto"
font.weight: Font.Normal
renderType: Text.NativeRendering
anchors {
left: parent.left
}
}
Rectangle {
height: parent.height
visible: !isHeadline
anchors {
left: txtDescription.right
leftMargin: 20
right: parent.right
}
TextEdit {
id:teValue
anchors.fill: parent
anchors.margins: 4
focus: true
font.family: "Roboto"
font.weight: Font.Normal
renderType: Text.NativeRendering
// We need to convert to a string because of large numbers js uses scientific notation x*e^x
text: value.toString()
Keys.onReturnPressed: screenPlay.setWallpaperValue(0,txtDescription.text,teValue.text)
}
}
}