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
26 property alias titleWeight: titleLabel.font.weight
27 property alias titleSize: titleLabel.fontSize
29 // FIXME: Saviq, used to scale fonts down in Carousel
30 property real fontScale: 1.0
32 property alias headerAlignment: titleLabel.horizontalAlignment
34 property bool inOverlay: false
35 property bool useMascotShape: true
36 property color fontColor: Theme.palette.selected.backgroundText
38 visible: mascotImage.status === Image.Ready || title
39 height: row.height > 0 ? row.height + row.margins * 2 : 0
43 objectName: "outerRow"
45 property real margins: units.gu(1)
47 spacing: mascotShape.visible || mascotImage.visible || inOverlay ? margins : 0
49 top: parent.top; left: parent.left; right: parent.right
57 objectName: "mascotShape"
59 // TODO karni: Icon aspect-ratio is 8:7.5. Revisit these values to avoid fraction of pixels.
61 height: units.gu(5.625)
62 anchors.verticalCenter: parent.verticalCenter
63 visible: useMascotShape && image && image.status === Image.Ready
64 readonly property int maxSize: Math.max(width, height) * 4
66 image: useMascotShape ? mascotImage : null
71 objectName: "mascotImage"
73 width: source ? mascotShape.width : 0
74 height: mascotShape.height
75 anchors.verticalCenter: parent.verticalCenter
76 visible: !useMascotShape && status === Image.Ready
78 sourceSize { width: mascotShape.maxSize; height: mascotShape.maxSize }
79 fillMode: Image.PreserveAspectCrop
80 horizontalAlignment: Image.AlignHCenter
81 verticalAlignment: Image.AlignVCenter
86 width: parent.width - x
88 anchors.verticalCenter: parent.verticalCenter
92 objectName: "titleLabel"
93 anchors { left: parent.left; right: parent.right }
94 elide: Text.ElideRight
95 font.weight: Font.Normal
99 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale)
105 objectName: "subtitleLabel"
106 anchors { left: parent.left; right: parent.right }
107 elide: Text.ElideRight
109 font.weight: Font.Light
110 visible: titleLabel.text && text
111 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale)
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