Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Maui
Pix
Commits
8d82a18b
Commit
8d82a18b
authored
Feb 18, 2021
by
camilo higuita
Browse files
move viewer out of component to be quickly reused
parent
df722f6b
Changes
4
Hide whitespace changes
Inline
Side-by-side
.clang-format
View file @
8d82a18b
...
...
@@ -17,8 +17,8 @@ Standard: Cpp11
# 4 spaces indent
TabWidth: 4
#
2
* 80 wide lines
ColumnLimit:
16
0
#
3
* 80 wide lines
ColumnLimit:
24
0
# sort includes inside line separated groups
SortIncludes: true
...
...
@@ -47,9 +47,8 @@ BinPackArguments: false
# don't move parameters to own lines if they are not all on the same
BinPackParameters: false
# In case we have an if statement whith multiple lines the operator should be at the beginning of the line
# but we do not want to break assignments
BreakBeforeBinaryOperators: NonAssignment
# don't break binary ops
BreakBeforeBinaryOperators: None
# format C++11 braced lists like function calls
Cpp11BracedListStyle: true
...
...
src/main.qml
View file @
8d82a18b
...
...
@@ -81,7 +81,6 @@ Maui.ApplicationWindow
Settings
{
id
:
viewerSettings
category
:
"
Viewer
"
property
bool
tagBarVisible
:
true
property
bool
previewBarVisible
:
false
}
...
...
@@ -158,38 +157,35 @@ Maui.ApplicationWindow
}
}
Component
PixViewer
{
id
:
_pixViewer
visible
:
StackView
.
status
===
StackView
.
Active
PixViewer
Rectangle
{
anchors.fill
:
parent
visible
:
_dropArea
.
containsDrag
color
:
Qt
.
rgba
(
Kirigami
.
Theme
.
backgroundColor
.
r
,
Kirigami
.
Theme
.
backgroundColor
.
g
,
Kirigami
.
Theme
.
backgroundColor
.
b
,
0.95
)
Rectangle
Maui.
Rectangle
{
anchors.fill
:
parent
visible
:
_dropArea
.
containsDrag
color
:
Qt
.
rgba
(
Kirigami
.
Theme
.
backgroundColor
.
r
,
Kirigami
.
Theme
.
backgroundColor
.
g
,
Kirigami
.
Theme
.
backgroundColor
.
b
,
0.95
)
anchors.margins
:
Maui
.
Style
.
space
.
medium
color
:
"
transparent
"
borderColor
:
Kirigami
.
Theme
.
textColor
solidBorder
:
false
Maui.
Rectangle
Maui.
Holder
{
anchors.fill
:
parent
anchors.margins
:
Maui
.
Style
.
space
.
medium
color
:
"
transparent
"
borderColor
:
Kirigami
.
Theme
.
textColor
solidBorder
:
false
Maui.Holder
{
anchors.fill
:
parent
visible
:
true
emoji
:
"
qrc:/img/assets/add-image.svg
"
emojiSize
:
Maui
.
Style
.
iconSizes
.
huge
title
:
i18n
(
"
Open images
"
)
body
:
i18n
(
"
Drag and drop images here
"
)
}
visible
:
true
emoji
:
"
qrc:/img/assets/add-image.svg
"
emojiSize
:
Maui
.
Style
.
iconSizes
.
huge
title
:
i18n
(
"
Open images
"
)
body
:
i18n
(
"
Drag and drop images here
"
)
}
}
}
...
...
@@ -259,7 +255,7 @@ Maui.ApplicationWindow
{
settings.filterType
:
Maui
.
FMList
.
IMAGE
settings.onlyDirs
:
true
mode
:
modes
.
OPEN
mode
:
modes
.
OPEN
}
}
...
...
@@ -331,4 +327,26 @@ Maui.ApplicationWindow
dialog
.
url
=
url
dialog
.
open
()
}
function
toogleTagbar
()
{
viewerSettings
.
tagBarVisible
=
!
viewerSettings
.
tagBarVisible
}
function
tooglePreviewBar
()
{
viewerSettings
.
previewBarVisible
=
!
viewerSettings
.
previewBarVisible
}
function
toogleFullscreen
()
{
if
(
Window
.
window
.
visibility
===
Window
.
FullScreen
)
{
Window
.
window
.
showNormal
()
}
else
{
Window
.
window
.
showFullScreen
()
}
}
}
src/widgets/SettingsDialog.qml
View file @
8d82a18b
...
...
@@ -212,7 +212,7 @@ Maui.SettingsDialog
Layout.fillHeight
:
true
checkable
:
true
checked
:
viewerSettings
.
tagBarVisible
onToggled
:
pixViewer
.
toogleTagbar
()
onToggled
:
toogleTagbar
()
}
}
...
...
@@ -225,7 +225,7 @@ Maui.SettingsDialog
Layout.fillHeight
:
true
checkable
:
true
checked
:
viewerSettings
.
previewBarVisible
onToggled
:
pixViewer
.
tooglePreviewBar
()
onToggled
:
tooglePreviewBar
()
}
}
}
...
...
src/widgets/views/Viewer/PixViewer.qml
View file @
8d82a18b
...
...
@@ -102,7 +102,7 @@ StackView
{
visible
:
!
Kirigami
.
Settings
.
isMobile
icon.name
:
"
view-fullscreen
"
onClicked
:
control
.
toogleFullscreen
()
onClicked
:
toogleFullscreen
()
checked
:
fullScreen
}
...
...
@@ -250,28 +250,6 @@ StackView
}
}
function
toogleTagbar
()
{
viewerSettings
.
tagBarVisible
=
!
viewerSettings
.
tagBarVisible
}
function
tooglePreviewBar
()
{
viewerSettings
.
previewBarVisible
=
!
viewerSettings
.
previewBarVisible
}
function
toogleFullscreen
()
{
if
(
Window
.
window
.
visibility
===
Window
.
FullScreen
)
{
Window
.
window
.
showNormal
()
}
else
{
Window
.
window
.
showFullScreen
()
}
}
function
next
()
{
var
index
=
control
.
currentPicIndex
...
...
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