Commit aea08c85 authored by camilo higuita's avatar camilo higuita

fixes

parent a5dddbee
...@@ -31,8 +31,7 @@ Maui.Page ...@@ -31,8 +31,7 @@ Maui.Page
/*signals*/ /*signals*/
signal picClicked(int index) signal picClicked(int index)
floatingBar: true
footBarOverlap: true
headBar.drawBorder: false headBar.drawBorder: false
Maui.Holder Maui.Holder
...@@ -77,7 +76,6 @@ Maui.Page ...@@ -77,7 +76,6 @@ Maui.Page
} }
headBarTitle: grid.count+" "+qsTr("images") headBarTitle: grid.count+" "+qsTr("images")
headBar.plegable : false
headBar.rightContent:[ headBar.rightContent:[
Maui.ToolButton Maui.ToolButton
{ {
...@@ -128,13 +126,13 @@ headBar.plegable : false ...@@ -128,13 +126,13 @@ headBar.plegable : false
onTriggered: pixList.sortBy = GalleryList.DATE onTriggered: pixList.sortBy = GalleryList.DATE
} }
// Maui.MenuItem // Maui.MenuItem
// { // {
// text: qsTr("Place") // text: qsTr("Place")
// checkable: true // checkable: true
// checked: pixList.sortBy === FMList.PLACE // checked: pixList.sortBy === FMList.PLACE
// onTriggered: pixList.sortBy = FMList.PLACE // onTriggered: pixList.sortBy = FMList.PLACE
// } // }
Maui.MenuItem Maui.MenuItem
{ {
...@@ -163,23 +161,23 @@ headBar.plegable : false ...@@ -163,23 +161,23 @@ headBar.plegable : false
} }
] ]
footBar.colorScheme.backgroundColor: accentColor // footBar.colorScheme.backgroundColor: accentColor
footBar.colorScheme.textColor: altColorText // footBar.colorScheme.textColor: altColorText
footBar.visible: false // footBar.visible: false
footBar.middleContent: [ // footBar.middleContent: [
Maui.ToolButton // Maui.ToolButton
{ // {
iconName: "zoom-in" // iconName: "zoom-in"
iconColor: altColorText // iconColor: altColorText
onClicked: zoomIn() // onClicked: zoomIn()
}, // },
Maui.ToolButton // Maui.ToolButton
{ // {
iconName: "zoom-out" // iconName: "zoom-out"
iconColor: altColorText // iconColor: altColorText
onClicked: zoomOut() // onClicked: zoomOut()
} // }
] // ]
Component Component
{ {
......
...@@ -29,10 +29,8 @@ StackView ...@@ -29,10 +29,8 @@ StackView
headBar.visible: false headBar.visible: false
footBar.drawBorder: false footBar.drawBorder: false
headBar.middleContent: Maui.TextField footBar.middleContent: Maui.TextField
{ {
Layout.margins: space.medium
Layout.fillWidth: true
placeholderText: qsTr("Filter...") placeholderText: qsTr("Filter...")
width: foldersPage.footBar.middleLayout.width * 0.9 width: foldersPage.footBar.middleLayout.width * 0.9
onAccepted: filter(text) onAccepted: filter(text)
......
...@@ -6,18 +6,13 @@ import "../../../db/Query.js" as Q ...@@ -6,18 +6,13 @@ import "../../../db/Query.js" as Q
import org.kde.mauikit 1.0 as Maui import org.kde.mauikit 1.0 as Maui
Maui.Page
{
property string currentQuery : ""
margins: 0
headBar.visible: false
PixGrid PixGrid
{ {
id: searchResults id: searchResults
property string currentQuery : ""
anchors.fill: parent
headBar.visible: true headBar.visible: true
headBarExitIcon: "edit-clear" headBarExitIcon: "edit-clear"
headBarTitle: searchResults.grid.count + qsTr(" results") headBarTitle: searchResults.grid.count + qsTr(" results")
...@@ -26,45 +21,48 @@ Maui.Page ...@@ -26,45 +21,48 @@ Maui.Page
holder.title : "No Results!" holder.title : "No Results!"
holder.body: "Try with another query" holder.body: "Try with another query"
holder.emojiSize: iconSizes.huge holder.emojiSize: iconSizes.huge
}
footBar.drawBorder: false
footBar.middleContent: Maui.TextField
{
id: searchInput
placeholderText: qsTr("Search...")
width: footBar.middleLayout.width * 0.9
onAccepted: runSearch(searchInput.text) footBar.visible: true
} footBar.drawBorder: false
footBar.middleContent: Maui.TextField
{
id: searchInput
placeholderText: qsTr("Search...")
width: footBar.middleLayout.width * 0.9
Layout.margins: space.medium
Layout.fillWidth: true
onAccepted: runSearch(searchInput.text)
}
function refreshPics() function refreshPics()
{ {
searchResults.list.refresh() searchResults.list.refresh()
} }
function runSearch(query) function runSearch(query)
{
if(query)
{ {
currentQuery = query if(query)
searchResults.list.query = Q.Query.searchFor_.arg(currentQuery) {
currentQuery = query
searchResults.list.query = Q.Query.searchFor_.arg(currentQuery)
// var queries = query.split(",") // var queries = query.split(",")
// for(var i in queries) // for(var i in queries)
// { // {
// var res =[] // var res =[]
// res.push(pix.get(Q.Query.searchFor_.arg(queries[i]))) // res.push(pix.get(Q.Query.searchFor_.arg(queries[i])))
// res.push(tag.getUrls(query, true)) // res.push(tag.getUrls(query, true))
// populate(res) // populate(res)
// } // }
}
} }
// function populate(data)
// {
// if(data.length > 0)
// for(var i in data)
// searchResults.model.append(data[i])
// }
} }
// function populate(data)
// {
// if(data.length > 0)
// for(var i in data)
// searchResults.model.append(data[i])
// }
}
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