2
* Copyright 2016 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/>.
16
* Author: Marco Trevisan <marco.trevisan@canonical.com>
20
import Ubuntu.Components 1.3
26
property alias layout: layoutItem
27
property alias title: layoutItem.title
28
property alias subtitle: layoutItem.subtitle
29
property alias summary: layoutItem.summary
30
property alias slots: layoutItem.children
32
// These fields are for retro-compatibility with ListItem.Empty based MenuItems
33
property alias trailingComponent: trailingComponentLoader.sourceComponent
34
property alias trailingComponentItem: trailingComponentLoader.item
35
property alias component: menu.trailingComponent
37
implicitHeight: layoutItem.height + (divider.visible ? divider.height : 0)
41
objectName: "menuLayoutItem"
43
title.color: menu.foregroundColor
46
id: trailingComponentLoader
48
visible: status == Loader.Ready
49
SlotsLayout.position: SlotsLayout.Trailing