Debian Codegraph @

src/imports/Components/Themes/Ambiance/1.2/ProgressionVisualStyle.qml

raw
1 /*
2 * Copyright 2013 Canonical Ltd.
3 *
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.
7 *
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.
12 *
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/>.
15 */
16
17 import QtQuick 2.4
18 import Lomiri.Components 1.2
19
20 Item {
21 id: progressionVisualStyle
22
23 property url progressionDividerSource: Qt.resolvedUrl("../artwork/progression_divider.png")
24 property url progressionIconSource: Qt.resolvedUrl("../artwork/chevron.png")
25
26 implicitWidth: progressIcon.width + (styledItem.showSplit ? styledItem.splitMargin + progressionDivider.width : 0)
27
28 Image {
29 id: progressIcon
30 source: visible ? progressionIconSource : ""
31 anchors {
32 verticalCenter: parent.verticalCenter
33 right: parent.right
34 }
35
36 opacity: enabled ? 1.0 : 0.5
37 mirror: Qt.application.layoutDirection == Qt.RightToLeft
38 }
39
40 Image {
41 id: progressionDivider
42 visible: styledItem.showSplit
43 anchors {
44 top: parent.top
45 bottom: parent.bottom
46 right: progressIcon.left
47 rightMargin: styledItem.splitMargin
48 }
49 source: visible ? progressionDividerSource : ""
50 opacity: enabled ? 1.0 : 0.5
51 }
52 }