Commit 03e43f93 authored by Camilo higuita's avatar Camilo higuita

quick fixes

parent 909e33ae
......@@ -24,7 +24,7 @@ import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import QtQuick.Controls.Material 2.1
import org.kde.kirigami 2.0 as Kirigami
import org.kde.kirigami 2.6 as Kirigami
import org.kde.mauikit 1.0 as Maui
import "widgets"
......@@ -132,15 +132,7 @@ Maui.ApplicationWindow
// icon.name: "folder-cloud"
// },
Maui.MenuItem
{
id: _tagsButton
text: qsTr("Tags")
onTriggered: currentView = views.tags
icon.name: "tag"
},
MenuSeparator {},
Maui.MenuItem
{
......@@ -185,49 +177,68 @@ Maui.ApplicationWindow
headBar.visible: !fullScreen
headBar.spacing: space.big
headBar.middleContent: [
Maui.ToolButton
headBar.middleContent: Kirigami.ActionToolBar
{
hiddenActions: [
Kirigami.Action
{
id: _tagsButton
text: qsTr("Tags")
onTriggered: currentView = views.tags
icon.name: "tag"
}
]
actions: [
Kirigami.Action
{
text: qsTr("Viewer")
showIndicator: true
active: currentView === views.viewer
// showIndicator: true
checked: currentView === views.viewer
checkable: false
visible: !pixViewer.holder.visible
iconColor: active ? highlightColor : headBarFGColor
iconName: "image"
onClicked: currentView = views.viewer
icon.color: checked ? highlightColor : headBarFGColor
icon.name: "image"
onTriggered: currentView = views.viewer
},
Maui.ToolButton
Kirigami.Action
{
text: qsTr("Gallery")
active: currentView === views.gallery
showIndicator: true
iconColor: active ? highlightColor : headBarFGColor
iconName: "image-multiple"
onClicked: currentView = views.gallery
checked: currentView === views.gallery
// showIndicator: true
icon.color: checked ? highlightColor : headBarFGColor
icon.name: "image-multiple"
onTriggered: currentView = views.gallery
},
Maui.ToolButton
Kirigami.Action
{
text: qsTr("Folders")
active: currentView === views.folders
showIndicator: true
iconColor: active ? highlightColor : headBarFGColor
iconName: "image-folder-view"
onClicked: currentView = views.folders
checked: currentView === views.folders
checkable: false
// showIndicator: true
icon.color: active ? highlightColor : headBarFGColor
icon.name: "image-folder-view"
onTriggered: currentView = views.folders
},
Maui.ToolButton
Kirigami.Action
{
text: qsTr("Albums")
active: currentView === views.albums
showIndicator: true
iconColor: active ? highlightColor : headBarFGColor
iconName: "image-frames"
onClicked: currentView = views.albums
checked: currentView === views.albums
checkable: false
// showIndicator: true
icon.color: checked ? highlightColor : headBarFGColor
icon.name: "image-frames"
onTriggered: currentView = views.albums
}
]
}
content: Item
{
anchors.fill: parent
......
......@@ -2,7 +2,7 @@ import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import QtQuick 2.9
import org.kde.kirigami 2.0 as Kirigami
import org.kde.kirigami 2.6 as Kirigami
import org.kde.mauikit 1.0 as Maui
import PixModel 1.0
import GalleryList 1.0
......@@ -40,11 +40,19 @@ Maui.Page
visible: grid.count === 0
}
Maui.Menu
PixMenu
{
id: _picMenu
index: grid.currentIndex
}
// headBarTitle: grid.count+" "+qsTr("images")
// headBar.leftSretch: false
headBar.rightContent: Kirigami.ActionToolBar
{
id: gridMenu
Maui.MenuItem
hiddenActions: [
Kirigami.Action
{
checkable: true
checked: fitPreviews
......@@ -54,9 +62,9 @@ Maui.Page
fitPreviews = !fitPreviews
Maui.FM.saveSettings("PREVIEWS_FIT", fitPreviews, "GRID")
}
}
},
Maui.MenuItem
Kirigami.Action
{
checkable: true
checked: showLabels
......@@ -67,42 +75,15 @@ Maui.Page
Maui.FM.saveSettings("SHOW_LABELS", showLabels, "GRID")
}
}
}
PixMenu
{
id: _picMenu
index: grid.currentIndex
}
headBarTitle: grid.count+" "+qsTr("images")
headBar.rightContent:[
Maui.ToolButton
{
iconName: "item-select"
onClicked: selectionMode = !selectionMode
iconColor: selectionMode ? highlightColor : textColor
},
Maui.ToolButton
{
id: menuBtn
iconName: "overflow-menu"
onClicked: gridMenu.popup()
}
]
headBar.leftContent: [
Maui.ToolButton
{
iconName: "view-sort"
onClicked: sortMenu.popup()
Maui.Menu
actions: [
Kirigami.Action
{
id: sortMenu
icon.name: "view-sort"
text: qsTr("Sort")
Maui.MenuItem
Kirigami.Action
{
text: qsTr("Title")
checkable: true
......@@ -110,7 +91,7 @@ Maui.Page
onTriggered: pixList.sortBy = GalleryList.TITLE
}
Maui.MenuItem
Kirigami.Action
{
text: qsTr("Add date")
checkable: true
......@@ -118,7 +99,7 @@ Maui.Page
onTriggered: pixList.sortBy = GalleryList.ADDDATE
}
Maui.MenuItem
Kirigami.Action
{
text: qsTr("Creation date")
checkable: true
......@@ -134,7 +115,7 @@ Maui.Page
// onTriggered: pixList.sortBy = FMList.PLACE
// }
Maui.MenuItem
Kirigami.Action
{
text: qsTr("Format")
checkable: true
......@@ -142,7 +123,7 @@ Maui.Page
onTriggered: pixList.sortBy = GalleryList.FORMAT
}
Maui.MenuItem
Kirigami.Action
{
text: qsTr("Size")
checkable: true
......@@ -150,34 +131,42 @@ Maui.Page
onTriggered: pixList.sortBy = GalleryList.SIZE
}
Maui.MenuItem
Kirigami.Action
{
text: qsTr("Favorites")
checkable: true
checked: pixList.sortBy === GalleryList.FAV
onTriggered: pixList.sortBy = GalleryList.FAV
}
}
},
Kirigami.Action
{
icon.name: "item-select"
onTriggered: selectionMode = !selectionMode
text: qsTr("Select")
checkable: true
}
]
}
// footBar.colorScheme.backgroundColor: accentColor
// footBar.colorScheme.textColor: altColorText
// footBar.visible: false
// footBar.middleContent: [
// Maui.ToolButton
// {
// iconName: "zoom-in"
// iconColor: altColorText
// onClicked: zoomIn()
// },
// Maui.ToolButton
// {
// iconName: "zoom-out"
// iconColor: altColorText
// onClicked: zoomOut()
// }
// ]
// footBar.colorScheme.backgroundColor: accentColor
// footBar.colorScheme.textColor: altColorText
// footBar.visible: false
// footBar.middleContent: [
// Maui.ToolButton
// {
// iconName: "zoom-in"
// iconColor: altColorText
// onClicked: zoomIn()
// },
// Maui.ToolButton
// {
// iconName: "zoom-out"
// iconColor: altColorText
// onClicked: zoomOut()
// }
// ]
Component
{
......
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