attempting to make main ui more consistent
This commit is contained in:
parent
066ec9eb1a
commit
be59eadc58
1 changed files with 123 additions and 116 deletions
|
@ -36,7 +36,7 @@ FocusScope {
|
||||||
|
|
||||||
GridLayout {
|
GridLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
/* anchors.bottomMargin: 40 */
|
anchors.bottomMargin: 50
|
||||||
columns: 3
|
columns: 3
|
||||||
rowSpacing: 5
|
rowSpacing: 5
|
||||||
columnSpacing: 0
|
columnSpacing: 0
|
||||||
|
@ -82,45 +82,54 @@ FocusScope {
|
||||||
Layout.columnSpan: 3
|
Layout.columnSpan: 3
|
||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.Icon {
|
Item {
|
||||||
source: "arrow-left"
|
Layout.fillHeight: true
|
||||||
Layout.preferredWidth: 100
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: 200
|
Layout.columnSpan: 3
|
||||||
Layout.alignment: Qt.AlignRight
|
|
||||||
MouseArea {
|
|
||||||
anchors.fill: parent
|
|
||||||
onPressed: previousSlideAction()
|
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Presenter.Slide {
|
Kirigami.Icon {
|
||||||
id: previewSlide
|
source: "arrow-left"
|
||||||
Layout.preferredWidth: 700
|
implicitWidth: 100
|
||||||
Layout.preferredHeight: width / 16 * 9
|
implicitHeight: 200
|
||||||
Layout.minimumWidth: 300
|
anchors.right: previewSlide.left
|
||||||
Layout.alignment: Qt.AlignCenter
|
/* Layout.alignment: Qt.AlignRight */
|
||||||
textSize: width / 15
|
MouseArea {
|
||||||
itemType: root.itemType
|
anchors.fill: parent
|
||||||
imageSource: imagebackground
|
onPressed: previousSlideAction()
|
||||||
videoSource: vidbackground
|
cursorShape: Qt.PointingHandCursor
|
||||||
audioSource: SlideObject.audio
|
}
|
||||||
chosenFont: SlideObject.font
|
|
||||||
text: SlideObject.text
|
|
||||||
pdfIndex: SlideObject.pdfIndex
|
|
||||||
preview: true
|
|
||||||
}
|
|
||||||
|
|
||||||
Kirigami.Icon {
|
|
||||||
source: "arrow-right"
|
|
||||||
Layout.preferredWidth: 100
|
|
||||||
Layout.preferredHeight: 200
|
|
||||||
Layout.alignment: Qt.AlignLeft
|
|
||||||
MouseArea {
|
|
||||||
anchors.fill: parent
|
|
||||||
onPressed: nextSlideAction()
|
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Presenter.Slide {
|
||||||
|
id: previewSlide
|
||||||
|
implicitWidth: 700
|
||||||
|
implicitHeight: width / 16 * 9
|
||||||
|
/* minimumWidth: 300 */
|
||||||
|
anchors.centerIn: parent
|
||||||
|
textSize: width / 15
|
||||||
|
itemType: root.itemType
|
||||||
|
imageSource: imagebackground
|
||||||
|
videoSource: vidbackground
|
||||||
|
audioSource: SlideObject.audio
|
||||||
|
chosenFont: SlideObject.font
|
||||||
|
text: SlideObject.text
|
||||||
|
pdfIndex: SlideObject.pdfIndex
|
||||||
|
preview: true
|
||||||
|
}
|
||||||
|
|
||||||
|
Kirigami.Icon {
|
||||||
|
source: "arrow-right"
|
||||||
|
implicitWidth: 100
|
||||||
|
implicitHeight: 200
|
||||||
|
anchors.left: previewSlide.right
|
||||||
|
/* Layout.alignment: Qt.AlignLeft */
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
onPressed: nextSlideAction()
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
@ -175,87 +184,85 @@ FocusScope {
|
||||||
Layout.columnSpan: 3
|
Layout.columnSpan: 3
|
||||||
}
|
}
|
||||||
|
|
||||||
ListView {
|
/* Item { */
|
||||||
id: previewSlidesList
|
/* /\* Layout.preferredHeight: 20 *\/ */
|
||||||
Layout.fillWidth: true
|
/* Layout.fillHeight: true */
|
||||||
Layout.fillHeight: true
|
/* Layout.fillWidth: true */
|
||||||
Layout.columnSpan: 3
|
/* Layout.columnSpan: 3 */
|
||||||
orientation: ListView.Horizontal
|
/* } */
|
||||||
cacheBuffer: 900
|
|
||||||
reuseItems: true
|
|
||||||
|
|
||||||
model: serviceItemModel
|
|
||||||
delegate: Rectangle {
|
|
||||||
id: previewHighlight
|
|
||||||
implicitWidth: 210
|
|
||||||
implicitHeight: width / 16 * 9
|
|
||||||
color: {
|
|
||||||
if (active || previewerMouse.containsMouse)
|
|
||||||
Kirigami.Theme.highlightColor
|
|
||||||
else
|
|
||||||
Kirigami.Theme.backgroundColor
|
|
||||||
}
|
|
||||||
|
|
||||||
Presenter.Slide {
|
|
||||||
id: previewSlideItem
|
|
||||||
anchors.centerIn: parent
|
|
||||||
implicitWidth: 200
|
|
||||||
implicitHeight: width / 16 * 9
|
|
||||||
textSize: width / 4
|
|
||||||
itemType: type
|
|
||||||
imageSource: backgroundType === "image" ? background : ""
|
|
||||||
videoSource: backgroundType === "video" ? background : ""
|
|
||||||
audioSource: ""
|
|
||||||
chosenFont: font
|
|
||||||
text: model.text[0] === "This is demo text" ? "" : model.text[0]
|
|
||||||
pdfIndex: 0
|
|
||||||
preview: true
|
|
||||||
editMode: true
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
Controls.Label {
|
|
||||||
id: slidesTitle
|
|
||||||
width: previewSlideItem.width
|
|
||||||
anchors.top: previewSlideItem.bottom
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
|
||||||
anchors.topMargin: 5
|
|
||||||
elide: Text.ElideRight
|
|
||||||
text: name
|
|
||||||
/* font.family: "Quicksand Bold" */
|
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
id: previewerMouse
|
|
||||||
anchors.fill: parent
|
|
||||||
hoverEnabled: true
|
|
||||||
onClicked: changeServiceItem(index)
|
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Connections {
|
|
||||||
target: serviceItemModel
|
|
||||||
onDataChanged: if (active)
|
|
||||||
previewSlidesList.positionViewAtIndex(index, ListView.Center)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Kirigami.WheelHandler {
|
|
||||||
id: wheelHandler
|
|
||||||
target: previewSlidesList
|
|
||||||
filterMouseEvents: true
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
Item {
|
|
||||||
/* Layout.preferredHeight: 20 */
|
|
||||||
Layout.fillHeight: true
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.columnSpan: 3
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ListView {
|
||||||
|
id: previewSlidesList
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
orientation: ListView.Horizontal
|
||||||
|
cacheBuffer: 900
|
||||||
|
reuseItems: true
|
||||||
|
|
||||||
|
model: serviceItemModel
|
||||||
|
delegate: Rectangle {
|
||||||
|
id: previewHighlight
|
||||||
|
implicitWidth: 210
|
||||||
|
implicitHeight: width / 16 * 9
|
||||||
|
color: {
|
||||||
|
if (active || previewerMouse.containsMouse)
|
||||||
|
Kirigami.Theme.highlightColor
|
||||||
|
else
|
||||||
|
Kirigami.Theme.backgroundColor
|
||||||
|
}
|
||||||
|
|
||||||
|
Presenter.Slide {
|
||||||
|
id: previewSlideItem
|
||||||
|
anchors.centerIn: parent
|
||||||
|
implicitWidth: 200
|
||||||
|
implicitHeight: width / 16 * 9
|
||||||
|
textSize: width / 4
|
||||||
|
itemType: type
|
||||||
|
imageSource: backgroundType === "image" ? background : ""
|
||||||
|
videoSource: backgroundType === "video" ? background : ""
|
||||||
|
audioSource: ""
|
||||||
|
chosenFont: font
|
||||||
|
text: model.text[0] === "This is demo text" ? "" : model.text[0]
|
||||||
|
pdfIndex: 0
|
||||||
|
preview: true
|
||||||
|
editMode: true
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Controls.Label {
|
||||||
|
id: slidesTitle
|
||||||
|
width: previewSlideItem.width
|
||||||
|
anchors.top: previewSlideItem.bottom
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
anchors.topMargin: 5
|
||||||
|
elide: Text.ElideRight
|
||||||
|
text: name
|
||||||
|
/* font.family: "Quicksand Bold" */
|
||||||
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
id: previewerMouse
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
onClicked: changeServiceItem(index)
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: serviceItemModel
|
||||||
|
onDataChanged: if (active)
|
||||||
|
previewSlidesList.positionViewAtIndex(index, ListView.Center)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Kirigami.WheelHandler {
|
||||||
|
id: wheelHandler
|
||||||
|
target: previewSlidesList
|
||||||
|
filterMouseEvents: true
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Connections {
|
Connections {
|
||||||
target: SlideObject
|
target: SlideObject
|
||||||
function onVideoBackgroundChanged() {
|
function onVideoBackgroundChanged() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue