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

fixed folders view

parent 69319b66
......@@ -99,7 +99,6 @@ Maui.ApplicationWindow
colorSchemeName: "pix"
bgColor: backgroundColor
headBar.drawBorder: false
headBar.implicitHeight: toolBarHeight * 1.5
headBarBGColor: backgroundColor
headBarFGColor: currentView === views.viewer ? altColorText : Maui.Style.textColor
backgroundColor: currentView === views.viewer ? "#3c3e3f" : viewBackgroundColor
......@@ -190,10 +189,11 @@ Maui.ApplicationWindow
Maui.ToolButton
{
text: qsTr("Viewer")
height: headBar.height
showIndicator: currentView === views.viewer
Layout.fillHeight:true
showIndicator: true
active: currentView === views.viewer
visible: !pixViewer.holder.visible
iconColor: currentView === views.viewer ? highlightColor : headBarFGColor
iconColor: active ? highlightColor : headBarFGColor
iconName: "image"
onClicked: currentView = views.viewer
},
......@@ -201,9 +201,10 @@ Maui.ApplicationWindow
Maui.ToolButton
{
text: qsTr("Gallery")
height: headBar.height
showIndicator: currentView === views.gallery
iconColor: currentView === views.gallery? highlightColor : headBarFGColor
Layout.fillHeight:true
active: currentView === views.gallery
showIndicator: true
iconColor: active ? highlightColor : headBarFGColor
iconName: "image-multiple"
onClicked: currentView = views.gallery
},
......@@ -211,9 +212,10 @@ Maui.ApplicationWindow
Maui.ToolButton
{
text: qsTr("Folders")
height: headBar.height
showIndicator: currentView === views.folders
iconColor: currentView === views.folders? highlightColor : headBarFGColor
Layout.fillHeight:true
active: currentView === views.folders
showIndicator: true
iconColor: active ? highlightColor : headBarFGColor
iconName: "image-folder-view"
onClicked: currentView = views.folders
},
......@@ -221,9 +223,10 @@ Maui.ApplicationWindow
Maui.ToolButton
{
text: qsTr("Albums")
height: headBar.height
showIndicator: currentView === views.albums
iconColor: currentView === views.albums? highlightColor : headBarFGColor
Layout.fillHeight:true
active: currentView === views.albums
showIndicator: true
iconColor: active ? highlightColor : headBarFGColor
iconName: "image-frames"
onClicked: currentView = views.albums
}
......
......@@ -10,23 +10,22 @@ import "../../../db/Query.js" as Q
import FolderModel 1.0
import FoldersList 1.0
Kirigami.PageRow
StackView
{
id: foldersPageRoot
separatorVisible: foldersPageRoot.wideMode
initialPage: [foldersPage, picsView]
defaultColumnWidth: parent.width
interactive: foldersPageRoot.currentIndex === 1
id: _stackView
// separatorVisible: foldersPageRoot.wideMode
// initialPage: [foldersPage, picsView]
// defaultColumnWidth: width
// interactive: foldersPageRoot.currentIndex === 1
clip: true
property string currentFolder : ""
property alias picsView : picsView
Maui.Page
initialItem: Maui.Page
{
id: foldersPage
anchors.fill: parent
headBar.visible: false
footBar.drawBorder: false
footBar.middleContent: Maui.TextField
......@@ -45,7 +44,7 @@ Kirigami.PageRow
title : "No Folders!"
body: "Add new image sources"
emojiSize: iconSizes.huge
visible: folderGrid.count === 0
visible: false
}
FolderModel
......@@ -74,7 +73,7 @@ Kirigami.PageRow
picsView.headBarTitle = folder.label
currentFolder = folder.path
picsView.list.query = Q.Query.picLikeUrl_.arg(currentFolder)
foldersPageRoot.currentIndex = 1
_stackView.push(picsView)
}
}
}
......@@ -82,12 +81,11 @@ Kirigami.PageRow
PixGrid
{
id: picsView
anchors.fill: parent
headBar.visible: true
headBarExit: foldersPageRoot.currentIndex === 1
headBarExit: _stackView.currentItem === picsView
headBarExitIcon: "go-previous"
onExit: foldersPageRoot.currentIndex = 0
onExit: _stackView.pop()
holder.emoji: "qrc:/img/assets/Electricity.png"
holder.isMask: false
......
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