Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Maui
Pix
Commits
03e43f93
Commit
03e43f93
authored
Jul 02, 2019
by
Camilo higuita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quick fixes
parent
909e33ae
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
126 additions
and
126 deletions
+126
-126
src/main.qml
src/main.qml
+59
-48
src/view_models/PixGrid.qml
src/view_models/PixGrid.qml
+67
-78
No files found.
src/main.qml
View file @
03e43f93
...
...
@@ -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,48 +177,67 @@ Maui.ApplicationWindow
headBar.visible
:
!
fullScreen
headBar.spacing
:
space
.
big
headBar.middleContent
:
[
Maui.ToolButton
{
text
:
qsTr
(
"
Viewer
"
)
showIndicator
:
true
active
:
currentView
===
views
.
viewer
visible
:
!
pixViewer
.
holder
.
visible
iconColor
:
active
?
highlightColor
:
headBarFGColor
iconName
:
"
image
"
onClicked
:
currentView
=
views
.
viewer
},
headBar.middleContent
:
Kirigami.ActionToolBar
{
hiddenActions
:
[
Maui.ToolButton
{
text
:
qsTr
(
"
Gallery
"
)
active
:
currentView
===
views
.
gallery
showIndicator
:
true
iconColor
:
active
?
highlightColor
:
headBarFGColor
iconName
:
"
image-multiple
"
onClicked
:
currentView
=
views
.
gallery
},
Kirigami.Action
{
id
:
_tagsButton
text
:
qsTr
(
"
Tags
"
)
onTriggered
:
currentView
=
views
.
tags
icon.name
:
"
tag
"
}
]
Maui.ToolButton
{
text
:
qsTr
(
"
Folders
"
)
active
:
currentView
===
views
.
folders
showIndicator
:
true
iconColor
:
active
?
highlightColor
:
headBarFGColor
iconName
:
"
image-folder-view
"
onClicked
:
currentView
=
views
.
folders
},
actions
:
[
Kirigami.Action
{
text
:
qsTr
(
"
Viewer
"
)
// showIndicator: true
checked
:
currentView
===
views
.
viewer
checkable
:
false
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
{
...
...
src/view_models/PixGrid.qml
View file @
03e43f93
...
...
@@ -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,69 +40,50 @@ Maui.Page
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
{
id
:
_picMenu
index
:
grid
.
currentIndex
}
headBarTitle
:
grid
.
count
+
"
"
+
qsTr
(
"
images
"
)
headBar.rightContent
:[
Maui.ToolButton
{
iconName
:
"
item-select
"
onClicked
:
selectionMode
=
!
selectionMode
iconColor
:
selectionMode
?
highlightColor
:
textColor
// headBarTitle: grid.count+" "+qsTr("images")
// headBar.leftSretch: false
headBar.rightContent
:
Kirigami.ActionToolBar
{
},
Maui.ToolButton
{
id
:
menuBtn
iconName
:
"
overflow-menu
"
onClicked
:
gridMenu
.
popup
()
}
]
hiddenActions
:
[
Kirigami.Action
{
checkable
:
true
checked
:
fitPreviews
text
:
qsTr
(
"
Fit previews
"
)
onTriggered
:
{
fitPreviews
=
!
fitPreviews
Maui
.
FM
.
saveSettings
(
"
PREVIEWS_FIT
"
,
fitPreviews
,
"
GRID
"
)
}
},
headBar.leftContent
:
[
Maui.ToolButton
{
iconName
:
"
view-sort
"
onClicked
:
sortMenu
.
popup
()
Kirigami.Action
{
checkable
:
true
checked
:
showLabels
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
"
)
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
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment