mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-09-18 16:32:33 +02:00
Add open in workshop
This commit is contained in:
parent
43f43d73f9
commit
152fb1243c
@ -107,5 +107,6 @@
|
||||
<file>translations/ScreenPlay_de.qm</file>
|
||||
<file>translations/ScreenPlay_en.qm</file>
|
||||
<file>qml/Create/CreateNew.qml</file>
|
||||
<file>assets/icons/icon_open_in_new.svg</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
4
ScreenPlay/assets/icons/icon_open_in_new.svg
Normal file
4
ScreenPlay/assets/icons/icon_open_in_new.svg
Normal file
@ -0,0 +1,4 @@
|
||||
<svg fill="#FFFFFF" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 294 B |
@ -109,8 +109,7 @@ Item {
|
||||
Image {
|
||||
id: mask
|
||||
source: "qrc:/assets/images/Window.svg"
|
||||
sourceSize: Qt.size(screenPlay.width,
|
||||
screenPlay.height)
|
||||
sourceSize: Qt.size(screenPlay.width, screenPlay.height)
|
||||
visible: false
|
||||
smooth: true
|
||||
asynchronous: true
|
||||
@ -191,6 +190,25 @@ Item {
|
||||
icon.width: 12
|
||||
icon.height: 12
|
||||
}
|
||||
|
||||
Item {
|
||||
id:openInWorkshop
|
||||
height: 20
|
||||
width: 20
|
||||
z: 99
|
||||
opacity: 0
|
||||
anchors {
|
||||
margins: 10
|
||||
top: parent.top
|
||||
right: parent.right
|
||||
}
|
||||
Image {
|
||||
source: "qrc:/assets/icons/icon_open_in_new.svg"
|
||||
sourceSize: Qt.size(parent.width, parent.height)
|
||||
fillMode: Image.PreserveAspectFit
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
OpacityMask {
|
||||
@ -229,27 +247,40 @@ Item {
|
||||
|
||||
Connections {
|
||||
target: steamWorkshop
|
||||
onWorkshopItemInstalled:{
|
||||
onWorkshopItemInstalled: {
|
||||
print(appID)
|
||||
if(appID === steamWorkshop.appID){
|
||||
if (appID === steamWorkshop.appID) {
|
||||
workshopItem.state = "installed"
|
||||
print("match!")
|
||||
}
|
||||
|
||||
print(workshopItem.steamID, publishedFile)
|
||||
|
||||
if(workshopItem.steamID == publishedFile){
|
||||
if (workshopItem.steamID == publishedFile) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
height: 20
|
||||
width: 20
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
anchors {
|
||||
margins: 10
|
||||
top: parent.top
|
||||
right: parent.right
|
||||
}
|
||||
onClicked: {
|
||||
Qt.openUrlExternally( "steam://url/CommunityFilePage/" + steamID)
|
||||
}
|
||||
}
|
||||
}
|
||||
FastBlur {
|
||||
id: effBlur
|
||||
anchors.fill: itemWrapper
|
||||
source:itemWrapper
|
||||
source: itemWrapper
|
||||
radius: 0
|
||||
}
|
||||
|
||||
@ -303,6 +334,12 @@ Item {
|
||||
anchors.bottomMargin: 10
|
||||
}
|
||||
|
||||
|
||||
PropertyChanges {
|
||||
target: openInWorkshop
|
||||
opacity: .75
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: txtTitle
|
||||
opacity: 1
|
||||
@ -325,6 +362,10 @@ Item {
|
||||
target: button
|
||||
opacity: 0
|
||||
}
|
||||
PropertyChanges {
|
||||
target: openInWorkshop
|
||||
opacity: 0
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: txtTitle
|
||||
@ -346,7 +387,6 @@ Item {
|
||||
opacity: 1
|
||||
anchors.topMargin: 0
|
||||
}
|
||||
|
||||
},
|
||||
State {
|
||||
name: "installed"
|
||||
@ -393,6 +433,11 @@ Item {
|
||||
duration: 100
|
||||
properties: "opacity, anchors.bottomMargin"
|
||||
}
|
||||
PropertyAnimation {
|
||||
target: openInWorkshop
|
||||
duration: 100
|
||||
properties: "opacity"
|
||||
}
|
||||
PropertyAnimation {
|
||||
target: txtTitle
|
||||
duration: 100
|
||||
|
Loading…
Reference in New Issue
Block a user