Changeset View
Changeset View
Standalone View
Standalone View
qml/frame/styledframe.qml
- This file was added.
1 | import QtQuick 2.12 | ||||
---|---|---|---|---|---|
2 | import QtQuick.Layouts 1.2 | ||||
3 | import org.kde.plasma.core 2.0 as PlasmaCore | ||||
4 | import org.kde.plasma.components 2.0 as PlasmaComponents | ||||
5 | | ||||
6 | PlasmaCore.FrameSvgItem | ||||
7 | { | ||||
8 | id: root | ||||
9 | imagePath: "widgets/background" | ||||
10 | implicitWidth: layout.implicitWidth + fixedMargins.left + fixedMargins.right | ||||
11 | implicitHeight: layout.implicitHeight + fixedMargins.top + fixedMargins.bottom | ||||
12 | | ||||
13 | RowLayout { | ||||
14 | id: layout | ||||
15 | anchors.centerIn: parent | ||||
16 | width: Math.min(parent.width, implicitWidth) | ||||
17 | height: Math.min(parent.height, implicitHeight) | ||||
18 | | ||||
19 | PlasmaCore.IconItem { | ||||
20 | source: frameData.icon | ||||
21 | animated: frameData.crossFadeEnabled | ||||
22 | Layout.preferredWidth: frameData.iconSize.width | ||||
23 | Layout.preferredHeight: frameData.iconSize.height | ||||
24 | } | ||||
25 | PlasmaComponents.Label { | ||||
26 | Layout.fillWidth: true | ||||
27 | visible: text != "" | ||||
28 | text: frameData.text | ||||
29 | font: frameData.font | ||||
30 | elide: Text.ElideRight | ||||
31 | } | ||||
32 | } | ||||
33 | } |