Files
OpenVR-AdvancedSettings-frame/bin/win64/res/qml/MyPushButton.qml
T
matzman e39c240ff5 Complete GUI overhaul (from Qt Widgets to Qt Quick Controls 2)
Added chaperone profiles
Added separate supersampling sliders for applications/compositor
Added asynchronous reprojection on/off switch
Merged in Microphone Control Overlay
Added Push-to-Talk profiles
Updated to OpenVR 1.0.3
Requires at least SteamVR beta 1477423729.
2016-10-28 18:38:05 +02:00

32 lines
780 B
QML

import QtQuick 2.7
import QtQuick.Controls 2.0
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
Button {
property bool activationSoundEnabled: true
hoverEnabled: true
contentItem: MyText {
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
text: parent.text
color: parent.enabled ? "#ffffff" : "#909090"
}
background: Rectangle {
color: parent.down ? "#406288" : (parent.activeFocus ? "#365473" : "#2c435d")
}
onHoveredChanged: {
if (hovered) {
forceActiveFocus()
} else {
focus = false
}
}
onClicked: {
if (activationSoundEnabled) {
MyResources.activationSound.play()
}
}
}