some changes to the gridview and presentation previewer
This commit is contained in:
parent
1dfe58c996
commit
ca399bb8cd
3 changed files with 161 additions and 118 deletions
|
@ -275,7 +275,7 @@ Controls.Page {
|
|||
function present(present) {
|
||||
if (present)
|
||||
{
|
||||
presentation.loadVideo();
|
||||
/* presentation.loadVideo(); */
|
||||
console.log("For window: Screen is: " + pWindow.screen + " And selected screen is: " + presentationScreen);
|
||||
pWindow.showFullScreen();
|
||||
/* pWindow.screen = presentationScreen; */
|
||||
|
|
|
@ -46,13 +46,17 @@ FocusScope {
|
|||
text: "Solo"
|
||||
icon.name: "viewimage"
|
||||
hoverEnabled: true
|
||||
onClicked: serviceThing.slapVariantAround(ServiceItemModel.getItems());
|
||||
onClicked: {
|
||||
stack.replace(presenterView)
|
||||
}
|
||||
}
|
||||
Controls.ToolButton {
|
||||
text: "Grid"
|
||||
icon.name: "view-app-grid-symbolic"
|
||||
hoverEnabled: true
|
||||
onClicked: serviceThing.checkActive();
|
||||
onClicked: {
|
||||
stack.replace(gridView)
|
||||
}
|
||||
}
|
||||
Controls.ToolButton {
|
||||
text: "Details"
|
||||
|
@ -80,15 +84,24 @@ FocusScope {
|
|||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
id: presenterView
|
||||
Controls.StackView {
|
||||
id: stack
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
initialItem: presenterView
|
||||
|
||||
}
|
||||
|
||||
Component {
|
||||
id: presenterView
|
||||
|
||||
Item {
|
||||
id: slideArea
|
||||
anchors.fill: parent
|
||||
anchors.bottomMargin: previewSlidesList.height
|
||||
Item {
|
||||
id: slideArea
|
||||
implicitWidth: parent.width
|
||||
implicitHeight: parent.height - previewSlidesList.height
|
||||
/* anchors.bottomMargin: previewSlidesList.height */
|
||||
|
||||
Kirigami.Icon {
|
||||
source: "arrow-left"
|
||||
|
@ -176,7 +189,7 @@ FocusScope {
|
|||
// The active items X value from root
|
||||
property int activeX
|
||||
id: previewSlidesList
|
||||
anchors.bottom: presenterView.bottom
|
||||
anchors.bottom: parent.bottom
|
||||
width: parent.width
|
||||
height: Kirigami.Units.gridUnit * 9
|
||||
orientation: ListView.Horizontal
|
||||
|
@ -215,13 +228,42 @@ FocusScope {
|
|||
}}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
Component {
|
||||
id: gridView
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignTop
|
||||
visible: false
|
||||
/* Layout.fillHeight: true */
|
||||
/* Layout.fillWidth: true */
|
||||
/* Layout.alignment: Qt.AlignTop */
|
||||
/* visible: false */
|
||||
|
||||
GridView {
|
||||
// The active items X value from root
|
||||
property int activeX
|
||||
id: previewSlidesGrid
|
||||
anchors.fill: parent
|
||||
cellWidth: Kirigami.Units.gridUnit * 11
|
||||
cellHeight: Kirigami.Units.gridUnit * 8
|
||||
/* spacing: Kirigami.Units.smallSpacing * 2 */
|
||||
cacheBuffer: 200
|
||||
reuseItems: false
|
||||
clip: true
|
||||
model: SlideModel
|
||||
delegate: Presenter.PreviewSlideListDelegate { showVidBG: false }
|
||||
|
||||
Kirigami.WheelHandler {
|
||||
id: gridWheelHandler
|
||||
target: previewSlidesGrid
|
||||
filterMouseEvents: true
|
||||
}
|
||||
|
||||
Controls.ScrollBar.vertical: Controls.ScrollBar {
|
||||
active: hovered || pressed
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ Item {
|
|||
id: root
|
||||
implicitHeight: Kirigami.Units.gridUnit * 6.5
|
||||
implicitWidth: Kirigami.Units.gridUnit * 10
|
||||
property bool showVidBG
|
||||
Rectangle {
|
||||
id: previewHighlight
|
||||
anchors.centerIn: parent
|
||||
|
@ -31,7 +32,7 @@ Item {
|
|||
textSize: model.fontSize
|
||||
itemType: model.type
|
||||
imageSource: model.imageBackground
|
||||
videoSource: model.videoBackground
|
||||
videoSource: showVidBG ? model.videoBackground : ""
|
||||
audioSource: ""
|
||||
chosenFont: model.font
|
||||
text: model.text
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue