main
朱子楚\zhuzi 2023-03-25 14:23:16 +08:00
parent a59010ec72
commit fcdb05b7d1
2 changed files with 8 additions and 14 deletions

View File

@ -21,10 +21,7 @@ FluScrollablePage{
} }
FluMediaPlayer{ FluMediaPlayer{
source:{ source:"http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"
console.debug("-------------->")
return "http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"
}
} }
} }

View File

@ -6,7 +6,6 @@ Item{
id:root id:root
property int lineSize: 4
property int size: 180 property int size: 180
property int dotSize: 24 property int dotSize: 24
@ -38,19 +37,18 @@ Item{
seek(0) seek(0)
} }
FluRectangle { Rectangle {
id: control id: control
width: isHorizontal ? size : root.lineSize width: isHorizontal ? size : 4
height: isHorizontal ? root.lineSize : size height: isHorizontal ? 4 : size
radius: [3,3,3,3] radius: 2
clip: true
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
color:FluTheme.isDark ? Qt.rgba(162/255,162/255,162/255,1) : Qt.rgba(138/255,138/255,138/255,1) color:FluTheme.isDark ? Qt.rgba(162/255,162/255,162/255,1) : Qt.rgba(138/255,138/255,138/255,1)
Rectangle{ Rectangle{
id:rect id:rect
radius: 3 radius: 2.5
width: isHorizontal ? control.width*(value/maxValue) : control.width width: isHorizontal ? control.width*(value/maxValue) : 5
height: isHorizontal ? control.height : control.height*(value/maxValue) height: isHorizontal ? 5 : control.height*(value/maxValue)
color:FluTheme.isDark ? FluTheme.primaryColor.lighter :FluTheme.primaryColor.dark color:FluTheme.isDark ? FluTheme.primaryColor.lighter :FluTheme.primaryColor.dark
} }
} }
@ -112,7 +110,6 @@ Item{
} }
function seek(position){ function seek(position){
console.debug(position)
if(isHorizontal){ if(isHorizontal){
dot.x =position/maxValue*control.width - dotSize/2 dot.x =position/maxValue*control.width - dotSize/2
root.value = Qt.binding(function(){ root.value = Qt.binding(function(){