fix bug: changing video backgrounds don't properly show up in ui

This commit is contained in:
Chris Cochrun 2023-11-20 12:45:57 -06:00
parent a1ecfaaef9
commit f582c5464e
3 changed files with 12 additions and 3 deletions

View file

@ -3,7 +3,7 @@
:CATEGORY: dev :CATEGORY: dev
:END: :END:
* Tasks [58%] [44/75] * Tasks [60%] [45/75]
** TODO Mouse needs to have resize shape when hovering controls ** TODO Mouse needs to have resize shape when hovering controls
[[file:~/dev/lumina/src/qml/presenter/SongEditor.qml::Controls.SplitView {]] [[file:~/dev/lumina/src/qml/presenter/SongEditor.qml::Controls.SplitView {]]
** TODO Add a way to interact with OBS ** TODO Add a way to interact with OBS
@ -13,7 +13,7 @@ The basic implementation is done. In order to make use of it in the odd broken Q
Once the model of OBS scenes is created, we can select a scene to add it to the service item. Then hopefully activate will take that scene and set it inside obs when switching slides. Once the model of OBS scenes is created, we can select a scene to add it to the service item. Then hopefully activate will take that scene and set it inside obs when switching slides.
*** TODO OBWS setting scenes *** TODO OBWS setting scenes
This has been really tricky since there is something of a bug when using =runtime.block_on()= rather than having a single cohesive tokio runtime. So, perhaps I need to figure out if I can't make a runtime that works for the whole app so that I can manage these a little better. This has been really tricky since there is something of a bug when using =runtime.block_on()= rather than having a single cohesive tokio runtime. So, perhaps I need to figure out if I can't make a runtime that works for the whole app so that I can manage these a little better.
** TODO When updating background, it isn't changed in the list ** DONE When updating background, it isn't changed in the list
[[file:~/dev/lumina/src/qml/presenter/SongEditor.qml::function updateBackground(backgroundType) {]] [[file:~/dev/lumina/src/qml/presenter/SongEditor.qml::function updateBackground(backgroundType) {]]
** TODO Find segfault in webengine ** TODO Find segfault in webengine
[[file:~/dev/lumina/src/qml/presenter/Slide.qml::id: web]] [[file:~/dev/lumina/src/qml/presenter/Slide.qml::id: web]]

View file

@ -71,11 +71,12 @@ Controls.Page {
anchors.fill: parent anchors.fill: parent
handle: Item { handle: Item {
implicitWidth: Kirigami.Units.gridUnit / 2 implicitWidth: Kirigami.Units.gridUnit / 2
Rectangle { Rectangle {
height: parent.height height: parent.height
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
width: parent.width / 4 width: parent.width / 4
color: area.containsMouse ? Kirigami.Theme.hoverColor : "#00000000" color: Qt.lighter(Kirigami.Theme.backgroundColor)
} }
MouseArea { MouseArea {

View file

@ -85,6 +85,14 @@ Item {
function playPauseVideo() { function playPauseVideo() {
representation.playPauseVideo(); representation.playPauseVideo();
} }
Connections {
target: songEditorModel
function onBackgroundChanged() {
console.log("BG CHANGED: Load video or clear it");
representation.loadVideo();
}
}
} }
Kirigami.WheelHandler { Kirigami.WheelHandler {