diff --git a/example/App.qml b/example/App.qml index 137a62b2..235c77c3 100644 --- a/example/App.qml +++ b/example/App.qml @@ -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() } diff --git a/example/page/MediaPlayerPage.qml b/example/page/MediaPage.qml similarity index 100% rename from example/page/MediaPlayerPage.qml rename to example/page/MediaPage.qml diff --git a/example/qml.qrc b/example/qml.qrc index 86581805..09cfb5a1 100644 --- a/example/qml.qrc +++ b/example/qml.qrc @@ -152,6 +152,6 @@ global/ItemsOriginal.qml global/qmldir global/ItemsFooter.qml - page/MediaPlayerPage.qml + page/MediaPage.qml diff --git a/src/controls/FluAppBar.qml b/src/controls/FluAppBar.qml index 62861f5c..9fb3b95d 100644 --- a/src/controls/FluAppBar.qml +++ b/src/controls/FluAppBar.qml @@ -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 diff --git a/src/controls/FluMediaPlayer.qml b/src/controls/FluMediaPlayer.qml index 88cfcc9a..87a5230f 100644 --- a/src/controls/FluMediaPlayer.qml +++ b/src/controls/FluMediaPlayer.qml @@ -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) { diff --git a/src/controls/TFpsMonitor.qml b/src/controls/TFpsMonitor.qml deleted file mode 100644 index 4bc939c5..00000000 --- a/src/controls/TFpsMonitor.qml +++ /dev/null @@ -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; - } - } - } -} diff --git a/src/res.qrc b/src/res.qrc index 1a9b6bb8..0628a0c2 100644 --- a/src/res.qrc +++ b/src/res.qrc @@ -22,7 +22,6 @@ controls/FluIcon.qml controls/FluDivider.qml controls/FluTooltip.qml - controls/TFpsMonitor.qml controls/FluTextBoxBackground.qml controls/FluMultiLineTextBox.qml controls/FluWindowResize.qml