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) {
|
function present(present) {
|
||||||
if (present)
|
if (present)
|
||||||
{
|
{
|
||||||
presentation.loadVideo();
|
/* presentation.loadVideo(); */
|
||||||
console.log("For window: Screen is: " + pWindow.screen + " And selected screen is: " + presentationScreen);
|
console.log("For window: Screen is: " + pWindow.screen + " And selected screen is: " + presentationScreen);
|
||||||
pWindow.showFullScreen();
|
pWindow.showFullScreen();
|
||||||
/* pWindow.screen = presentationScreen; */
|
/* pWindow.screen = presentationScreen; */
|
||||||
|
|
|
@ -46,13 +46,17 @@ FocusScope {
|
||||||
text: "Solo"
|
text: "Solo"
|
||||||
icon.name: "viewimage"
|
icon.name: "viewimage"
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
onClicked: serviceThing.slapVariantAround(ServiceItemModel.getItems());
|
onClicked: {
|
||||||
|
stack.replace(presenterView)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Controls.ToolButton {
|
Controls.ToolButton {
|
||||||
text: "Grid"
|
text: "Grid"
|
||||||
icon.name: "view-app-grid-symbolic"
|
icon.name: "view-app-grid-symbolic"
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
onClicked: serviceThing.checkActive();
|
onClicked: {
|
||||||
|
stack.replace(gridView)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Controls.ToolButton {
|
Controls.ToolButton {
|
||||||
text: "Details"
|
text: "Details"
|
||||||
|
@ -80,15 +84,24 @@ FocusScope {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Controls.StackView {
|
||||||
id: presenterView
|
id: stack
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
initialItem: presenterView
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Component {
|
||||||
|
id: presenterView
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: slideArea
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.bottomMargin: previewSlidesList.height
|
Item {
|
||||||
|
id: slideArea
|
||||||
|
implicitWidth: parent.width
|
||||||
|
implicitHeight: parent.height - previewSlidesList.height
|
||||||
|
/* anchors.bottomMargin: previewSlidesList.height */
|
||||||
|
|
||||||
Kirigami.Icon {
|
Kirigami.Icon {
|
||||||
source: "arrow-left"
|
source: "arrow-left"
|
||||||
|
@ -176,7 +189,7 @@ FocusScope {
|
||||||
// The active items X value from root
|
// The active items X value from root
|
||||||
property int activeX
|
property int activeX
|
||||||
id: previewSlidesList
|
id: previewSlidesList
|
||||||
anchors.bottom: presenterView.bottom
|
anchors.bottom: parent.bottom
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: Kirigami.Units.gridUnit * 9
|
height: Kirigami.Units.gridUnit * 9
|
||||||
orientation: ListView.Horizontal
|
orientation: ListView.Horizontal
|
||||||
|
@ -215,13 +228,42 @@ FocusScope {
|
||||||
}}
|
}}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Item {
|
Component {
|
||||||
id: gridView
|
id: gridView
|
||||||
Layout.fillHeight: true
|
/* Layout.fillHeight: true */
|
||||||
Layout.fillWidth: true
|
/* Layout.fillWidth: true */
|
||||||
Layout.alignment: Qt.AlignTop
|
/* Layout.alignment: Qt.AlignTop */
|
||||||
visible: false
|
/* 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
|
id: root
|
||||||
implicitHeight: Kirigami.Units.gridUnit * 6.5
|
implicitHeight: Kirigami.Units.gridUnit * 6.5
|
||||||
implicitWidth: Kirigami.Units.gridUnit * 10
|
implicitWidth: Kirigami.Units.gridUnit * 10
|
||||||
|
property bool showVidBG
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: previewHighlight
|
id: previewHighlight
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
@ -31,7 +32,7 @@ Item {
|
||||||
textSize: model.fontSize
|
textSize: model.fontSize
|
||||||
itemType: model.type
|
itemType: model.type
|
||||||
imageSource: model.imageBackground
|
imageSource: model.imageBackground
|
||||||
videoSource: model.videoBackground
|
videoSource: showVidBG ? model.videoBackground : ""
|
||||||
audioSource: ""
|
audioSource: ""
|
||||||
chosenFont: model.font
|
chosenFont: model.font
|
||||||
text: model.text
|
text: model.text
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue