mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-07 04:53:28 +02:00
Merge branch 'feat/avatarTools/avatarPackager' of github.com:thoys/hifi into feat/avatarTools/avatarPackager
# Conflicts: # interface/resources/qml/hifi/avatarPackager/AvatarPackagerHeader.qml # interface/resources/qml/hifi/avatarPackager/InfoBox.qml
This commit is contained in:
commit
68521e11a7
6 changed files with 79 additions and 51 deletions
|
@ -19,6 +19,7 @@ Item {
|
|||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
|
||||
onClicked: {
|
||||
unfocusser.forceActiveFocus();
|
||||
}
|
||||
|
@ -352,8 +353,6 @@ Item {
|
|||
|
||||
color: 'white'
|
||||
|
||||
visible: AvatarPackagerCore.currentAvatarProject !== null
|
||||
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.topMargin: 16
|
||||
|
|
|
@ -122,7 +122,6 @@ ShadowRectangle {
|
|||
anchors.verticalCenter: docs.verticalCenter
|
||||
|
||||
text: qsTr("Docs")
|
||||
color: "white"
|
||||
|
||||
onClicked: {
|
||||
docsButtonClicked();
|
||||
|
|
|
@ -0,0 +1,63 @@
|
|||
import QtQuick 2.6
|
||||
|
||||
import "../../controlsUit" 1.0 as HifiControls
|
||||
import "../../stylesUit" 1.0
|
||||
|
||||
import TabletScriptingInterface 1.0
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
readonly property bool pressed: mouseArea.state == "pressed"
|
||||
readonly property bool hovered: mouseArea.state == "hovering"
|
||||
|
||||
signal clicked()
|
||||
|
||||
MouseArea {
|
||||
id: mouseArea
|
||||
|
||||
anchors.fill: parent
|
||||
|
||||
hoverEnabled: true
|
||||
|
||||
onClicked: {
|
||||
root.focus = true
|
||||
Tablet.playSound(TabletEnums.ButtonClick);
|
||||
root.clicked();
|
||||
}
|
||||
|
||||
property string lastState: ""
|
||||
|
||||
states: [
|
||||
State {
|
||||
name: ""
|
||||
StateChangeScript {
|
||||
script: {
|
||||
mouseArea.lastState = mouseArea.state;
|
||||
}
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "pressed"
|
||||
when: mouseArea.containsMouse && mouseArea.pressed
|
||||
StateChangeScript {
|
||||
script: {
|
||||
mouseArea.lastState = mouseArea.state;
|
||||
}
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "hovering"
|
||||
when: mouseArea.containsMouse
|
||||
StateChangeScript {
|
||||
script: {
|
||||
if (mouseArea.lastState == "") {
|
||||
Tablet.playSound(TabletEnums.ButtonHover);
|
||||
}
|
||||
mouseArea.lastState = mouseArea.state;
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
|
@ -31,6 +31,7 @@ Item {
|
|||
avatarPackager.displayErrorMessage(status);
|
||||
return;
|
||||
}
|
||||
avatarProject.reset();
|
||||
avatarPackager.state = AvatarPackagerState.project;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,6 +20,12 @@ Rectangle {
|
|||
property alias boxWidth: mainContainer.width
|
||||
property alias boxHeight: mainContainer.height
|
||||
|
||||
onVisibleChanged: {
|
||||
if (visible) {
|
||||
focus = true;
|
||||
}
|
||||
}
|
||||
|
||||
function open() {
|
||||
visible = true;
|
||||
}
|
||||
|
|
|
@ -8,61 +8,21 @@ import TabletScriptingInterface 1.0
|
|||
RalewaySemiBold {
|
||||
id: root
|
||||
|
||||
text: "no text"
|
||||
|
||||
signal clicked()
|
||||
|
||||
color: "white"
|
||||
anchors.fill: textItem
|
||||
|
||||
property var idleColor: "white"
|
||||
property var hoverColor: "#AFAFAF"
|
||||
property var pressedColor: "#575757"
|
||||
|
||||
MouseArea {
|
||||
id: mouseArea
|
||||
color: clickable.hovered ? root.hoverColor : (clickable.pressed ? root.pressedColor : root.idleColor);
|
||||
|
||||
anchors.fill: parent
|
||||
signal clicked()
|
||||
|
||||
hoverEnabled: true
|
||||
ClickableArea {
|
||||
id: clickable
|
||||
|
||||
onClicked: {
|
||||
Tablet.playSound(TabletEnums.ButtonClick);
|
||||
root.clicked()
|
||||
}
|
||||
anchors.fill: root
|
||||
|
||||
property string lastState: ""
|
||||
|
||||
states: [
|
||||
State {
|
||||
name: ""
|
||||
StateChangeScript {
|
||||
script: {
|
||||
mouseArea.lastState = mouseArea.state
|
||||
}
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "pressed"
|
||||
when: mouseArea.containsMouse && mouseArea.pressed
|
||||
PropertyChanges { target: root; color: pressedColor }
|
||||
StateChangeScript {
|
||||
script: {
|
||||
mouseArea.lastState = mouseArea.state
|
||||
}
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "hovering"
|
||||
when: mouseArea.containsMouse
|
||||
PropertyChanges { target: root; color: hoverColor }
|
||||
StateChangeScript {
|
||||
script: {
|
||||
if (mouseArea.lastState == "") {
|
||||
Tablet.playSound(TabletEnums.ButtonHover);
|
||||
}
|
||||
mouseArea.lastState = mouseArea.state
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
onClicked: root.clicked()
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue