simplify asset server button

This commit is contained in:
Faye Li 2017-03-15 16:55:21 -07:00
parent 42216b6986
commit 10ebb6efd7

View file

@ -158,97 +158,22 @@ StackView {
}
}
Item {
HifiControls.Button {
id: assetServerButton
width: 370
height: 38
anchors.horizontalCenter: parent.horizontalCenter
text: "Open This Domain's Asset Server"
color: hifi.buttons.black
colorScheme: hifi.colorSchemes.dark
anchors.right: parent.right
anchors.rightMargin: 55
anchors.left: parent.left
anchors.leftMargin: 55
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
onClicked: {
editRoot.sendToScript({
method: "newEntityButtonClicked", params: { buttonName: "openAssetBrowserButton" }
});
}
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
}
}
]
}
HifiControls.Button {
@ -260,7 +185,7 @@ StackView {
anchors.left: parent.left
anchors.leftMargin: 55
anchors.top: assetServerButton.bottom
anchors.topMargin: 35
anchors.topMargin: 20
}
}
}