| 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 |
| 19 |
|
| 20 |
Item { |
| 21 |
id: progressionVisualStyle |
| 22 |
|
| 23 |
property url progressionDividerSource: Qt.resolvedUrl("../artwork/[email protected]") |
| 24 |
property url progressionIconSource: Qt.resolvedUrl("../artwork/[email protected]") |
| 25 |
|
| 26 |
implicitWidth: progressIcon.width + (styledItem.showSplit ? styledItem.splitMargin + progressionDivider.width : 0) |
| 27 |
|
| 28 |
Image { |
| 29 |
id: progressIcon |
| 30 |
source: progressionIconSource |
| 31 |
anchors { |
| 32 |
verticalCenter: parent.verticalCenter |
| 33 |
right: parent.right |
| 34 |
} |
| 35 |
scale: units.gridUnit / 27 |
| 36 |
|
| 37 |
opacity: enabled ? 1.0 : 0.5 |
| 38 |
mirror: Qt.application.layoutDirection === Qt.RightToLeft |
| 39 |
} |
| 40 |
|
| 41 |
Image { |
| 42 |
id: progressionDivider |
| 43 |
visible: styledItem.showSplit |
| 44 |
anchors { |
| 45 |
top: parent.top |
| 46 |
bottom: parent.bottom |
| 47 |
right: progressIcon.left |
| 48 |
rightMargin: styledItem.splitMargin |
| 49 |
} |
| 50 |
source: visible ? progressionDividerSource : "" |
| 51 |
scale: units.gridUnit / 18 |
| 52 |
opacity: enabled ? 1.0 : 0.5 |
| 53 |
} |
| 54 |
} |