Commit f956b370 authored by Camilo higuita's avatar Camilo higuita

put galleryroll underneath the viewer

parent a0bc3e13
......@@ -26,41 +26,33 @@ Maui.Page
property string viewerForegroundColor : pix.loadSettings("VIEWER_FG_COLOR", "PIX", textColor)
margins: 0
headBarVisible: false
colorScheme.backgroundColor: viewerBackgroundColor
headBarExit: false
headBarTitle: currentPic.title
headBar.rightContent: [
Maui.ToolButton
{
iconName: "overflow-menu"
onClicked: viewerMenu.open()
}
]
background: Rectangle
{
color: viewerBackgroundColor
}
headBar.leftContent: [
Maui.ToolButton
{
iconName: "view-preview"
onClicked: riseContent()
iconColor: control.contentIsRised ? colorScheme.highlightColor: colorScheme.textColor
Rectangle
{
height: toolBarHeightAlt
width: parent.width *0.7
color: altColor
radius: unit* 4
visible: isMobile
opacity: 0.7
z: 999
anchors
{
top: parent.top
horizontalCenter: parent.horizontalCenter
margins: space.big
}
Label
{
height: parent.height
width: parent.width
horizontalAlignment: Qt.AlignHCenter
verticalAlignment: Qt.AlignVCenter
color: altColorText
elide: Text.ElideRight
text: currentPic.title
}
}
},
Maui.ToolButton
{
iconName: "filename-space-amarok"
onClicked: toogleTagbar()
iconColor: tagBarVisible ? colorScheme.highlightColor: colorScheme.textColor
}
]
Connections
{
......@@ -96,37 +88,43 @@ Maui.Page
// visible: shareDialog.opened
// }
ColumnLayout
backContain: GalleryRoll
{
spacing: 0
id: galleryRoll
visible: !holder.visible
onPicClicked: VIEWER.view(index)
}
floatingBar: true
footBarOverlap: true
Viewer
{
id: viewer
height: parent.height
width: parent.width
Viewer
{
id: viewer
Layout.fillHeight: true
Layout.fillWidth: true
floatingBar: true
headBarVisible: false
floatingBar: true
headBarVisible: false
footBar.colorScheme.backgroundColor: accentColor
footBar.colorScheme.textColor: altColorText
footBar.colorScheme.backgroundColor: accentColor
footBar.colorScheme.textColor: altColorText
footBar.leftContent: Maui.ToolButton
{
iconName: "document-share"
iconColor: altColorText
footBar.leftContent: Maui.ToolButton
{
iconName: "document-share"
iconColor: altColorText
onClicked: isAndroid ? Maui.Android.shareDialog(pixViewer.currentPic.url) :
shareDialog.show(pixViewer.currentPic.url)
}
onClicked: isAndroid ? Maui.Android.shareDialog(pixViewer.currentPic.url) :
shareDialog.show(pixViewer.currentPic.url)
}
footBar.middleContent: PixFooter
{
id: pixFooter
}
footBar.middleContent: PixFooter
{
id: pixFooter
}
// footBar.rightContent : Maui.ToolButton
// {
......@@ -137,36 +135,28 @@ Maui.Page
// }
footBar.rightContent : Maui.ToolButton
{
iconName: "document-save-as"
iconColor: altColorText
onClicked: editTools.visible ? editTools.close() : editTools.open()
}
footBar.rightContent : Maui.ToolButton
{
iconName: "document-save-as"
iconColor: altColorText
onClicked: editTools.visible ? editTools.close() : editTools.open()
}
Maui.Holder
{
id: holder
emoji: "qrc:/img/assets/Rainbow.png"
isMask: false
title : "No Pic!"
body: "Open an image from your collection"
emojiSize: iconSizes.huge
visible: viewer.list.count === 0
fgColor: viewerForegroundColor
}
GalleryRoll
{
id: galleryRoll
visible: !holder.visible
anchors.bottom: parent.bottom
onPicClicked: VIEWER.view(index)
}
Maui.Holder
{
id: holder
emoji: "qrc:/img/assets/Rainbow.png"
isMask: false
title : "No Pic!"
body: "Open an image from your collection"
emojiSize: iconSizes.huge
visible: viewer.list.count === 0
fgColor: viewerForegroundColor
}
Maui.TagsBar
footer: Maui.TagsBar
{
id: tagBar
visible: !holder.visible && tagBarVisible && !fullScreen
......@@ -183,6 +173,11 @@ Maui.Page
VIEWER.setCurrentPicTags()
}
}
}
function toogleTagbar()
{
tagBarVisible = !tagBarVisible
pix.saveSettings("TAGBAR", tagBarVisible, "PIX")
}
}
......@@ -17,10 +17,7 @@ Maui.Page
clip: true
focus: true
background: Rectangle
{
color: viewerBackgroundColor
}
colorScheme.backgroundColor: viewerBackgroundColor
ListView
{
......
......@@ -36,7 +36,7 @@ ItemDelegate
anchors.fill: parent
acceptedButtons: Qt.LeftButton | Qt.RightButton
onEntered: galleryRoll.visible = !galleryRoll.visible
// onEntered: galleryRoll.visible = !galleryRoll.visible
onPressAndHold: picMenu.show(currentPic.url)
onWheel: wheel.angleDelta.y > 0 ? zoomIn() : zoomOut()
......
......@@ -9,38 +9,32 @@ PixMenu
{
property alias menuItems: viewerMenuLayout.children
Column
MenuItem
{
id: viewerMenuLayout
MenuItem
{
text: qsTr(tagBarVisible ? "Hide Tag bar" :
"Show Tag bar")
onTriggered:
{
tagBarVisible = !tagBarVisible
pix.saveSettings("TAGBAR", tagBarVisible, "PIX")
}
}
text: qsTr(tagBarVisible ? "Hide Tag bar" :
"Show Tag bar")
onTriggered: toogleTagbar()
Kirigami.Separator{ width: parent.width; height: 1}
}
MenuItem
MenuItem
{
text: "Configurations..."
onTriggered:
{
text: "Configurations..."
onTriggered:
{
viewerConf.open()
close()
}
viewerConf.open()
close()
}
}
Kirigami.Separator{ width: parent.width; height: 1}
MenuItem
{
text: "Sort..."
onTriggered: {close()}
}
MenuItem
{
text: "Sort..."
onTriggered: {close()}
}
Column
{
id: viewerMenuLayout
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment