Warning, /maui/clip/src/views/FloatingVideo.qml is written in an unsupported language. File is not indexed.
0001 import QtQuick 2.15 0002 import QtQuick.Controls 2.15 0003 0004 import QtQuick.Layouts 1.3 0005 import QtGraphicalEffects 1.0 0006 0007 import org.mauikit.controls 1.3 as Maui 0008 0009 Item 0010 { 0011 id: control 0012 Maui.Theme.inherit: false 0013 Maui.Theme.colorSet: Maui.Theme.Complementary 0014 0015 implicitHeight: diskBg.height 0016 implicitWidth: diskBg.width 0017 0018 x: root.footer.x + Maui.Style.space.medium 0019 y: parent.height - height - Maui.Style.space.medium 0020 0021 parent: ApplicationWindow.overlay 0022 z: parent.z + 1 0023 ToolTip.delay: 1000 0024 ToolTip.timeout: 5000 0025 ToolTip.visible: _mouseArea.containsMouse && !Maui.Handy.isMobile 0026 ToolTip.text: root.title 0027 0028 MouseArea 0029 { 0030 id: _mouseArea 0031 anchors.fill: parent 0032 hoverEnabled: true 0033 0034 drag.target: parent 0035 drag.axis: Drag.XAndYAxis 0036 drag.minimumX: 0 0037 drag.maximumX: root.width - control.width 0038 0039 drag.minimumY: 0 0040 drag.maximumY: root.height - control.height 0041 onClicked: toggleViewer() 0042 0043 ShaderEffectSource 0044 { 0045 id: diskBg 0046 anchors.centerIn: parent 0047 height: sourceItem.height * 0.35 0048 width: sourceItem.width * 0.35 0049 hideSource: visible 0050 live: true 0051 textureSize: Qt.size(width,height) 0052 sourceItem: player.video 0053 0054 } 0055 0056 DropShadow 0057 { 0058 anchors.fill: diskBg 0059 horizontalOffset: 0 0060 verticalOffset: 0 0061 radius: _mouseArea.containsPress ? 5.0 :8.0 0062 samples: 17 0063 color: "#80000000" 0064 source: diskBg 0065 } 0066 } 0067 0068 Slider 0069 { 0070 id: _slider 0071 padding: 0 0072 height: Maui.Style.iconSizes.small 0073 anchors.left: parent.left 0074 anchors.right: parent.right 0075 anchors.bottom: parent.bottom 0076 orientation: Qt.Horizontal 0077 from: 0 0078 to: player.video.duration 0079 value: player.video.position 0080 0081 onMoved: player.video.seek( _slider.value ) 0082 0083 // onToChanged: value = player.video.position 0084 0085 spacing: 0 0086 focus: true 0087 0088 background: Rectangle 0089 { 0090 implicitWidth: _slider.width 0091 implicitHeight: _slider.height 0092 width: _slider.availableWidth 0093 height: implicitHeight 0094 color: "transparent" 0095 opacity: 1 0096 0097 Rectangle 0098 { 0099 width: _slider.visualPosition * parent.width 0100 height: _slider.height 0101 color: Maui.Theme.highlightColor 0102 } 0103 } 0104 0105 handle: Rectangle 0106 { 0107 x: _slider.leftPadding + _slider.visualPosition 0108 * (_slider.availableWidth - width) 0109 y: 0 0110 implicitWidth: Maui.Style.iconSizes.medium 0111 implicitHeight: _slider.height 0112 color: _slider.pressed ? Qt.lighter(Maui.Theme.highlightColor, 1.2) : "transparent" 0113 } 0114 } 0115 }