Warning, /maui/mauikit-imagetools/src/controls.6/private/Ruler.qml is written in an unsupported language. File is not indexed.

0001 import QtQuick
0002 import QtQuick.Controls
0003 import QtQuick.Layouts
0004 
0005 // import QtQuick.Extras
0006 // import QtQuick.Controls.Styles 
0007 
0008 import org.mauikit.controls as Maui
0009 
0010 Slider
0011 {
0012     id: control
0013 
0014     live: true
0015 
0016     leftPadding: 0
0017     rightPadding:  0
0018 
0019     implicitHeight: Maui.Style.toolBarHeight
0020     implicitWidth: width
0021 
0022     // background: Gauge
0023     // {
0024     //     x: control.leftPadding
0025     //     y: control.topPadding
0026     //     implicitWidth: control.horizontal ? 500 : control.width
0027     //     implicitHeight: control.horizontal ? control.height : 500
0028     //     width: control.horizontal ? control.availableWidth  : implicitWidth
0029     //     height: control.horizontal ? implicitHeight : control.availableHeight
0030     // 
0031     //     minimumValue: control.from
0032     //     value: control.value
0033     //     maximumValue: control.to
0034     //     orientation: control.orientation
0035     //     tickmarkAlignment: Qt.AlignTop
0036     //     tickmarkStepSize: isWide ?  45 : 90
0037     //     minorTickmarkCount: isWide ? 6 : 4
0038     // 
0039     //     Behavior on value {
0040     //         NumberAnimation {
0041     //             duration: 1000
0042     //         }
0043     //     }
0044     // 
0045     //     style: GaugeStyle {
0046     //         valueBar: Item{}
0047     // 
0048     //         minorTickmark: Item {
0049     //             implicitWidth: 5
0050     //             implicitHeight: 2
0051     // 
0052     //             Rectangle {
0053     //                 color: Maui.Theme.textColor
0054     //                 anchors.fill: parent
0055     //             }
0056     //         }
0057     // 
0058     //         tickmark: Item {
0059     //             implicitWidth: 10
0060     //             implicitHeight: 2
0061     // 
0062     //             Rectangle {
0063     //                 color: Maui.Theme.textColor
0064     //                 anchors.fill: parent
0065     //             }
0066     //         }
0067     // 
0068     //         tickmarkLabel: Item {
0069     //             implicitWidth: 16
0070     //             implicitHeight: 16
0071     // 
0072     //             Label {
0073     //                 visible: control.value !== styleData.value
0074     //                 color: Maui.Theme.textColor
0075     //                 text: styleData.value + "°"
0076     //                 horizontalAlignment: Text.AlignHCenter
0077     //                 verticalAlignment: Text.AlignVCenter
0078     //                 anchors.fill: parent
0079     //                 font.pointSize: Maui.Style.fontSizes.tiny
0080     //             }
0081     //         }
0082     //     }
0083     // }
0084 
0085     handle: Column
0086     {
0087         id: handle
0088         x: (control.horizontal ? control.visualPosition * (control.availableWidth - width) : 0)
0089         y:  0
0090         spacing: 0
0091         width: 32
0092         //        implicitHeight: Maui.Style.iconSizes.medium
0093 
0094         Rectangle
0095         {
0096              width: parent.width
0097              height: 16
0098              color: Maui.Theme.backgroundColor
0099              radius: Maui.Style.radiusV
0100                 Label
0101                 {
0102                    anchors.fill: parent
0103                     font.bold: true
0104                     font.weight: Font.Bold
0105                     font.pointSize: Maui.Style.fontSizes.small
0106 text: control.value + "°"
0107                     horizontalAlignment: Text.AlignHCenter
0108                     verticalAlignment: Text.AlignVCenter
0109                 }
0110         }
0111 
0112         Maui.Icon
0113         {
0114             anchors.horizontalCenter: parent.horizontalCenter
0115             height: 32
0116             width: height
0117             color: Maui.Theme.textColor
0118             isMask: true
0119             source: "qrc:/assets/arrow-up.svg"
0120         }
0121 
0122     }
0123 }