Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
Kalendar
Commits
bdbf770a
Commit
bdbf770a
authored
Sep 27, 2022
by
Claudio Cambra
Browse files
Use Kirigami basic list item for mail box delegates
Signed-off-by:
Claudio Cambra
<
claudio.cambra@gmail.com
>
parent
e2090a41
Pipeline
#237587
passed with stage
in 3 minutes and 53 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/mail/qml/mailboxselector/MailBoxList.qml
View file @
bdbf770a
...
...
@@ -34,46 +34,43 @@ ListView {
spacing
:
0
width
:
ListView
.
view
.
width
Item
{
Layout.topMargin
:
Kirigami
.
Units
.
largeSpacing
visible
:
(
model
.
kDescendantLevel
===
1
)
&&
(
model
.
index
!==
0
)
}
QQC2.ItemDelegate
{
Kirigami.BasicListItem
{
id
:
categoryHeader
Layout.fillWidth
:
true
topPadding
:
Kirigami
.
Units
.
largeSpacing
bottomPadding
:
Kirigami
.
Units
.
largeSpacing
leftPadding
:
Kirigami
.
Units
.
largeSpacing
*
(
model
.
kDescendantLevel
)
Layout.topMargin
:
Kirigami
.
Units
.
largeSpacing
*
2
property
string
displayText
:
model
.
display
bottomPadding
:
Kirigami
.
Units
.
largeSpacing
leftPadding
:
Kirigami
.
Settings
.
isMobile
?
(
Kirigami
.
Units
.
largeSpacing
*
2
*
model
.
kDescendantLevel
)
+
(
Kirigami
.
Units
.
iconSizes
.
smallMedium
*
(
model
.
kDescendantLevel
-
1
))
:
(
Kirigami
.
Units
.
largeSpacing
*
model
.
kDescendantLevel
)
+
(
Kirigami
.
Units
.
iconSizes
.
smallMedium
*
(
model
.
kDescendantLevel
-
1
))
label
:
model
.
display
highlighted
:
visualFocus
hoverEnabled
:
false
separatorVisible
:
false
labelItem.color
:
visualFocus
?
Kirigami
.
Theme
.
textColor
:
Kirigami
.
Theme
.
disabledTextColor
labelItem.font.weight
:
Font
.
DemiBold
leading
:
Kirigami.Icon
{
implicitWidth
:
Kirigami
.
Units
.
iconSizes
.
smallMedium
implicitHeight
:
Kirigami
.
Units
.
iconSizes
.
smallMedium
isMask
:
true
color
:
categoryHeader
.
labelItem
.
color
source
:
"
folder-symbolic
"
}
leadingPadding
:
Kirigami
.
Settings
.
isMobile
?
Kirigami
.
Units
.
largeSpacing
*
2
:
Kirigami
.
Units
.
largeSpacing
trailing
:
Kirigami.Icon
{
implicitWidth
:
Kirigami
.
Units
.
iconSizes
.
small
implicitHeight
:
Kirigami
.
Units
.
iconSizes
.
small
source
:
model
.
kDescendantExpanded
?
'
arrow-up
'
:
'
arrow-down
'
isMask
:
true
color
:
categoryHeader
.
labelItem
.
color
}
onClicked
:
mailList
.
model
.
toggleChildren
(
index
)
contentItem
:
RowLayout
{
Kirigami.Icon
{
Layout.alignment
:
Qt
.
AlignVCenter
visible
:
model
.
kDescendantLevel
>
1
source
:
"
folder-symbolic
"
Layout.preferredHeight
:
Kirigami
.
Units
.
iconSizes
.
small
Layout.preferredWidth
:
Layout
.
preferredHeight
}
QQC2.Label
{
Layout.fillWidth
:
true
color
:
Kirigami
.
Theme
.
disabledTextColor
text
:
categoryHeader
.
displayText
font.weight
:
Font
.
DemiBold
elide
:
Text
.
ElideRight
}
Kirigami.Icon
{
implicitWidth
:
Kirigami
.
Units
.
iconSizes
.
small
implicitHeight
:
Kirigami
.
Units
.
iconSizes
.
small
source
:
model
.
kDescendantExpanded
?
'
arrow-up
'
:
'
arrow-down
'
}
}
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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