Changeset View
Changeset View
Standalone View
Standalone View
kded/qml/OutputIdentifier.qml
- This file was added.
1 | /* | ||||
---|---|---|---|---|---|
2 | * Copyright 2016 Sebastian Kügler <sebas@kde.org> | ||||
3 | * | ||||
4 | * This program is free software; you can redistribute it and/or | ||||
5 | * modify it under the terms of the GNU General Public License as | ||||
6 | * published by the Free Software Foundation; either version 2 of | ||||
7 | * the License, or (at your option) any later version. | ||||
8 | * | ||||
9 | * This program is distributed in the hope that it will be useful, | ||||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
12 | * GNU General Public License for more details. | ||||
13 | * | ||||
14 | * You should have received a copy of the GNU General Public License | ||||
15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||||
16 | */ | ||||
17 | | ||||
18 | import QtQuick 2.5 | ||||
19 | import QtQuick.Layouts 1.3 | ||||
20 | import QtQuick.Window 2.2 | ||||
21 | | ||||
22 | import org.kde.plasma.core 2.0 as PlasmaCore | ||||
23 | import org.kde.plasma.components 2.0 as PlasmaComponents | ||||
24 | | ||||
25 | ColumnLayout { | ||||
26 | | ||||
27 | property QtObject rootItem | ||||
28 | | ||||
29 | property string outputName: rootItem ? rootItem.outputName : "" | ||||
30 | property string modeName: rootItem ? rootItem.modeName : "" | ||||
31 | | ||||
32 | PlasmaComponents.Label { | ||||
33 | id: displayName | ||||
34 | | ||||
35 | Layout.maximumWidth: Screen.width * 0.8 | ||||
36 | Layout.maximumHeight: Screen.height * 0.8 | ||||
37 | Layout.margins: units.largeSpacing | ||||
38 | Layout.bottomMargin: units.smallSpacing | ||||
39 | | ||||
40 | text: root.outputName | ||||
41 | font.pointSize: theme.defaultFont.pointSize * 3 | ||||
42 | horizontalAlignment: Text.AlignHCenter | ||||
43 | wrapMode: Text.WordWrap | ||||
44 | maximumLineCount: 2 | ||||
45 | elide: Text.ElideLeft | ||||
46 | } | ||||
47 | | ||||
48 | PlasmaComponents.Label { | ||||
49 | id: modeLabel; | ||||
50 | | ||||
51 | Layout.fillWidth: true | ||||
52 | Layout.bottomMargin: units.largeSpacing | ||||
53 | | ||||
54 | text: root.modeName; | ||||
55 | horizontalAlignment: Text.AlignHCenter; | ||||
56 | } | ||||
57 | } |