making songeditor align text
This commit is contained in:
parent
86a5bbf93c
commit
e22ac445c5
6 changed files with 145 additions and 38 deletions
|
@ -13,7 +13,8 @@ Item {
|
|||
|
||||
property string imageBackground
|
||||
property string videoBackground
|
||||
property string textAlignment
|
||||
property var hTextAlignment
|
||||
property var vTextAlignment
|
||||
|
||||
Presenter.Slide {
|
||||
id: representation
|
||||
|
@ -22,14 +23,17 @@ Item {
|
|||
editMode: true
|
||||
imageSource: imageBackground
|
||||
videoSource: videoBackground
|
||||
horizontalAlignment: hTextAlignment
|
||||
verticalAlignment: vTextAlignment
|
||||
preview: true
|
||||
}
|
||||
|
||||
Component.onCompleted: updateHAlignment(textAlignment)
|
||||
Component.onCompleted: {
|
||||
}
|
||||
|
||||
function loadVideo() {
|
||||
representation.loadVideo();
|
||||
representation.pause();
|
||||
representation.pauseVideo();
|
||||
}
|
||||
|
||||
function updateHAlignment(alignment) {
|
||||
|
@ -48,4 +52,18 @@ Item {
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
function updateVAlignment(alignment) {
|
||||
switch (alignment) {
|
||||
case "top" :
|
||||
representation.verticalAlignment = Text.AlignBottom;
|
||||
break;
|
||||
case "center" :
|
||||
representation.verticalAlignment = Text.AlignVCenter;
|
||||
break;
|
||||
case "bottom" :
|
||||
representation.verticalAlignment = Text.AlignBottom;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue