mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-26 21:37:04 +08:00
update
This commit is contained in:
parent
936a310ca6
commit
1e5bd75123
@ -16,9 +16,9 @@ Window {
|
||||
"/about":"qrc:/page/AboutPage.qml",
|
||||
"/login":"qrc:/page/LoginPage.qml",
|
||||
"/chat":"qrc:/page/ChatPage.qml",
|
||||
"/mediaplayer":"qrc:/page/MediaPlayerPage.qml",
|
||||
"/media":"qrc:/page/MediaPage.qml",
|
||||
}
|
||||
FluApp.initialRoute = "/"
|
||||
FluApp.initialRoute = "/media"
|
||||
FluApp.run()
|
||||
}
|
||||
|
||||
|
@ -152,6 +152,6 @@
|
||||
<file>global/ItemsOriginal.qml</file>
|
||||
<file>global/qmldir</file>
|
||||
<file>global/ItemsFooter.qml</file>
|
||||
<file>page/MediaPlayerPage.qml</file>
|
||||
<file>page/MediaPage.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
@ -55,13 +55,6 @@ Rectangle{
|
||||
height: root.height
|
||||
spacing: 0
|
||||
|
||||
TFpsMonitor{
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
Layout.rightMargin: 20
|
||||
Layout.topMargin: 5
|
||||
color:root.textColor
|
||||
visible: showFps
|
||||
}
|
||||
|
||||
RowLayout{
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
|
@ -31,7 +31,6 @@ Rectangle {
|
||||
audioOutput: AudioOutput{
|
||||
id:audio_output
|
||||
}
|
||||
|
||||
onErrorChanged:
|
||||
(error)=> {
|
||||
console.debug(error)
|
||||
@ -73,13 +72,11 @@ Rectangle {
|
||||
MouseArea{
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
||||
Behavior on y{
|
||||
NumberAnimation{
|
||||
duration: 150
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle{
|
||||
anchors.fill: parent
|
||||
color:FluTheme.dark ? Qt.rgba(45/255,45/255,45/255,0.97) : Qt.rgba(237/255,237/255,237/255,0.97)
|
||||
@ -101,13 +98,11 @@ Rectangle {
|
||||
mediaplayer.autoSeek = true
|
||||
mediaplayer.play()
|
||||
}
|
||||
|
||||
onValueChanged: {
|
||||
if(mediaplayer.autoSeek == false){
|
||||
mediaplayer.position = value*mediaplayer.duration/slider.maxValue
|
||||
}
|
||||
}
|
||||
|
||||
onLineClickFunc:function(val){
|
||||
mediaplayer.position = val*mediaplayer.duration/slider.maxValue
|
||||
}
|
||||
@ -198,7 +193,6 @@ Rectangle {
|
||||
audio_output.volume = value/100
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function formatDuration(duration) {
|
||||
|
@ -1,71 +0,0 @@
|
||||
import QtQuick
|
||||
import FluentUI
|
||||
|
||||
Item {
|
||||
|
||||
readonly property alias fps: _private.fps;
|
||||
readonly property alias fpsAvg: _private.fpsAvg;
|
||||
property color color: "#C0C0C0"
|
||||
property Component contentItem: contentComponent;
|
||||
|
||||
id: control
|
||||
width: contentItemLoader.width + 5;
|
||||
height: contentItemLoader.height + 5;
|
||||
|
||||
|
||||
|
||||
Component{
|
||||
id:contentComponent
|
||||
FluText{
|
||||
color:control.color
|
||||
text: " Avg " + fpsAvg + " | " + fps + " Fps";
|
||||
}
|
||||
}
|
||||
|
||||
FluObject{
|
||||
id:_private;
|
||||
property int frameCounter: 0
|
||||
property int frameCounterAvg: 0
|
||||
property int counter: 0
|
||||
property int fps: 0
|
||||
property int fpsAvg: 0
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: monitor
|
||||
radius: 3
|
||||
width: 6
|
||||
height: width
|
||||
opacity: 0;
|
||||
|
||||
NumberAnimation on rotation {
|
||||
from:0
|
||||
to: 360
|
||||
duration: 800
|
||||
loops: Animation.Infinite
|
||||
}
|
||||
onRotationChanged: _private.frameCounter++;
|
||||
}
|
||||
|
||||
Loader{
|
||||
id:contentItemLoader
|
||||
sourceComponent: contentItem
|
||||
}
|
||||
|
||||
Timer {
|
||||
interval: 2000
|
||||
repeat: true
|
||||
running: visible
|
||||
onTriggered: {
|
||||
_private.frameCounterAvg += _private.frameCounter;
|
||||
_private.fps = _private.frameCounter/2;
|
||||
_private.counter++;
|
||||
_private.frameCounter = 0;
|
||||
if (_private.counter >= 3) {
|
||||
_private.fpsAvg = _private.frameCounterAvg/(2 * _private.counter)
|
||||
_private.frameCounterAvg = 0;
|
||||
_private.counter = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -22,7 +22,6 @@
|
||||
<file>controls/FluIcon.qml</file>
|
||||
<file>controls/FluDivider.qml</file>
|
||||
<file>controls/FluTooltip.qml</file>
|
||||
<file>controls/TFpsMonitor.qml</file>
|
||||
<file>controls/FluTextBoxBackground.qml</file>
|
||||
<file>controls/FluMultiLineTextBox.qml</file>
|
||||
<file>controls/FluWindowResize.qml</file>
|
||||
|
Loading…
Reference in New Issue
Block a user