on xenial help sign in
Fixed coloring in panel
commit61d34b809b143339bfdc1517344dd72a259ac303 authorNick Dedekind <nick.dedekind@canonical.com> dateFri 4 Mar 2016, 21:48 (11 years ago) parent64c6d13
9 files changed+15−163
qml/Panel/Handle.qml+2−2 qml/Panel/IndicatorItem.qml+3−3 qml/Panel/Indicators/MenuItemFactory.qml+3−3 qml/Panel/Indicators/ModemInfoItem.qml−111 qml/Panel/Indicators/RoamingIndication.qml−40 qml/Panel/IndicatorsMenu.qml+3−2 qml/Panel/MenuContent.qml+1−1 qml/Panel/Panel.qml+1−1 tests/qmltests/Panel/tst_Panel.qml+2
qml/Panel/Handle.qml+2−2
@@ -19,7 +19,7 @@ import Ubuntu.Components 1.3
1919
2020Rectangle {
2121 id: handle
22− color: "#5d5d5d"
22+ color: UbuntuColors.slate
2323 height: units.gu(2)
2424 property bool active: false
2525
@@ -35,7 +35,7 @@ Rectangle {
3535 id: dot
3636 width: units.dp(3)
3737 height: width
38− color: handle.active ? UbuntuColors.orange : "#888888"
38+ color: handle.active ? UbuntuColors.orange : UbuntuColors.ash
3939 radius: units.dp(1)
4040 }
4141 }
qml/Panel/IndicatorItem.qml+3−3
@@ -32,9 +32,9 @@ IndicatorDelegate {
3232 property bool selected: false
3333 property real iconHeight: units.gu(2)
3434 readonly property color color: {
35− if (!expanded) return "#ffffff";
36− if (!selected) return "#888888";
37− return "#ffffff";
35+ if (!expanded) return theme.palette.normal.backgroundText;
36+ if (!selected) return theme.palette.inactive.backgroundText;
37+ return theme.palette.normal.backgroundText;
3838 }
3939
4040 implicitWidth: mainItems.width
qml/Panel/Indicators/MenuItemFactory.qml+3−3
@@ -261,7 +261,7 @@ Item {
261261 name: "settings"
262262 height: units.gu(3)
263263 width: height
264− color: theme.palette.selected.backgroundText
264+ color: theme.palette.normal.backgroundText
265265 }
266266 }
267267 }
@@ -293,7 +293,7 @@ Item {
293293 source: menuData.icon
294294 height: units.gu(3)
295295 width: height
296− color: theme.palette.selected.backgroundText
296+ color: theme.palette.normal.backgroundText
297297 }
298298 }
299299 }
@@ -620,7 +620,7 @@ Item {
620620
621621 Component {
622622 id: modeminfoitem;
623− ModemInfoItem {
623+ Menus.ModemInfoItem {
624624 objectName: "modemInfoItem"
625625 property QtObject menuData: null
626626 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 {
3838 property bool enableHint: true
3939 property bool contentEnabled: true
4040 property bool showOnClick: true
41− property color panelColor: "#292929"
41+ property color panelColor: theme.palette.normal.background
4242
4343 signal showTapped(point position)
4444
@@ -76,6 +76,7 @@ Showable {
7676 MenuContent {
7777 id: content
7878 objectName: "menuContent"
79+ color: root.panelColor
7980
8081 anchors {
8182 left: parent.left
@@ -110,7 +111,7 @@ Showable {
110111 height: units.gu(0.5)
111112 gradient: Gradient {
112113 GradientStop { position: 0.0; color: "transparent" }
113− GradientStop { position: 1.0; color: "#292929" }
114+ GradientStop { position: 1.0; color: root.panelColor }
114115 }
115116 opacity: 0.3
116117 }
qml/Panel/MenuContent.qml+1−1
@@ -27,7 +27,7 @@ Rectangle {
2727
2828 property QtObject indicatorsModel: null
2929 property int currentMenuIndex: -1
30− color: "#292929" // FIXME not in palette yet
30+ color: theme.palette.normal.background
3131
3232 width: units.gu(40)
3333 height: units.gu(42)
qml/Panel/Panel.qml+1−1
@@ -89,7 +89,7 @@ Item {
8989
9090 Rectangle {
9191 id: indicatorAreaBackground
92− color: callHint.visible ? "green" : "#292929"
92+ color: callHint.visible ? UbuntuColors.green : theme.palette.normal.background
9393 anchors {
9494 top: parent.top
9595 left: parent.left
tests/qmltests/Panel/tst_Panel.qml+2
@@ -31,6 +31,8 @@ IndicatorTest {
3131 height: units.gu(71)
3232 color: "white"
3333
34+ Component.onCompleted: theme.name = "Ubuntu.Components.Themes.SuruDark"
35+
3436 Binding {
3537 target: mouseEmulation
3638 property: "checked"