Browse Source

Temporary forced multimedia backend to OS default due to https://bugreports.qt.io/browse/QTBUG-111910

Fixed Play/Pause button state when page is changed

Signed-off-by: Blagovest Petrov <blagovest@petrovs.info>
qt6
Blagovest Petrov 2 years ago
parent
commit
b344128b3f
  1. 6
      CMakeLists.txt
  2. 1
      ui/MediaButton.qml
  3. 5
      ui/PgLive.qml
  4. 2
      ui/main.qml

6
CMakeLists.txt

@ -15,6 +15,12 @@ qt_standard_project_setup(REQUIRES 6.5)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
if (WIN32)
set(QT_DEFAULT_MEDIA_BACKEND windows)
else()
set(QT_DEFAULT_MEDIA_BACKEND gstreamer)
endif()
list(APPEND QML_ASSETS
Assets/tangra.ico
Assets/pause-button.svg

1
ui/MediaButton.qml

@ -11,6 +11,7 @@ Image {
property bool isClicked: false
function changeIconState() {
if ( thePlayer.playbackState === 1) {
buttonIcon.source = "qrc:/bpetrov.tangraplay/imports/TangraPlay/Assets/buuf-pause.png"
}

5
ui/PgLive.qml

@ -54,6 +54,11 @@ Item {
y: 291
width: 64
height: 64
Component.onCompleted: {
playPause.changeIconState()
}
MouseArea {
anchors.fill: parent
onClicked: {

2
ui/main.qml

@ -76,6 +76,8 @@ ApplicationWindow {
id: stackLive
PgLive {
id: pgLive
}
}
Component {

Loading…
Cancel
Save