Warning, /plasma/kwin/src/plugins/outputlocator/qml/OutputLabel.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 SPDX-FileCopyrightText: 2012 Dan Vratil <dvratil@redhat.com> 0003 0004 SPDX-License-Identifier: LGPL-2.1-or-later 0005 */ 0006 0007 import QtQuick 0008 import org.kde.plasma.components 3.0 as PlasmaComponents3 0009 import org.kde.kirigami 2 as Kirigami 0010 0011 Rectangle { 0012 id: root; 0013 0014 property string outputName; 0015 property size resolution; 0016 property double scale; 0017 0018 color: Kirigami.Theme.backgroundColor 0019 0020 implicitWidth: childrenRect.width + 2 * childrenRect.x 0021 implicitHeight: childrenRect.height + 2 * childrenRect.y 0022 0023 PlasmaComponents3.Label { 0024 id: displayName 0025 x: Kirigami.Units.largeSpacing * 2 0026 y: Kirigami.Units.largeSpacing 0027 font.pointSize: Kirigami.Theme.defaultFont.pointSize * 3 0028 text: root.outputName; 0029 wrapMode: Text.WordWrap; 0030 horizontalAlignment: Text.AlignHCenter; 0031 } 0032 0033 PlasmaComponents3.Label { 0034 id: modeLabel; 0035 anchors { 0036 horizontalCenter: displayName.horizontalCenter 0037 top: displayName.bottom 0038 } 0039 text: resolution.width + "x" + resolution.height + 0040 (root.scale !== 1 ? "@" + Math.round(root.scale * 100.0) + "%": "") 0041 horizontalAlignment: Text.AlignHCenter; 0042 } 0043 }