@@ -18,12 +18,15 @@
1818 */
1919
2020import QtQuick 2.0
21+import QtQuick.Layouts 1.1
2122import Ubuntu.Components 0.1
2223import Ubuntu.Components.ListItems 0.1 as ListItem
2324
2425ListItem.Empty {
2526 id: menu
26− implicitHeight: units.gu(5.5)
27+ implicitHeight: mainColumn.implicitHeight
28+ + mainColumn.anchors.topMargin
29+ + mainColumn.anchors.bottomMargin
2730
2831 property alias statusIcon: statusIcon.name
2932 property alias statusText: labelStatus.text
@@ -33,93 +36,78 @@ ListItem.Empty {
3336 property bool roaming: false
3437 signal unlock
3538
36− Row {
37− id: iconRow
38− height: parent.height
39+ ColumnLayout {
40+ id: mainColumn
41+ anchors.fill: parent
42+ anchors.margins: menu.__contentsMargins
43+ spacing: units.gu(0.5)
3944
40− anchors {
41− left: parent.left
42− top: parent.top
43− leftMargin: menu.__contentsMargins
44− verticalCenter: parent.verticalCenter
45− }
46−
47− Icon {
48− id: statusIcon
49− color: Theme.palette.selected.backgroundText
50− keyColor: "#cccccc"
51−
52− width: height
53− height: Math.min(units.gu(5), parent.height - units.gu(1))
45+ Label {
46+ id: labelSimIdentifier
47+ elide: Text.ElideRight
48+ visible: text !== ""
49+ font.bold: true
50+ opacity: menu.locked ? 0.6 : 1.0
5451 }
5552
56− Icon {
57− id: iconConnectivity
58− color: Theme.palette.selected.backgroundText
59− keyColor: "#cccccc"
53+ RowLayout {
54+ id: statusRow
55+ spacing: units.gu(1)
6056
61− width: height
62− height: Math.min(units.gu(5), parent.height - units.gu(1))
63− }
64− }
57+ height: labelStatus.height
58+ width: parent.width
6559
66− Column {
67− id: columnStatus
68− anchors {
69− left: iconRow.right
70− leftMargin: units.gu(1)
71− verticalCenter: parent.verticalCenter
72− rightMargin: menu.__contentsMargins
73− }
60+ Label {
61+ id: labelStatus
62+ elide: Text.ElideRight
63+ opacity: 0.6
64+ }
7465
75− Label {
76− id: labelStatus
66+ RowLayout {
67+ spacing: 0.5
68+ height: parent.height
69+ Icon {
70+ id: statusIcon
71+ color: Theme.palette.selected.backgroundText
7772
78− elide: Text.ElideRight
79− }
73+ width: height
74+ height: parent.height
8075
81− Label {
82− id: labelSimIdentifier
76+ visible: name !== ""
77+ }
8378
84− elide: Text.ElideRight
85− visible: text !== ""
79+ Icon {
80+ id: iconConnectivity
81+ color: Theme.palette.selected.backgroundText
8682
87− fontSize: "x-small"
88− font.bold: true
89− }
90− }
83+ width: height
84+ height: parent.height
9185
92− Item {
93− height: parent.height
86+ visible: name !== ""
87+ }
88+ }
9489
95− anchors {
96− right: parent.right
97− rightMargin: menu.__contentsMargins
98− verticalCenter: parent.verticalCenter
99− }
90+ Item {
91+ // eat up all the excess space so that RoamingIndication
92+ // ends up to the far right
93+ Layout.fillWidth: true
94+ }
10095
101− RoamingIndication {
102− id: roamingIndication
103− anchors {
104− right: parent.right
105− verticalCenter: parent.verticalCenter
96+ RoamingIndication {
97+ id: roamingIndication
98+ visible: menu.roaming
99+ height: parent.height
106100 }
107− visible: menu.roaming
108− height: Math.min(units.gu(5), parent.height - units.gu(1))
109101 }
110102
111103 Button {
112− anchors {
113− right: parent.right
114− verticalCenter: parent.verticalCenter
115− }
116104 id: buttonUnlock
117105 objectName: "buttonUnlockSim"
118106 visible: menu.locked
119107
120− text: i18n.tr("Unlock")
108+ text: i18n.tr("Unlock SIM")
109+ Layout.preferredWidth: implicitWidth + units.gu(5)
121110
122− height: Math.min(units.gu(4), parent.height - units.gu(1))
123111 onTriggered: menu.unlock()
124112 }
125113 }