2 * Copyright (C) 2013 Canonical, Ltd.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU 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 General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18import Ubuntu.Components 0.1
22 property alias mascot: mascotImage.source
23 property alias title: titleLabel.text
24 property alias subtitle: subtitleLabel.text
25 property alias price: priceLabel.text
26 property alias oldPrice: oldPriceLabel.text
27 property alias altPrice: altPriceLabel.text
29 visible: mascotImage.status === Image.Ready || title || price
30 height: row.height > 0 ? row.height + row.spacing * 2 : 0
34 objectName: "outerRow"
36 anchors { top: parent.top; left: parent.left; right: parent.right; margins: spacing }
41 objectName: "mascotShape"
45 visible: image.status === Image.Ready
49 sourceSize { width: mascotShape.width; height: mascotShape.height }
55 width: parent.width - x
59 objectName: "titleLabel"
60 anchors { left: parent.left; right: parent.right }
61 elide: Text.ElideRight
62 font.weight: Font.DemiBold
69 objectName: "subtitleLabel"
70 anchors { left: parent.left; right: parent.right }
71 elide: Text.ElideRight
72 visible: titleLabel.text && text
78 anchors { left: parent.left; right: parent.right }
80 property int labels: {
81 var labels = 1; // price always visible
82 if (oldPriceLabel.text !== "") labels += 1;
83 if (altPriceLabel.text !== "") labels += 1;
86 property real labelWidth: width / labels
90 width: parent.labelWidth
91 elide: Text.ElideRight
92 font.weight: Font.DemiBold
93 color: Theme.palette.selected.foreground
99 objectName: "oldPriceLabel"
100 width: parent.labelWidth
101 elide: Text.ElideRight
102 horizontalAlignment: parent.labels === 3 ? Text.AlignHCenter : Text.AlignRight
108 width: parent.labelWidth
109 elide: Text.ElideRight
110 horizontalAlignment: Text.AlignRight
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list