1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-22 10:42:29 +01:00

Add custom size, color and opacity for widgets to set

This commit is contained in:
Elias Steurer 2020-01-26 10:59:52 +01:00
parent db7aad83b4
commit 38c6916bce

View File

@ -25,7 +25,7 @@ Item {
Action {
shortcut: "F5"
onTriggered: {
onTriggered: {
loader.sourceComponent = undefined
loader.source = ""
Widget.clearComponentCache()
@ -37,7 +37,6 @@ Item {
}
}
OpacityAnimator {
id: animFadeOut
from: 1
@ -74,12 +73,21 @@ Item {
loader.sourceComponent = webViewComponent
}
}
onStatusChanged: {
if (loader.status == Loader.Ready) {
if(loader.item.widgetBackground !== undefined){
bgColor.color = loader.item.widgetBackground
}
if(loader.item.widgetBackgroundOpacity !== undefined){
bgColor.opacity = loader.item.widgetBackgroundOpacity
}
if(loader.item.widgetWidth !== undefined &&
loader.item.widgetHeight !== undefined){
Widget.setWidgetSize(loader.item.widgetWidth,
loader.item.widgetHeight)
}
Connections {
target: loader.item
ignoreUnknownSignals: true
onWidthChanged: mainWindow.width = loader.item.width
onHeightChanged: mainWindow.height = loader.item.height
}
}
}