2
* Copyright 2014 Canonical Ltd.
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU Lesser General Public License as published by
6
* the Free Software Foundation; version 3.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU Lesser General Public License for more details.
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18
import Ubuntu.Components 0.1 as Components
19
import Ubuntu.Settings.Components 0.1 as USC
20
import Ubuntu.Components.ListItems 0.1 as ListItems
21
import QtQuick.Layouts 1.1
26
property alias iconSource: iconVisual.source
27
property alias text: label.text
28
property alias iconColor: iconVisual.color
29
property alias component: componentLoader.sourceComponent
35
leftMargin: menu.__contentsMargins
36
rightMargin: menu.__contentsMargins
38
spacing: menu.__contentsMargins
42
visible: status == Image.Ready
43
color: Theme.palette.selected.backgroundText
45
readonly property real size: Math.min(units.gu(3), parent.height - menu.__contentsMargins)
49
Layout.alignment: Qt.AlignVCenter
54
Layout.fillWidth: true
55
Layout.alignment: Qt.AlignVCenter
57
elide: Text.ElideRight
59
opacity: label.enabled ? 1.0 : 0.5