Warning, /plasma/latte-dock/declarativeimports/components/private/DefaultListItemBackground.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 * Copyright 2016 Marco Martin <mart@kde.org> 0003 * 0004 * This program is free software; you can redistribute it and/or modify 0005 * it under the terms of the GNU Library General Public License as 0006 * published by the Free Software Foundation; either version 2, or 0007 * (at your option) any later version. 0008 * 0009 * This program is distributed in the hope that it will be useful, 0010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0012 * GNU Library General Public License for more details 0013 * 0014 * You should have received a copy of the GNU Library General Public 0015 * License along with this program; if not, write to the 0016 * Free Software Foundation, Inc., 0017 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 0018 */ 0019 0020 import QtQuick 2.1 0021 //for Settings 0022 import org.kde.plasma.core 2.0 as PlasmaCore 0023 import org.kde.kirigami 2.2 as Kirigami 0024 0025 PlasmaCore.FrameSvgItem { 0026 id: background 0027 0028 property bool separatorVisible: false 0029 imagePath: "widgets/listitem" 0030 prefix: control.highlighted || control.pressed ? "pressed" : "normal" 0031 0032 visible: control.ListView.view ? control.ListView.view.highlight === null : true 0033 0034 PlasmaCore.FrameSvgItem { 0035 imagePath: "widgets/listitem" 0036 visible: !Kirigami.Settings.isMobile 0037 prefix: "hover" 0038 anchors.fill: parent 0039 opacity: control.hovered && !control.pressed ? 1 : 0 0040 Behavior on opacity { NumberAnimation { duration: units.longDuration } } 0041 } 0042 0043 PlasmaCore.SvgItem { 0044 svg: PlasmaCore.Svg {imagePath: "widgets/listitem"} 0045 elementId: "separator" 0046 anchors { 0047 left: parent.left 0048 right: parent.right 0049 top: parent.top 0050 } 0051 height: naturalSize.height 0052 visible: separatorVisible && (listItem.sectionDelegate || (typeof(index) != "undefined" && index > 0 && !listItem.checked && !itemMouse.pressed)) 0053 } 0054 }