Changeset View
Changeset View
Standalone View
Standalone View
src/context/qml_plugin/Applet.qml
Show All 29 Lines | 23 | Rectangle { | |||
---|---|---|---|---|---|
30 | property string packagePath | 30 | property string packagePath | ||
31 | property url iconSource | 31 | property url iconSource | ||
32 | property bool collapsed: false | 32 | property bool collapsed: false | ||
33 | property bool configEnabled: false | 33 | property bool configEnabled: false | ||
34 | property real spacing: Kirigami.Units.smallSpacing | 34 | property real spacing: Kirigami.Units.smallSpacing | ||
35 | property real padding: spacing | 35 | property real padding: spacing | ||
36 | property real contentHeight: content.childrenRect.height | 36 | property real contentHeight: content.childrenRect.height | ||
37 | property Dialog configDialog: null | 37 | property Dialog configDialog: null | ||
38 | readonly property AppletHeader appletHeader: header | ||||
38 | readonly property SystemPalette palette: palette | 39 | readonly property SystemPalette palette: palette | ||
39 | 40 | | |||
40 | radius: Kirigami.Units.smallSpacing | 41 | radius: Kirigami.Units.smallSpacing | ||
41 | border.width: 2 | 42 | border.width: 2 | ||
42 | border.color: palette.mid | 43 | border.color: palette.mid | ||
43 | color: "transparent" | 44 | color: "transparent" | ||
44 | clip: true | 45 | clip: true | ||
45 | height: content.height + header.height + 2 * padding + !collapsed * spacing | 46 | height: content.height + header.height + 2 * padding + !collapsed * spacing | ||
46 | 47 | | |||
48 | function imageUrl(filename) { | ||||
49 | return AppletModel.imageUrl(root.appletId, filename); | ||||
50 | } | ||||
51 | | ||||
47 | onCollapsedChanged: AppletModel.setAppletCollapsed(appletId, collapsed) | 52 | onCollapsedChanged: AppletModel.setAppletCollapsed(appletId, collapsed) | ||
48 | onContentHeightChanged: AppletModel.setAppletContentHeight(appletId, contentHeight) | 53 | onContentHeightChanged: AppletModel.setAppletContentHeight(appletId, contentHeight) | ||
49 | 54 | | |||
50 | AppletHeader { | 55 | AppletHeader { | ||
51 | id: header | 56 | id: header | ||
52 | 57 | | |||
53 | title: root.name | 58 | title: root.name | ||
54 | iconSource: root.iconSource | 59 | iconSource: root.iconSource | ||
▲ Show 20 Lines • Show All 47 Lines • Show Last 20 Lines |