Warning, /frameworks/qqc2-desktop-style/org.kde.desktop/private/DefaultListItemBackground.qml is written in an unsupported language. File is not indexed.
0001 /*
0002 SPDX-FileCopyrightText: 2017 Marco Martin <mart@kde.org>
0003 SPDX-FileCopyrightText: 2017 The Qt Company Ltd.
0004 SPDX-FileCopyrightText: 2023 ivan tkachenko <me@ratijas.tk>
0005
0006 SPDX-License-Identifier: LGPL-3.0-only OR GPL-2.0-or-later
0007 */
0008
0009
0010 import QtQuick 2.15
0011 import QtQuick.Templates 2.15 as T
0012 import org.kde.kirigami 2.20 as Kirigami
0013
0014 Rectangle {
0015 id: background
0016
0017 property T.ItemDelegate control
0018
0019 color: control.highlighted || (control.pressed && !control.checked && !control.sectionDelegate)
0020 ? Kirigami.Theme.highlightColor : Kirigami.Theme.backgroundColor
0021
0022 visible: control.ListView.view ? control.ListView.view.highlight === null : true
0023
0024 Rectangle {
0025 anchors.fill: parent
0026 color: Kirigami.Theme.highlightColor
0027 opacity: control.hovered && !control.pressed ? 0.2 : 0
0028 }
0029 }