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
8d499881
Commit
8d499881
authored
Nov 18, 2020
by
camilo higuita
Browse files
revert
parent
cca69e2d
Changes
3
Hide whitespace changes
Inline
Side-by-side
android_files/AndroidManifest.xml
View file @
8d499881
...
...
@@ -17,7 +17,8 @@
<supports-screens
android:largeScreens=
"true"
android:normalScreens=
"true"
android:anyDensity=
"true"
android:smallScreens=
"true"
/>
<application
android:hardwareAccelerated=
"true"
android:name=
"org.qtproject.qt5.android.bindings.QtApplication"
android:label=
"Pix"
android:extractNativeLibs=
"true"
android:icon=
"@drawable/icon"
>
<activity
android:configChanges=
"orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation|mcc|mnc|density"
android:name=
"org.qtproject.qt5.android.bindings.QtActivity"
android:label=
"Pix"
android:screenOrientation=
"unspecified"
android:launchMode=
"singleTop"
>
<activity
android:configChanges=
"orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation|mcc|mnc|density"
android:name=
"org.qtproject.qt5.android.bindings.QtActivity"
android:label=
"Pix"
android:screenOrientation=
"unspecified"
android:launchMode=
"singleTop"
>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
<category
android:name=
"android.intent.category.LAUNCHER"
/>
...
...
src/view_models/CollageDelegate.qml
View file @
8d499881
...
...
@@ -6,7 +6,157 @@ import QtGraphicalEffects 1.0
import
org
.
kde
.
kirigami
2.9
as
Kirigami
import
org
.
kde
.
mauikit
1.2
as
Maui
Maui.CollageItem
import
org
.
maui
.
pix
1.0
Maui.ItemDelegate
{
id
:
control
property
var
images
:
[]
property
alias
template
:
_template
property
int
contentWidth
:
Maui
.
Style
.
iconSizes
.
huge
property
int
contentHeight
:
Maui
.
Style
.
iconSizes
.
huge
function
randomHexColor
()
{
var
color
=
'
#
'
,
i
=
5
;
do
{
color
+=
"
0123456789abcdef
"
.
substr
(
Math
.
random
()
*
16
,
1
);
}
while
(
i
--
);
return
color
;
}
background
:
Item
{}
ColumnLayout
{
width
:
control
.
contentWidth
height
:
control
.
contentHeight
anchors.centerIn
:
parent
spacing
:
Maui
.
Style
.
space
.
small
Item
{
id
:
_collageLayout
Layout.fillWidth
:
true
Layout.fillHeight
:
true
Item
{
anchors.fill
:
parent
Rectangle
{
anchors.fill
:
parent
radius
:
8
color
:
randomHexColor
()
visible
:
_repeater
.
count
===
0
}
GridLayout
{
anchors.fill
:
parent
columns
:
2
rows
:
2
columnSpacing
:
2
rowSpacing
:
2
Repeater
{
id
:
_repeater
model
:
control
.
images
delegate
:
Rectangle
{
Layout.fillHeight
:
true
Layout.fillWidth
:
true
color
:
Qt
.
rgba
(
0
,
0
,
0
,
0.3
)
Image
{
anchors.fill
:
parent
sourceSize.width
:
_repeater
.
count
===
4
?
100
:
200
sourceSize.height
:
_repeater
.
count
===
4
?
100
:
200
asynchronous
:
true
smooth
:
false
source
:
modelData
fillMode
:
Image
.
PreserveAspectCrop
}
}
}
}
layer.enabled
:
true
layer.effect
:
OpacityMask
{
cached
:
true
maskSource
:
Item
{
width
:
_collageLayout
.
width
height
:
_collageLayout
.
height
Rectangle
{
anchors.fill
:
parent
radius
:
Maui
.
Style
.
radiusV
}
}
}
}
Rectangle
{
anchors.fill
:
parent
color
:
"
transparent
"
radius
:
Maui
.
Style
.
radiusV
border.color
:
Qt
.
darker
(
Kirigami
.
Theme
.
backgroundColor
,
2.7
)
opacity
:
0.6
Rectangle
{
anchors.fill
:
parent
color
:
"
transparent
"
radius
:
parent
.
radius
-
0.5
border.color
:
Qt
.
lighter
(
Kirigami
.
Theme
.
backgroundColor
,
2
)
opacity
:
0.8
anchors.margins
:
1
}
}
}
Item
{
Layout.fillWidth
:
true
Layout.preferredHeight
:
Maui
.
Style
.
rowHeight
Rectangle
{
width
:
parent
.
width
height
:
parent
.
height
anchors.centerIn
:
parent
Behavior
on
color
{
ColorAnimation
{
duration
:
Kirigami
.
Units
.
longDuration
}
}
color
:
control
.
isCurrentItem
||
control
.
hovered
?
Qt
.
rgba
(
control
.
Kirigami
.
Theme
.
highlightColor
.
r
,
control
.
Kirigami
.
Theme
.
highlightColor
.
g
,
control
.
Kirigami
.
Theme
.
highlightColor
.
b
,
0.2
)
:
control
.
Kirigami
.
Theme
.
backgroundColor
radius
:
Maui
.
Style
.
radiusV
border.color
:
control
.
isCurrentItem
?
control
.
Kirigami
.
Theme
.
highlightColor
:
"
transparent
"
}
Maui.ListItemTemplate
{
id
:
_template
isCurrentItem
:
control
.
isCurrentItem
anchors.fill
:
parent
rightLabels.visible
:
control
.
width
>=
200
iconSizeHint
:
Maui
.
Style
.
iconSizes
.
small
}
}
}
}
src/widgets/views/Tags/TagsSidebar.qml
View file @
8d499881
...
...
@@ -54,8 +54,8 @@ Maui.Page
}
}
itemSize
:
Math
.
min
(
2
6
0
,
Math
.
max
(
1
4
0
,
Math
.
floor
(
width
*
0.3
)))
itemHeight
:
itemSize
itemSize
:
Math
.
min
(
2
0
0
,
Math
.
max
(
1
0
0
,
Math
.
floor
(
width
*
0.3
)))
itemHeight
:
itemSize
+
Maui
.
Style
.
rowHeight
holder.visible
:
_gridView
.
count
===
0
holder.emoji
:
i18n
(
"
qrc:/assets/add-image.svg
"
)
...
...
@@ -63,18 +63,21 @@ Maui.Page
holder.body
:
i18n
(
"
You can create new tags to organize your gallery
"
)
holder.emojiSize
:
Maui
.
Style
.
iconSizes
.
huge
delegate
:
Maui.GalleryRollI
te
m
delegate
:
CollageDelega
te
{
id
:
_delegate
height
:
_gridView
.
cellHeight
width
:
_gridView
.
cellWidth
isCurrentItem
:
GridView
.
isCurrentItem
contentWidth
:
_gridView
.
itemSize
-
10
contentHeight
:
_gridView
.
cellHeight
-
20
// list.urls: [tagUrl]
images
:
model
.
preview
.
split
(
"
,
"
)
label1.text
:
model
.
tag
iconSource
:
model
.
icon
template.
label1.text
:
model
.
tag
template.
iconSource
:
model
.
icon
template.iconVisible
:
true
onClicked
:
...
...
Write
Preview
Supports
Markdown
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