1
0
mirror of https://github.com/KDE/latte-dock.git synced 2024-12-26 11:21:40 +03:00
latte-dock/declarativeimports/components/Label.qml
2021-05-27 15:01:00 +00:00

33 lines
856 B
QML

/*
SPDX-FileCopyrightText: 2016 Marco Martin <mart@kde.org>
SPDX-License-Identifier: LGPL-2.0-or-later
*/
import QtQuick 2.1
import QtQuick.Window 2.2
import QtQuick.Templates 2.2 as T
import org.kde.plasma.core 2.0 as PlasmaCore
T.Label {
id: control
verticalAlignment: lineCount > 1 ? Text.AlignTop : Text.AlignVCenter
activeFocusOnTab: false
// Work around Qt bug where NativeRendering breaks for non-integer scale factors
// https://bugreports.qt.io/browse/QTBUG-67007
renderType: Screen.devicePixelRatio % 1 !== 0 ? Text.QtRendering : Text.NativeRendering
//font data is the system one by default
//TODO: from theme singleton?
color: PlasmaCore.ColorScope.textColor
linkColor: theme.linkColor
opacity: enabled? 1 : 0.6
Accessible.role: Accessible.StaticText
Accessible.name: text
}