Files
OpenVR-AdvancedSettings-frame/src/res/qml/common/MyPushButton.qml
T
ykearaandJames R 65b5aace06 5.6.2 (#612)
* add nlhomann json header

* add get scene app fn

* add get current binding and related logic

* add save binding file to settings folder

* apply binding fn added fixed uid bug

* add button logic to QML, add enable Bind Setting

* add finding logic for all custom bind

* fix minor qml issues

* fix get controllername bug, fix bug with save bind

* fix regex issue

* change webrequest for selectconfig

* change to properly urlify path to send

* fix race condition web requests

* change steamvr tab qml formatting

* change color scheme

* change colors of icons to text color

* change bind qml better for better ux

* add possible workaround for space drag issues

* add deact color to pushbutton

* increment version

* adjust button size in movecenter

* move nlhomann json

* fix PKGBUILD to include missing dependency (#606) (#613)

It turns out qt5-websockets needs to be included for a successful build.

Co-authored-by: James R <71466513+ColdIce1605@users.noreply.github.com>

* fix warning

* improved logging messages around perapp bindings

* improve getsceneappID logging

* add HMD based controller Finding

* improve logging controller name

* change logging around initial chaperone calibration

* increment version

* improve logging/error handling around sceneappid failures

* added fallback for getting scene app by pid

* update version string

* update documentation

Co-authored-by: James R <71466513+ColdIce1605@users.noreply.github.com>
2022-07-28 16:44:22 -05:00

42 lines
980 B
QML

import QtQuick 2.7
import QtQuick.Controls 2.0
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
Button {
// Overload this
// Empty string = no icon
property string iconPath: ""
property bool activationSoundEnabled: true
hoverEnabled: true
contentItem: MyText {
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
text: parent.text
color: parent.enabled ? "#d9dbe0" : "#65676b"
}
background: Rectangle {
color: parent.enabled? (parent.down ? "#181a1e" : (parent.activeFocus ? "#586170" : "#3d4450")): "#181a1e"
}
Image {
source: iconPath
height: parent.height
width: height
}
onHoveredChanged: {
if (hovered) {
forceActiveFocus()
} else {
focus = false
}
}
onClicked: {
if (activationSoundEnabled) {
MyResources.playActivationSound()
}
}
}