Commit 3a6588a8 authored by Camilo higuita's avatar Camilo higuita

view, folders view and other fixes

parent eef9f247
......@@ -16,7 +16,7 @@ var Query = {
favPics: "select * from images where fav = 1",
recentPics: "select * from images order by strftime(\"%s\", addDate) desc limit 50",
folders_: "select distinct s.url from images i inner join sources s on s.url = i.sources_url where i.url like \"%%1%\" or i.title like \"%%1%\"",
folders_: "select distinct s.url from images i inner join sources s on s.url = i.source where i.url like \"%%1%\" or i.title like \"%%1%\"",
searchFor_: "select * from images where title like \"%%1%\" or url like \"%%1%\" union select distinct i.* from images i inner join images_tags it on it.url = i.url where it.tag like \"%%1%\" collate nocase limit 1000"
}
......@@ -45,12 +45,6 @@ Maui.Page
{
id: gridMenu
Maui.MenuItem
{
text: qsTr(selectionMode ? "Selection OFF" : "Selection ON")
onTriggered: selectionMode = !selectionMode
}
Maui.MenuItem
{
checkable: true
......
......@@ -66,6 +66,7 @@ Kirigami.PageRow
anchors.fill: parent
showEmblem: false
model: folderModel
cellWidth: itemSize * 10
onItemClicked:
{
......
......@@ -5,10 +5,14 @@ import org.kde.mauikit 1.0 as Maui
Maui.Page
{
id: control
margins:0
headBarExit: false
headBarTitle: qsTr("Tags")
headBar.plegable: false
headBar.drawBorder: false
colorScheme.backgroundColor: backgroundColor
clip: true
......@@ -38,11 +42,13 @@ Maui.Page
{
id: _tagsList
anchors.fill: parent
anchors.margins: space.medium
model: tagsModel
delegate: Maui.ListDelegate
{
id: delegate
label: tag
radius: radiusV
Connections
{
......
......@@ -12,7 +12,7 @@ Kirigami.PageRow
id: tagsPageRoot
clip: true
separatorVisible: wideMode
separatorVisible: false
initialPage: [tagsSidebar, tagsGrid]
defaultColumnWidth: Kirigami.Units.gridUnit * 15
interactive: currentIndex === 1
......
......@@ -36,16 +36,7 @@ Maui.Page
allowRiseContent: true
headBar.drawBorder: false
headBarTitle: currentPic.title ? currentPic.title : ""
headBar.rightContent: [
Maui.ToolButton
{
iconName: "document-save-as"
onClicked:
{
dialogLoader.sourceComponent = albumsDialogComponent
dialog.show()
}
},
headBar.rightContent: [
Maui.ToolButton
{
......@@ -80,21 +71,6 @@ Maui.Page
dialog.show([pixViewer.currentPic.url])
}
}
},
Maui.ToolButton
{
iconName: "image-preview"
onClicked: control.contentIsRised ? dropContent() : riseContent()
iconColor: control.contentIsRised ? colorScheme.highlightColor: colorScheme.textColor
},
Maui.ToolButton
{
iconName: "tag"
onClicked: toogleTagbar()
iconColor: tagBarVisible ? colorScheme.highlightColor: colorScheme.textColor
}
]
......
......@@ -49,6 +49,14 @@ Maui.Page
id: delegate
itemHeight: viewerList.height
itemWidth: viewerList.width
Connections
{
target: delegate
onPressAndHold: _picMenu.popup()
onRightClicked: _picMenu.popup()
}
}
}
......
......@@ -18,6 +18,9 @@ Flickable
property alias image: image
signal rightClicked();
signal pressAndHold();
width: itemWidth
height: itemHeight
......@@ -135,6 +138,12 @@ Flickable
{
anchors.fill: parent
acceptedButtons: Qt.RightButton | Qt.LeftButton
onClicked: if(!isMobile && mouse.button === Qt.RightButton)
rightClicked()
onPressAndHold: flick.pressAndHold()
onDoubleClicked:
{
if (flick.interactive) {
......
......@@ -8,25 +8,7 @@ import "../../../view_models"
Maui.Menu
{
property alias menuItems: viewerMenuLayout.children
Maui.MenuItem
{
text: qsTr(tagBarVisible ? "Hide Tag bar" :
"Show Tag bar")
onTriggered: toogleTagbar()
}
Maui.MenuItem
{
text: "Configurations..."
onTriggered:
{
viewerConf.open()
close()
}
}
Maui.MenuItem
{
......@@ -38,15 +20,30 @@ Maui.Menu
dialog.show(function(paths)
{
console.log("OPEN IMAGE", paths)
console.log("OPEN IMAGE", paths)
});
close()
}
}
Column
MenuSeparator{}
Maui.MenuItem
{
id: viewerMenuLayout
checkable: true
checked: tagBarVisible
text: qsTr("Tag bar")
onTriggered: toogleTagbar()
}
Maui.MenuItem
{
checkable: true
checked: contentIsRised
text: qsTr("Preview bar")
onTriggered: contentIsRised ? dropContent() : riseContent()
}
}
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