on xenial help sign in
Fixed coloring in panel
bf6e623Nick Dedekind
qml/Panel/Handle.qml+2−2
@@ -19,7 +19,7 @@ import Ubuntu.Components 1.3
19
19
20Rectangle {
20Rectangle {
21 id: handle
21 id: handle
22− color: "#5d5d5d"
22+ color: UbuntuColors.slate
23 height: units.gu(2)
23 height: units.gu(2)
24 property bool active: false
24 property bool active: false
25
25
@@ -35,7 +35,7 @@ Rectangle {
35 id: dot
35 id: dot
36 width: units.dp(3)
36 width: units.dp(3)
37 height: width
37 height: width
38− color: handle.active ? UbuntuColors.orange : "#888888"
38+ color: handle.active ? UbuntuColors.orange : UbuntuColors.ash
39 radius: units.dp(1)
39 radius: units.dp(1)
40 }
40 }
41 }
41 }
qml/Panel/IndicatorItem.qml+3−3
@@ -31,9 +31,9 @@ IndicatorDelegate {
31 property bool selected: false
31 property bool selected: false
32 property real iconHeight: units.gu(2)
32 property real iconHeight: units.gu(2)
33 readonly property color color: {
33 readonly property color color: {
34− if (!expanded) return "#ffffff";
34+ if (!expanded) return theme.palette.normal.backgroundText;
35− if (!selected) return "#888888";
35+ if (!selected) return theme.palette.inactive.backgroundText;
36− return "#ffffff";
36+ return theme.palette.normal.backgroundText;
37 }
37 }
38
38
39 signal clicked()
39 signal clicked()
qml/Panel/Indicators/MenuItemFactory.qml+3−3
@@ -261,7 +261,7 @@ Item {
261 name: "settings"
261 name: "settings"
262 height: units.gu(3)
262 height: units.gu(3)
263 width: height
263 width: height
264− color: theme.palette.selected.backgroundText
264+ color: theme.palette.normal.backgroundText
265 }
265 }
266 }
266 }
267 }
267 }
@@ -293,7 +293,7 @@ Item {
293 source: menuData.icon
293 source: menuData.icon
294 height: units.gu(3)
294 height: units.gu(3)
295 width: height
295 width: height
296− color: theme.palette.selected.backgroundText
296+ color: theme.palette.normal.backgroundText
297 }
297 }
298 }
298 }
299 }
299 }
@@ -620,7 +620,7 @@ Item {
620
620
621 Component {
621 Component {
622 id: modeminfoitem;
622 id: modeminfoitem;
623− ModemInfoItem {
623+ Menus.ModemInfoItem {
624 objectName: "modemInfoItem"
624 objectName: "modemInfoItem"
625 property QtObject menuData: null
625 property QtObject menuData: null
626 property var menuModel: menuFactory.menuModel
626 property var menuModel: menuFactory.menuModel
qml/Panel/Indicators/ModemInfoItem.qmldeleted−111
@@ -1,111 +0,0 @@
1−/*
2− * Copyright 2014,2015 Canonical Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU Lesser General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
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 Lesser General Public License for more details.
12− *
13− * You should have received a copy of the GNU Lesser General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.4
18−import QtQuick.Layouts 1.1
19−import Ubuntu.Components 1.3
20−import Ubuntu.Components.ListItems 1.3 as ListItem
21−
22−ListItem.Empty {
23− id: menu
24− implicitHeight: mainColumn.implicitHeight
25− + mainColumn.anchors.topMargin
26− + mainColumn.anchors.bottomMargin
27−
28− property alias statusIcon: statusIcon.name
29− property alias statusText: labelStatus.text
30− property alias connectivityIcon: iconConnectivity.name
31− property alias simIdentifierText: labelSimIdentifier.text
32− property bool locked : false
33− property bool roaming: false
34− signal unlock
35−
36− ColumnLayout {
37− id: mainColumn
38− anchors.fill: parent
39− anchors.margins: menu.__contentsMargins
40− spacing: units.gu(0.5)
41−
42− Label {
43− id: labelSimIdentifier
44− elide: Text.ElideRight
45− visible: text !== ""
46− font.bold: true
47− opacity: menu.locked ? 0.6 : 1.0
48− }
49−
50− RowLayout {
51− id: statusRow
52− spacing: units.gu(1)
53−
54− height: labelStatus.height
55− width: parent.width
56−
57− Label {
58− id: labelStatus
59− elide: Text.ElideRight
60− opacity: 0.6
61− }
62−
63− RowLayout {
64− spacing: 0.5
65− height: parent.height
66− Icon {
67− id: statusIcon
68− color: theme.palette.selected.backgroundText
69−
70− Layout.preferredHeight: parent.height
71− Layout.preferredWidth: Layout.preferredHeight
72−
73− visible: name !== ""
74− }
75−
76− Icon {
77− id: iconConnectivity
78− color: theme.palette.selected.backgroundText
79−
80− Layout.preferredHeight: parent.height
81− Layout.preferredWidth: Layout.preferredHeight
82−
83− visible: name !== ""
84− }
85− }
86−
87− Item {
88− // eat up all the excess space so that RoamingIndication
89− // ends up to the far right
90− Layout.fillWidth: true
91− }
92−
93− RoamingIndication {
94− id: roamingIndication
95− visible: menu.roaming
96− Layout.fillHeight: true
97− }
98− }
99−
100− Button {
101− id: buttonUnlock
102− objectName: "buttonUnlockSim"
103− visible: menu.locked
104−
105− text: i18n.tr("Unlock SIM")
106− Layout.preferredWidth: implicitWidth + units.gu(5)
107−
108− onTriggered: menu.unlock()
109− }
110− }
111−}
qml/Panel/Indicators/RoamingIndication.qmldeleted−40
@@ -1,40 +0,0 @@
1−/*
2− * Copyright 2014,2015 Canonical Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU Lesser General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
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 Lesser General Public License for more details.
12− *
13− * You should have received a copy of the GNU Lesser General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.4
18−import QtQuick.Layouts 1.1
19−import Ubuntu.Components 1.3
20−
21−RowLayout {
22− spacing: units.gu(0.5)
23− Label {
24− id: labelRoaming
25− elide: Text.ElideRight
26− fontSize: "x-small"
27− text: i18n.tr("Roaming")
28− opacity: 0.6
29− }
30−
31− Icon {
32− id: iconRoaming
33− color: theme.palette.selected.backgroundText
34−
35− Layout.preferredHeight: parent.height
36− Layout.preferredWidth: Layout.preferredHeight
37−
38− name: "network-cellular-roaming"
39− }
40−}
qml/Panel/IndicatorsMenu.qml+3−2
@@ -38,7 +38,7 @@ Showable {
38 property bool enableHint: true
38 property bool enableHint: true
39 property bool contentEnabled: true
39 property bool contentEnabled: true
40 property bool showOnClick: true
40 property bool showOnClick: true
41− property color panelColor: "#292929"
41+ property color panelColor: theme.palette.normal.background
42
42
43 signal showTapped(point position)
43 signal showTapped(point position)
44
44
@@ -76,6 +76,7 @@ Showable {
76 MenuContent {
76 MenuContent {
77 id: content
77 id: content
78 objectName: "menuContent"
78 objectName: "menuContent"
79+ color: root.panelColor
79
80
80 anchors {
81 anchors {
81 left: parent.left
82 left: parent.left
@@ -110,7 +111,7 @@ Showable {
110 height: units.gu(0.5)
111 height: units.gu(0.5)
111 gradient: Gradient {
112 gradient: Gradient {
112 GradientStop { position: 0.0; color: "transparent" }
113 GradientStop { position: 0.0; color: "transparent" }
113− GradientStop { position: 1.0; color: "#292929" }
114+ GradientStop { position: 1.0; color: root.panelColor }
114 }
115 }
115 opacity: 0.3
116 opacity: 0.3
116 }
117 }
qml/Panel/MenuContent.qml+1−1
@@ -27,7 +27,7 @@ Rectangle {
27
27
28 property QtObject indicatorsModel: null
28 property QtObject indicatorsModel: null
29 property int currentMenuIndex: -1
29 property int currentMenuIndex: -1
30− color: "#292929" // FIXME not in palette yet
30+ color: theme.palette.normal.background
31
31
32 width: units.gu(40)
32 width: units.gu(40)
33 height: units.gu(42)
33 height: units.gu(42)
qml/Panel/Panel.qml+1−1
@@ -89,7 +89,7 @@ Item {
89
89
90 Rectangle {
90 Rectangle {
91 id: indicatorAreaBackground
91 id: indicatorAreaBackground
92− color: callHint.visible ? "green" : "#292929"
92+ color: callHint.visible ? UbuntuColors.green : theme.palette.normal.background
93 anchors {
93 anchors {
94 top: parent.top
94 top: parent.top
95 left: parent.left
95 left: parent.left
tests/qmltests/Panel/tst_Panel.qml+2
@@ -31,6 +31,8 @@ IndicatorTest {
31 height: units.gu(71)
31 height: units.gu(71)
32 color: "white"
32 color: "white"
33
33
34+ Component.onCompleted: theme.name = "Ubuntu.Components.Themes.SuruDark"
35+
34 Binding {
36 Binding {
35 target: mouseEmulation
37 target: mouseEmulation
36 property: "checked"
38 property: "checked"