@@ -1,5 +1,5 @@
11/*
2− * Copyright (C) 2013 Canonical, Ltd.
2+ * Copyright (C) 2013,2014 Canonical, Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -18,51 +18,41 @@ import QtQuick 2.0
1818import Ubuntu.Components 0.1
1919
2020Item {
21− /*!
22− \preliminary
23− The text that is shown as the header text.
24− \qmlproperty string text
25− */
2621 property alias text: label.text
27− property alias textColor: label.color
28− property alias image: image.source
22+ property alias color: label.color
23+ property alias iconName: icon.name
2924
3025 signal clicked(variant mouse)
3126
3227 height: units.gu(5)
3328
34− Item {
29+ Row {
30+ spacing: units.gu(.5)
3531 anchors {
3632 left: parent.left
3733 right: parent.right
38− rightMargin: units.gu(0.5)
39− top: parent.top
40− bottom: parent.bottom
34+ verticalCenter: parent.verticalCenter
35+ margins: units.gu(1)
4136 }
4237
4338 Label {
4439 id: label
45− anchors {
46− left: parent.left
47− leftMargin: units.gu(2)
48− verticalCenter: parent.verticalCenter
49− }
5040
51− color: "grey" // TODO karni: Update Ubuntu.Compoonents.Themes.Palette.
5241 font.family: "Ubuntu"
5342 fontSize: "medium"
5443 elide: Text.ElideRight
44+ maximumLineCount: 1
5545 textFormat: Text.PlainText
56− width: parent.width - image.width - image.leftMargin - anchors.leftMargin
46+ width: Math.min(parent.width - units.gu(4), implicitWidth)
5747 }
5848
59− Image {
60− id: image
61− readonly property double leftMargin: units.gu(1)
62− x: label.x + label.contentWidth + leftMargin
63− anchors {
64− verticalCenter: parent.verticalCenter
65− }
49+ Icon {
50+ id: icon
51+ visible: name != ""
52+ anchors.bottom: label.baseline
53+ height: units.gu(1)
54+ width: height
55+ color: label.color
6656 }
6757 }
6858