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

quick fixes

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