asset server button

This commit is contained in:
Faye Li 2017-02-23 14:36:39 -08:00
parent 3850bc35a9
commit d4ea0c116d

View file

@ -6,6 +6,7 @@ import QtQuick.Controls.Styles 1.4
import "../../controls"
import "../toolbars"
import HFWebEngineProfile 1.0
import QtGraphicalEffects 1.0
StackView {
id: editRoot
@ -60,20 +61,9 @@ StackView {
anchors.rightMargin: 55
anchors.left: parent.left
anchors.leftMargin: 55
anchors.bottom: parent.bottom
anchors.bottomMargin: 30
anchors.top: parent.top
anchors.topMargin: 70
NewEntityButton {
icon: "icons/assets-01.svg"
text: "ASSETS"
onClicked: {
editRoot.sendToScript({
method: "newEntityButtonClicked", params: { buttonName: "openAssetBrowserButton" }
});
}
}
NewEntityButton {
icon: "icons/create-icons/94-model-01.svg"
@ -156,8 +146,98 @@ StackView {
}
}
Item {
id: assetServerButton
width: 370
height: 38
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: createEntitiesFlow.bottom
anchors.topMargin: 35
Rectangle {
id: assetServerButtonBg
color: "black"
opacity: 1
radius: 6
anchors.right: parent.right
anchors.rightMargin: 0
anchors.left: parent.left
anchors.leftMargin: 0
anchors.bottom: parent.bottom
anchors.bottomMargin: 0
anchors.top: parent.top
anchors.topMargin: 0
}
Rectangle {
id: assetServerButtonGradient
gradient: Gradient {
GradientStop {
position: 0
color: "#383838"
}
GradientStop {
position: 1
color: "black"
}
}
opacity: 1
radius: 6
anchors.right: parent.right
anchors.rightMargin: 0
anchors.left: parent.left
anchors.leftMargin: 0
anchors.bottom: parent.bottom
anchors.bottomMargin: 0
anchors.top: parent.top
anchors.topMargin: 0
}
Text {
color: "#ffffff"
text: "OPEN THIS DOMAIN'S ASSET SERVER"
font.bold: true
font.pixelSize: 14
anchors.centerIn: parent
}
MouseArea {
anchors.fill: parent
hoverEnabled: true
enabled: true
onClicked: {
editRoot.sendToScript({
method: "newEntityButtonClicked", params: { buttonName: "openAssetBrowserButton" }
});
}
onEntered: {
assetServerButton.state = "hover state";
}
onExited: {
assetServerButton.state = "base state";
}
}
states: [
State {
name: "hover state"
PropertyChanges {
target: assetServerButtonGradient
opacity: 0
}
},
State {
name: "base state"
PropertyChanges {
target: assetServerButtonGradient
opacity: 1
}
}
]
}
}
}