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
c275fd96
Commit
c275fd96
authored
Apr 23, 2019
by
Camilo higuita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correct issues with opening external images and improve gallery roll aka preview bar
parent
cbfb009e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
13 deletions
+40
-13
src/main.qml
src/main.qml
+11
-9
src/models/gallery/gallery.cpp
src/models/gallery/gallery.cpp
+3
-1
src/widgets/views/Viewer/GalleryRoll.qml
src/widgets/views/Viewer/GalleryRoll.qml
+22
-1
src/widgets/views/Viewer/PixViewer.qml
src/widgets/views/Viewer/PixViewer.qml
+4
-2
No files found.
src/main.qml
View file @
c275fd96
...
...
@@ -147,17 +147,17 @@ Maui.ApplicationWindow
icon.name
:
"
folder-add
"
onTriggered
:
{
// dialogLoader.sourceComponent = sourcesDialogComponent;
// dialog.open()
// dialogLoader.sourceComponent = sourcesDialogComponent;
// dialog.open()
dialogLoader
.
sourceComponent
=
fmDialogComponent
dialog
.
mode
=
dialog
.
modes
.
OPEN
dialog
.
onlyDirs
=
true
dialog
.
show
(
function
(
paths
)
{
pix
.
addSources
(
paths
)
})
dialogLoader
.
sourceComponent
=
fmDialogComponent
dialog
.
mode
=
dialog
.
modes
.
OPEN
dialog
.
onlyDirs
=
true
dialog
.
show
(
function
(
paths
)
{
pix
.
addSources
(
paths
)
})
}
},
...
...
@@ -173,6 +173,8 @@ Maui.ApplicationWindow
dialog
.
onlyDirs
=
false
dialog
.
show
(
function
(
paths
)
{
console
.
log
(
"
OPEN THIS PATHS
"
,
paths
)
pix
.
openPics
(
paths
)
});
...
...
src/models/gallery/gallery.cpp
View file @
c275fd96
...
...
@@ -202,7 +202,9 @@ void Gallery::append(const QString &url)
auto
sourceUrl
=
info
.
dir
().
path
();
auto
picMap
=
FMH
::
getFileInfoModel
(
url
);
picMap
[
FMH
::
MODEL_KEY
::
URL
]
=
title
;
picMap
[
FMH
::
MODEL_KEY
::
URL
]
=
url
;
picMap
[
FMH
::
MODEL_KEY
::
TITLE
]
=
title
;
picMap
[
FMH
::
MODEL_KEY
::
LABEL
]
=
title
;
picMap
[
FMH
::
MODEL_KEY
::
FAV
]
=
"0"
;
picMap
[
FMH
::
MODEL_KEY
::
RATE
]
=
"0"
;
picMap
[
FMH
::
MODEL_KEY
::
COLOR
]
=
QString
();
...
...
src/widgets/views/Viewer/GalleryRoll.qml
View file @
c275fd96
...
...
@@ -23,7 +23,28 @@ Item
color
:
accentColor
radius
:
unit
*
3
opacity
:
0.8
border.color
:
Qt
.
darker
(
color
,
1.5
)
Kirigami.Separator
{
anchors
{
top
:
parent
.
rop
left
:
parent
.
left
right
:
parent
.
right
}
color
:
Qt
.
darker
(
parent
.
color
,
1.5
)
}
Kirigami.Separator
{
anchors
{
bottom
:
parent
.
bottom
left
:
parent
.
left
right
:
parent
.
right
}
color
:
Qt
.
darker
(
parent
.
color
,
1.5
)
}
}
ListView
...
...
src/widgets/views/Viewer/PixViewer.qml
View file @
c275fd96
...
...
@@ -192,9 +192,11 @@ Maui.Page
{
id
:
galleryRoll
Layout.fillWidth
:
true
Layout.margins
:
space
.
big
Layout.margins
:
0
Layout.topMargin
:
space
.
medium
Layout.bottomMargin
:
space
.
medium
rollHeight
:
120
*
unit
visible
:
!
holder
.
visibl
e
visible
:
fals
e
onPicClicked
:
VIEWER
.
view
(
index
)
}
}
...
...
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