Warning, /plasma/latte-dock/declarativeimports/components/Label.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 import QtQuick.Window 2.2
0022 import QtQuick.Templates 2.2 as T
0023 import org.kde.plasma.core 2.0 as PlasmaCore
0024 
0025 T.Label {
0026     id: control
0027 
0028     verticalAlignment: lineCount > 1 ? Text.AlignTop : Text.AlignVCenter
0029 
0030     activeFocusOnTab: false
0031 
0032     // Work around Qt bug where NativeRendering breaks for non-integer scale factors
0033     // https://bugreports.qt.io/browse/QTBUG-67007
0034     renderType: Screen.devicePixelRatio % 1 !== 0 ? Text.QtRendering : Text.NativeRendering
0035 
0036     //font data is the system one by default
0037     //TODO: from theme singleton?
0038     color: PlasmaCore.ColorScope.textColor
0039     linkColor: theme.linkColor
0040 
0041     opacity: enabled? 1 : 0.6
0042 
0043     Accessible.role: Accessible.StaticText
0044     Accessible.name: text
0045 }