Warning, /frameworks/qqc2-desktop-style/org.kde.desktop/Label.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 0005 SPDX-License-Identifier: LGPL-3.0-only OR GPL-2.0-or-later 0006 */ 0007 0008 0009 import QtQuick 2.15 0010 import QtQuick.Window 2.2 0011 import QtQuick.Templates 2.15 as T 0012 import org.kde.qqc2desktopstyle.private 1.0 as StylePrivate 0013 import org.kde.kirigami 2.4 as Kirigami 0014 0015 T.Label { 0016 id: control 0017 0018 // Work around Qt bug where left aligned text is not right aligned 0019 // in RTL mode unless horizontalAlignment is explicitly set. 0020 // https://bugreports.qt.io/browse/QTBUG-95873 0021 horizontalAlignment: Text.AlignLeft 0022 verticalAlignment: lineCount > 1 ? Text.AlignTop : Text.AlignVCenter 0023 0024 // Work around Qt bug where NativeRendering breaks for non-integer scale factors 0025 // https://bugreports.qt.io/browse/QTBUG-67007 0026 renderType: Screen.devicePixelRatio % 1 !== 0 ? Text.QtRendering : Text.NativeRendering 0027 0028 HoverHandler { 0029 // By default HoverHandler accepts the left button while it shouldn't accept anything, 0030 // causing https://bugreports.qt.io/browse/QTBUG-106489. 0031 // Qt.NoButton unfortunately is not a valid value for acceptedButtons. 0032 // Disabling masks the problem, but 0033 // there is no proper workaround other than an upstream fix 0034 enabled: false 0035 cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : undefined 0036 } 0037 0038 color: Kirigami.Theme.textColor 0039 linkColor: Kirigami.Theme.linkColor 0040 font: Kirigami.Theme.defaultFont 0041 }