From 35b146b59a0c402a0293b159cfd6ddcae87feb4c Mon Sep 17 00:00:00 2001 From: vladest Date: Thu, 12 Oct 2017 19:01:38 +0200 Subject: [PATCH] Added sounds in Audio menu --- .../resources/qml/controls-uit/CheckBoxQQC2.qml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/interface/resources/qml/controls-uit/CheckBoxQQC2.qml b/interface/resources/qml/controls-uit/CheckBoxQQC2.qml index 92bad04d01..3f165bfc09 100644 --- a/interface/resources/qml/controls-uit/CheckBoxQQC2.qml +++ b/interface/resources/qml/controls-uit/CheckBoxQQC2.qml @@ -13,6 +13,7 @@ import QtQuick.Controls 2.2 import "../styles-uit" import "../controls-uit" as HiFiControls +import TabletScriptingInterface 1.0 CheckBox { id: checkBox @@ -32,6 +33,17 @@ CheckBox { readonly property int checkSize: Math.max(boxSize - 8, 10) readonly property int checkRadius: isRound ? checkSize / 2 : 2 focusPolicy: Qt.ClickFocus + hoverEnabled: true + + onClicked: { + tabletInterface.playSound(TabletEnums.ButtonClick) + } + + onHoveredChanged: { + if (hovered) { + tabletInterface.playSound(TabletEnums.ButtonHover) + } + } indicator: Rectangle { id: box