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
Plasma
Breeze Style for QQC2
Commits
e5f75593
Commit
e5f75593
authored
Feb 17, 2021
by
Noah Davis
🌵
Browse files
[DelegateBackground] Remove MenuItem related logic
parent
90465069
Changes
1
Hide whitespace changes
Inline
Side-by-side
style/impl/DelegateBackground.qml
View file @
e5f75593
...
...
@@ -9,10 +9,7 @@ import org.kde.kirigami 2.14 as Kirigami
// TODO: I'm currently unsatisfied with the appearance of this
Loader
{
id
:
root
property
T.AbstractButton
control
:
root
.
parent
// God, this code is ugly. Somehow this works, but `control.ListView.view && control.ListView.view.highlight` doesn't.
property
bool
isInListView
:
control
.
ListView
.
view
??
false
property
bool
listViewHasHighlight
:
isInListView
&&
(
control
.
ListView
.
view
.
highlight
??
false
)
property
T.ItemDelegate
control
:
root
.
parent
property
color
normalColor
:
control
instanceof
T
.
SwipeDelegate
?
Kirigami
.
Theme
.
backgroundColor
:
Qt
.
rgba
(
...
...
@@ -40,28 +37,15 @@ Loader {
property
bool
backgroundAnimationRunning
:
false
property
bool
borderAnimationRunning
:
false
visible
:
(
highlightBorder
||
backgroundAnimationRunning
||
borderAnimationRunning
||
control
instanceof
T
.
SwipeDelegate
)
&&
!
listViewHasHighlight
visible
:
(
highlightBorder
||
backgroundAnimationRunning
||
borderAnimationRunning
||
control
instanceof
T
.
SwipeDelegate
)
active
:
visible
sourceComponent
:
Component
{
Kirigami.ShadowedRectangle
{
id
:
mainBackground
readonly
property
bool
isCurrentItem
:
root
.
isInListView
&&
control
.
ListView
.
isCurrentItem
readonly
property
int
currentIndex
:
root
.
isInListView
?
control
.
ListView
.
view
.
currentIndex
:
0
// readonly property int count: root.isInListView ? control.ListView.view.count : 0
readonly
property
bool
horizontalListView
:
root
.
isInListView
&&
control
.
ListView
.
view
.
orientation
===
ListView
.
Horizontal
implicitHeight
:
Kirigami
.
Units
.
mediumControlHeight
radius
:
root
.
radius
readonly
property
real
topRadius
:
!
root
.
isInListView
||
(
isCurrentItem
&&
currentIndex
==
0
)
?
radius
:
0
readonly
property
real
bottomRadius
:
!
root
.
isInListView
||
(
isCurrentItem
&&
currentIndex
==
control
.
ListView
.
view
.
count
-
1
)
?
radius
:
0
corners
{
topLeftRadius
:
topRadius
topRightRadius
:
topRadius
bottomLeftRadius
:
bottomRadius
bottomRightRadius
:
bottomRadius
}
color
:
root
.
color
...
...
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