on xenial help sign in
Add 1GU margins, 1GU spacing in indicators and use Icon to colourize them.
433558bMichał Sawicz
qml/Panel/Indicators/DefaultIndicatorWidget.qml+12−16
@@ -24,7 +24,7 @@ import Unity.Indicators 0.1 as Indicators
24Indicators.IndicatorBase {
24Indicators.IndicatorBase {
25 id: indicatorWidget
25 id: indicatorWidget
26
26
27− property int iconSize: height
27+ property int iconSize: units.gu(2)
28 property alias leftLabel: itemLeftLabel.text
28 property alias leftLabel: itemLeftLabel.text
29 property alias rightLabel: itemRightLabel.text
29 property alias rightLabel: itemRightLabel.text
30 property var icons: undefined
30 property var icons: undefined
@@ -34,7 +34,6 @@ Indicators.IndicatorBase {
34
34
35 Row {
35 Row {
36 id: itemRow
36 id: itemRow
37− width: childrenRect.width
38 objectName: "itemRow"
37 objectName: "itemRow"
39 anchors {
38 anchors {
40 top: parent.top
39 top: parent.top
@@ -55,7 +54,6 @@ Indicators.IndicatorBase {
55 }
54 }
56
55
57 Row {
56 Row {
58− width: childrenRect.width
59 anchors {
57 anchors {
60 top: parent.top
58 top: parent.top
61 bottom: parent.bottom
59 bottom: parent.bottom
@@ -65,22 +63,20 @@ Indicators.IndicatorBase {
65 model: indicatorWidget.icons
63 model: indicatorWidget.icons
66
64
67 Item {
65 Item {
68− width: guRoundUp(itemImage.width)
66+ width: guRoundUp(itemImage.width) + units.gu(1)
69− height: indicatorWidget.iconSize
67+ anchors { top: parent.top; bottom: parent.bottom }
70
68
71− Image {
69+ Icon {
72 id: itemImage
70 id: itemImage
73 objectName: "itemImage"
71 objectName: "itemImage"
74− visible: source != ""
72+ // FIXME: Should be dynamic width, see http://pad.lv/1284235
75− source: modelData
73+ width: indicatorWidget.iconSize
76− height: parent.height
74+ height: indicatorWidget.iconSize
77− anchors.horizontalCenter: parent.horizontalCenter
75+ anchors.centerIn: parent
78− fillMode: Image.PreserveAspectFit
76+
79−
77+ // FIXME: Icon needs to accept source, see http://pad.lv/1284233
80− sourceSize {
78+ name: modelData.replace("image://theme/", "")
81− width: indicatorWidget.iconSize
79+ color: "#CCCCCC"
82− height: indicatorWidget.iconSize
83− }
84 }
80 }
85 }
81 }
86 }
82 }
qml/Panel/Panel.qml+2−1
@@ -21,7 +21,7 @@ import "../Components"
21Item {
21Item {
22 id: root
22 id: root
23 readonly property real panelHeight: units.gu(3) + units.dp(2)
23 readonly property real panelHeight: units.gu(3) + units.dp(2)
24− property real indicatorsMenuWidth: (shell.width > units.gu(60)) ? units.gu(40) : shell.width
24+ property real indicatorsMenuWidth: (shell.width > units.gu(60)) ? units.gu(38) : shell.width - units.gu(2)
25 property alias indicators: indicatorsMenu
25 property alias indicators: indicatorsMenu
26 property bool fullscreenMode: false
26 property bool fullscreenMode: false
27 property bool searchVisible: true
27 property bool searchVisible: true
@@ -98,6 +98,7 @@ Item {
98 objectName: "indicators"
98 objectName: "indicators"
99
99
100 anchors.right: parent.right
100 anchors.right: parent.right
101+ anchors.rightMargin: units.gu(1)
101 y: panelBackground.y
102 y: panelBackground.y
102 width: root.indicatorsMenuWidth
103 width: root.indicatorsMenuWidth
103 shown: false
104 shown: false