diff --git a/examples/gallery/main.drawer.qml b/examples/gallery/main.drawer.qml index 2fde4ee44123bffd6aefee0a57b88b56a1a099bb..595d849c5fcdca4f2336b95564048549459bfb84 100644 --- a/examples/gallery/main.drawer.qml +++ b/examples/gallery/main.drawer.qml @@ -1,7 +1,7 @@ import QtQuick 2.15 import QtQuick.Controls 2.15 import QtQuick.Layouts 1.15 -import QtGraphicalEffects 1.15 +//import QtGraphicalEffects 1.15 // import Qt5Compat.GraphicalEffects @@ -41,37 +41,37 @@ Pane { } } } - - Rectangle { - color: "#00000000"; - - anchors.fill: parent; - - visible: window.inPortrait; - - ShaderEffectSource { - id: _source - - sourceItem: window - width: parent.width; - height: parent.height; - sourceRect: Qt.rect(x,y, width, height) - } - - FastBlur{ - id: _blur; - anchors.fill: _source - source: _source - radius: 128 - } - - ColorOverlay - { - anchors.fill: parent - source: _blur; - color: "#ee000000"; - } - } +// + //Rectangle { + // color: "#00000000"; +// + // anchors.fill: parent; +// + // visible: window.inPortrait; +// + // ShaderEffectSource { + // id: _source +// + // sourceItem: window + // width: parent.width; + // height: parent.height; + // sourceRect: Qt.rect(x,y, width, height) + // } +// + // FastBlur{ + // id: _blur; + // anchors.fill: _source + // source: _source + // radius: 128 + // } +// + //ColorOverlay + // { + // anchors.fill: parent + // source: _blur; + // color: "#ee000000"; + // } + //} X.LabelHeadline5 { diff --git a/qml/crossQuick/Numeric.qml b/qml/crossQuick/Numeric.qml index 47dc3a5e306a41e93d5479d0be4ac760a448a359..e811c5627a7b011928cb0d6e914b66d99f055b9c 100644 --- a/qml/crossQuick/Numeric.qml +++ b/qml/crossQuick/Numeric.qml @@ -22,14 +22,12 @@ Control { id: _param param: _root.param value: _slid.value - // min: _slid.from - // max: _slid.to } from: _param.min to: _param.max value: _param.param.value; - stepSize: (param.decimals == undefined) ? 1 : .0/Math.pow(10, param.decimals) + stepSize: (_param.param.decimals == undefined) ? 1 : .0/Math.pow(10, param.decimals) X.ToolTip { parent: _slid.handle @@ -45,13 +43,17 @@ Control { anchors.left: parent.left; } - X.Label { - id: _label - text: _slid.value.toFixed(param.decimals) - color: "white" - + TextInput { + id: _label; anchors.bottom: parent.top; x: _slid.leftPadding + _slid.visualPosition * (_slid.availableWidth - width) + + text: _slid.value + color: "white" + validator: DoubleValidator{bottom: _param.min; top: _param.max; decimals: (_param.decimals) ? _param.decimals : 0 ; notation: DoubleValidator.StandardNotation} + onTextChanged: { + _slid.value = parseInt(text); + } } X.Label { @@ -96,7 +98,8 @@ Control { X.LabelCaption { text: param.label } Loader { - sourceComponent: paramType == "dtk::d_real" ? spinbox : slider + //sourceComponent: paramType == "dtkCoreParameterNumeric<double>" ? spinbox : slider + sourceComponent: slider Layout.fillWidth: true } } diff --git a/qml/crossQuick/ParameterNumeric.qml b/qml/crossQuick/ParameterNumeric.qml index 4081f392c2063632c7ec1f6b8bfa9c24a30432f8..06990e70e52a34fc8f02adb36369ae2f81bc8768 100644 --- a/qml/crossQuick/ParameterNumeric.qml +++ b/qml/crossQuick/ParameterNumeric.qml @@ -14,11 +14,11 @@ Item { property var value: param.value; property var min: param.min; property var max: param.max; - //property var decimals: param.decimals; + property var decimals: param.decimals; Binding { target: _root.param; property: "value"; value: _root.value} Binding { target: _root.param; property: "min"; value: _root.min} Binding { target: _root.param; property: "max"; value: _root.max} - //Binding { target: _root.param; property: "decimals"; value: _root.decimals; when:paramType == "dtk::d_real"} + Binding { target: _root.param; property: "decimals"; value: _root.decimals; when:paramType == "dtkCoreParameterNumeric<double>"} } \ No newline at end of file