diff --git a/src/qml/presenter/SongEditor.qml b/src/qml/presenter/SongEditor.qml index 3dff434..d2b736a 100644 --- a/src/qml/presenter/SongEditor.qml +++ b/src/qml/presenter/SongEditor.qml @@ -34,6 +34,7 @@ Item { hoverEnabled: true /* flat: true */ onActivated: updateFont(currentText) + onAccepted: updateFont(currentText) background: Presenter.TextBackground { control: fontBox } @@ -445,8 +446,8 @@ Item { Presenter.SongEditorSlideList { id: songList - imageBackground: songEditorModel.backgroundType === "image" ? songEditor.background : "" - videoBackground: songEditorModel.backgroundType === "video" ? songEditor.background : "" + imageBackground: songEditorModel.backgroundType === "image" ? song.background : "" + videoBackground: songEditorModel.backgroundType === "video" ? song.background : "" font: songEditorModel.font fontSize: songEditorModel.fontSize /* hTextAlignment: songEditorModel.horizontalTextAlignment */ @@ -543,6 +544,7 @@ Item { function updateTitle(title) { songProxyModel.songModel.updateTitle(songIndex, title) + song.title = title; } function updateAuthor(author) { @@ -590,6 +592,7 @@ Item { } function updateFont(font) { + showPassiveNotification(font); changeSlideFont(font, false); songProxyModel.songModel.updateFont(songIndex, font); song.font = font; diff --git a/src/rust/songs/song_editor.rs b/src/rust/songs/song_editor.rs index 2dd42b7..9b721ca 100644 --- a/src/rust/songs/song_editor.rs +++ b/src/rust/songs/song_editor.rs @@ -16,8 +16,8 @@ pub mod song_editor { type QStringList = cxx_qt_lib::QStringList; include!("cxx-qt-lib/qlist.h"); type QList_QString = cxx_qt_lib::QList; - #[cxx_name = "SongModel"] - type CxxSongs = crate::songs::song_model::qobject::SongModel; + // #[cxx_name = "SongModel"] + // type CxxSongs = crate::songs::song_model::qobject::SongModel; } #[derive(Clone, Debug)] @@ -49,8 +49,8 @@ pub mod song_editor { font: QString, #[qproperty] font_size: i32, - #[qproperty] - song_model: *mut CxxSongs, + // #[qproperty] + // song_model: *mut CxxSongs, } impl Default for SongEditor { @@ -69,7 +69,7 @@ pub mod song_editor { vertical_text_alignment: QString::default(), font: QString::default(), font_size: 50, - song_model: std::ptr::null_mut(), + // song_model: std::ptr::null_mut(), } } }