Warning, /rolisteam/rolisteam/src/libraries/charactersheet/qml/Rolisteam/SliderField.qml is written in an unsupported language. File is not indexed.
0001 import QtQuick 0002 import QtQuick.Controls 0003 import Rolisteam 0004 0005 Slider { 0006 id: _root 0007 required property QtObject field 0008 property bool readOnly: false 0009 property color backgroundColor 0010 property color valueColor 0011 property color handleColor: _root.pressed ? "#f0f0f0" : "#f6f6f6" 0012 property color handleBorderColor: "#bdbebf" 0013 enabled: !_root.readOnly 0014 property string tooltip: "" 0015 ToolTip.text: _root.tooltip 0016 ToolTip.visible: _root.tooltip.length >0 && checkbox.pressed 0017 0018 background: Rectangle { 0019 x: _root.leftPadding 0020 y: _root.topPadding + _root.availableHeight / 2 - height / 2 0021 width: _root.availableWidth 0022 height: _root.height 0023 radius: 2 0024 color: _root.backgroundColor 0025 0026 Rectangle { 0027 width: _root.visualPosition * parent.width 0028 height: parent.height 0029 color: _root.valueColor 0030 radius: 2 0031 } 0032 } 0033 0034 handle: Rectangle { 0035 x: -width/2 + _root.leftPadding + _root.visualPosition * _root.width 0036 y: _root.topPadding + _root.availableHeight / 2 - height / 2 0037 implicitWidth: _root.height 0038 height: _root.height 0039 radius: _root.height/4 0040 border.color: _root.handleBorderColor 0041 color: _root.handleColor 0042 } 0043 0044 onMoved: { 0045 if(_root.field) 0046 _root.field.value = _root.value 0047 } 0048 }