Warning, /plasma/plasma-desktop/applets/kicker/package/contents/ui/RunnerResultsList.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 SPDX-FileCopyrightText: 2013-2014 Eike Hein <hein@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 import QtQuick 2.15 0008 import QtQuick.Layouts 1.15 0009 0010 import org.kde.plasma.components 3.0 as PlasmaComponents3 0011 import org.kde.kirigami 2.20 as Kirigami 0012 import org.kde.ksvg 1.0 as KSvg 0013 import org.kde.plasma.plasmoid 2.0 0014 0015 FocusScope { 0016 width: runnerMatches.width + vertLine.width + vertLine.anchors.leftMargin + runnerMatches.anchors.leftMargin 0017 height: parent.height 0018 0019 signal keyNavigationAtListEnd 0020 0021 property alias currentIndex: runnerMatches.currentIndex 0022 property alias count: runnerMatches.count 0023 property alias containsMouse: runnerMatches.containsMouse 0024 0025 Accessible.name: header.text 0026 Accessible.role: Accessible.MenuItem 0027 0028 KSvg.SvgItem { 0029 id: vertLine 0030 0031 anchors.left: parent.left 0032 anchors.leftMargin: (index > 0 ) ? Kirigami.Units.smallSpacing : 0 0033 0034 width: (index > 0 ) ? lineSvg.vertLineWidth : 0 0035 height: parent.height 0036 0037 visible: (index > 0) 0038 0039 svg: lineSvg 0040 elementId: "vertical-line" 0041 } 0042 0043 PlasmaComponents3.Label { 0044 id: header 0045 0046 anchors.left: vertLine.right 0047 0048 width: runnerMatches.width 0049 height: runnerMatches.itemHeight + Kirigami.Units.smallSpacing 0050 0051 horizontalAlignment: Text.AlignHCenter 0052 verticalAlignment: Text.AlignVTop 0053 0054 textFormat: Text.PlainText 0055 wrapMode: Text.NoWrap 0056 elide: Text.ElideRight 0057 font.weight: Font.Bold 0058 0059 text: (runnerMatches.model !== null) ? runnerMatches.model.name : "" 0060 } 0061 0062 ItemListView { 0063 id: runnerMatches 0064 0065 anchors.top: Plasmoid.configuration.alignResultsToBottom ? undefined : header.bottom 0066 anchors.bottom: Plasmoid.configuration.alignResultsToBottom ? parent.bottom : undefined 0067 anchors.bottomMargin: (index == 0 && anchors.bottom !== undefined) ? searchField.height + (2 * Kirigami.Units.smallSpacing) : undefined 0068 anchors.left: vertLine.right 0069 anchors.leftMargin: (index > 0) ? Kirigami.Units.smallSpacing : 0 0070 0071 height: { 0072 var listHeight = (((index == 0) 0073 ? rootList.height : runnerColumns.height) - header.height); 0074 0075 if (model && model.count) { 0076 return Math.min(favoriteSystemActions.height + favoriteApps.height - header.height, model.count * itemHeight); 0077 } 0078 0079 return listHeight; 0080 } 0081 0082 focus: true 0083 0084 iconsEnabled: true 0085 keyNavigationWraps: (index != 0) 0086 0087 resetOnExitDelay: 0 0088 0089 model: runnerModel.modelForRow(index) 0090 0091 onModelChanged: { 0092 if (model === undefined || model === null) { 0093 enabled: false; 0094 visible: false; 0095 } 0096 } 0097 0098 onCountChanged: { 0099 if (index == 0 && searchField.focus) { 0100 currentIndex = 0; 0101 } 0102 } 0103 } 0104 0105 Component.onCompleted: { 0106 runnerMatches.keyNavigationAtListEnd.connect(keyNavigationAtListEnd); 0107 } 0108 }