Warning, /plasma/plasma-desktop/desktoppackage/contents/views/PreviewBanner.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 SPDX-FileCopyrightText: 2023 Fushan Wen <qydwhotmail@gmail.com> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 import QtQuick 0008 0009 import org.kde.plasma.extras as PlasmaExtras 0010 import org.kde.kirigami 2.20 as Kirigami 0011 0012 Item { 0013 // Using childrenRect.width causes a binding loop since we can only get the 0014 // actual width, not the implicitWidth--which is what we would want 0015 width: Math.max(title.implicitWidth, subtitle.implicitWidth) 0016 height: childrenRect.height 0017 0018 HoverHandler { 0019 cursorShape: Qt.PointingHandCursor 0020 } 0021 0022 TapHandler { 0023 onTapped: Qt.openUrlExternally("https://bugs.kde.org/") 0024 } 0025 0026 PlasmaExtras.ShadowedLabel { 0027 id: title 0028 anchors { 0029 top: parent.top 0030 right: parent.right 0031 } 0032 z: 2 0033 text: desktop.previewBannerTitle 0034 // Emulate the size of a level 1 heading 0035 font.pointSize: Math.round(Kirigami.Theme.defaultFont.pointSize * 1.35) 0036 } 0037 0038 PlasmaExtras.ShadowedLabel { 0039 id: subtitle 0040 anchors { 0041 top: title.bottom 0042 right: parent.right 0043 } 0044 z: 2 0045 text: desktop.previewBannerText 0046 } 0047 }