on xenial help sign in
Shell visual update

Approved by: Albert Astals Cid

commita8e9a4acd14aba3576770cb0ec75a430a7231e9a authorLukáš Tinkl <lukas.tinkl@canonical.com> dateWed 27 Apr 2016, 14:57 (10 years ago) parent83d0918dbf1053
18 files changed+69−59
qml/Components/Dialogs.qml−3 qml/Components/PanelState/PanelState.qml+1−1 qml/Components/UbuntuShapeForItem.qml+1 qml/Components/WindowControlButtons.qml+6−6 qml/Launcher/Launcher.qml−1 qml/Launcher/LauncherDelegate.qml+9−11 qml/Launcher/LauncherPanel.qml+25−13 qml/Launcher/graphics/quicklist_tooltip@30.png qml/Panel/Indicators/client/IndicatorsClient.qml+1−1 qml/Panel/Panel.qml+2−2 qml/Stages/DecoratedWindow.qml+1−1 qml/Stages/WindowDecoration.qml+2−2 tests/qmltests/Components/tst_Dialogs.qml+4−2 tests/qmltests/Launcher/tst_Launcher.qml+5−2 tests/qmltests/Stages/ApplicationCheckBox.qml−1 tests/qmltests/Stages/SurfaceManagerControls.qml+6−7 tests/qmltests/Stages/tst_DesktopStage.qml+6−5 tests/qmltests/tst_Shell.qml−1
qml/Components/Dialogs.qml−3
@@ -177,7 +177,6 @@ Item {
177177 onClicked: {
178178 rebootDialog.hide();
179179 }
180− color: UbuntuColors.lightGrey
181180 }
182181 Button {
183182 text: i18n.tr("Yes")
@@ -213,14 +212,12 @@ Item {
213212 unitySessionService.reboot();
214213 powerDialog.hide();
215214 }
216− color: UbuntuColors.lightGrey
217215 }
218216 Button {
219217 text: i18n.tr("Cancel")
220218 onClicked: {
221219 powerDialog.hide();
222220 }
223− color: UbuntuColors.lightGrey
224221 }
225222 }
226223 }
qml/Components/PanelState/PanelState.qml+1−1
@@ -24,7 +24,7 @@ QtObject {
2424 property bool buttonsVisible: false
2525 property bool closeButtonShown: true
2626 property bool dropShadow: false
27− property int panelHeight: units.gu(3)
27+ property int panelHeight: 0
2828
2929 signal close()
3030 signal minimize()
qml/Components/UbuntuShapeForItem.qml+1
@@ -28,6 +28,7 @@ Item {
2828
2929 property alias radius: shape.radius
3030 property alias image: source.sourceItem
31+ property alias aspect: shape.aspect
3132
3233 ShaderEffectSource {
3334 id: source
qml/Components/WindowControlButtons.qml+6−6
@@ -43,7 +43,7 @@ Row {
4343 width: units.gu(2)
4444 height: units.gu(2)
4545 radius: height / 2
46− color: "#ed3146"
46+ color: UbuntuColors.red
4747 visible: parent.containsMouse
4848 }
4949 Icon {
@@ -51,7 +51,7 @@ Row {
5151 height: parent.height *.5
5252 anchors.centerIn: parent
5353 source: "graphics/window-close.svg"
54− color: root.active ? "white" : "#5d5d5d"
54+ color: root.active ? "white" : UbuntuColors.slate
5555 keyColor: "black"
5656 }
5757 }
@@ -69,7 +69,7 @@ Row {
6969 width: units.gu(2)
7070 height: units.gu(2)
7171 radius: height / 2
72− color: "#888888"
72+ color: root.active ? UbuntuColors.graphite : UbuntuColors.ash
7373 visible: parent.containsMouse
7474 }
7575 Icon {
@@ -77,7 +77,7 @@ Row {
7777 height: parent.height *.5
7878 anchors.centerIn: parent
7979 source: "graphics/window-minimize.svg"
80− color: root.active ? "white" : "#5d5d5d"
80+ color: root.active ? "white" : UbuntuColors.slate
8181 keyColor: "black"
8282 }
8383 }
@@ -95,7 +95,7 @@ Row {
9595 width: units.gu(2)
9696 height: units.gu(2)
9797 radius: height / 2
98− color: "#888888"
98+ color: root.active ? UbuntuColors.graphite : UbuntuColors.ash
9999 visible: parent.containsMouse
100100 }
101101 Icon {
@@ -103,7 +103,7 @@ Row {
103103 height: parent.height *.5
104104 anchors.centerIn: parent
105105 source: "graphics/window-maximize.svg"
106− color: root.active ? "white" : "#5d5d5d"
106+ color: root.active ? "white" : UbuntuColors.slate
107107 keyColor: "black"
108108 }
109109 }
qml/Launcher/Launcher.qml−1
@@ -19,7 +19,6 @@ import "../Components"
1919import Ubuntu.Components 1.3
2020import Ubuntu.Gestures 0.1
2121import Unity.Launcher 0.1
22−import GlobalShortcut 1.0
2322
2423FocusScope {
2524 id: root
qml/Launcher/LauncherDelegate.qml+9−11
@@ -164,7 +164,7 @@ Item {
164164 }
165165 width: Math.min(root.itemWidth, Math.max(units.gu(2), countLabel.implicitWidth + units.gu(1)))
166166 height: units.gu(2)
167− backgroundColor: UbuntuColors.orange
167+ backgroundColor: UbuntuColors.green
168168 visible: root.countVisible
169169 aspect: UbuntuShape.Flat
170170
@@ -173,9 +173,6 @@ Item {
173173 objectName: "countLabel"
174174 text: root.count
175175 anchors.centerIn: parent
176− // FIXME: verticalCenter seems to be off wee bit and QML doesn't have a centerLine
177− // property for Text: https://bugreports.qt-project.org/browse/QTBUG-40479
178− anchors.verticalCenterOffset: -units.dp(.5)
179176 width: root.itemWidth - units.gu(1)
180177 horizontalAlignment: Text.AlignHCenter
181178 elide: Text.ElideRight
@@ -190,9 +187,9 @@ Item {
190187
191188 anchors.centerIn: parent
192189 width: root.itemWidth * .8
193− height: units.gu(1)
190+ height: units.dp(3)
194191 visible: root.progress > -1
195− backgroundColor: UbuntuColors.darkGrey
192+ backgroundColor: "white"
196193 borderSource: "none"
197194
198195 Item {
@@ -210,7 +207,7 @@ Item {
210207 top: parent.top
211208 bottom: parent.bottom
212209 }
213− backgroundColor: "white"
210+ backgroundColor: UbuntuColors.blue
214211 borderSource: "none"
215212 width: progressOverlay.width
216213 }
@@ -247,18 +244,19 @@ Item {
247244 visible: root.itemFocused
248245 }
249246
250− Rectangle {
247+ UbuntuShape {
251248 objectName: "shortcutHint"
252249 anchors.centerIn: parent
253− width: units.gu(3)
250+ width: units.gu(2.5)
254251 height: width
255− color: "#E0292929"
252+ backgroundColor: "#F2111111"
256253 visible: root.shortcutHintShown
254+ aspect: UbuntuShape.Flat
257255 Label {
258256 anchors.centerIn: parent
259257 text: (itemIndex + 1) % 10
260258 color: "white"
261− font.weight: Font.DemiBold
259+ font.weight: Font.Light
262260 }
263261 }
264262 }
qml/Launcher/LauncherPanel.qml+25−13
@@ -16,16 +16,14 @@
1616
1717import QtQuick 2.4
1818import Ubuntu.Components 1.3
19−import Ubuntu.Components.ListItems 1.3 as ListItems
2019import Unity.Launcher 0.1
2120import Ubuntu.Components.Popups 1.3
22−import GlobalShortcut 1.0
2321import "../Components/ListItems"
2422import "../Components/"
2523
2624Rectangle {
2725 id: root
28− color: "#E0292929"
26+ color: "#F2111111"
2927
3028 rotation: inverted ? 180 : 0
3129
@@ -634,9 +632,10 @@ Rectangle {
634632 id: quickListShape
635633 objectName: "quickListShape"
636634 anchors.fill: quickList
637− opacity: quickList.state === "open" ? 0.8 : 0
635+ opacity: quickList.state === "open" ? 0.95 : 0
638636 visible: opacity > 0
639637 rotation: root.rotation
638+ aspect: UbuntuShape.Flat
640639
641640 Behavior on opacity {
642641 UbuntuNumberAnimation {}
@@ -697,7 +696,7 @@ Rectangle {
697696 Rectangle {
698697 id: quickList
699698 objectName: "quickList"
700− color: "#f5f5f5"
699+ color: theme.palette.normal.background
701700 // Because we're setting left/right anchors depending on orientation, it will break the
702701 // width setting after rotating twice. This makes sure we also re-apply width on rotation
703702 width: root.inverted ? units.gu(30) : units.gu(30)
@@ -768,14 +767,10 @@ Rectangle {
768767 quickList.state = "open";
769768 }
770769
771− StyledItem {
770+ Item {
772771 width: parent.width
773772 height: quickListColumn.height
774773
775− theme: ThemeSettings {
776− name: "Ubuntu.Components.Themes.Ambiance"
777− }
778−
779774 Column {
780775 id: quickListColumn
781776 width: parent.width
@@ -785,11 +780,28 @@ Rectangle {
785780 id: popoverRepeater
786781 model: quickList.model
787782
788− ListItems.Standard {
783+ ListItem {
789784 objectName: "quickListEntry" + index
790− text: (model.clickable ? "" : "<b>") + model.label + (model.clickable ? "" : "</b>")
791− highlightWhenPressed: model.clickable
792785 selected: index === quickList.selectedIndex
786+ height: label.implicitHeight + label.anchors.topMargin + label.anchors.bottomMargin
787+ color: model.clickable ? (selected ? theme.palette.highlighted.background : "transparent") : theme.palette.disabled.background
788+ highlightColor: !model.clickable ? quickList.color : undefined // make disabled items visually unclickable
789+ divider.colorFrom: UbuntuColors.inkstone
790+ divider.colorTo: UbuntuColors.inkstone
791+
792+ Label {
793+ id: label
794+ anchors.fill: parent
795+ anchors.leftMargin: units.gu(3) // 2 GU for checkmark, 3 GU total
796+ anchors.rightMargin: units.gu(2)
797+ anchors.topMargin: units.gu(2)
798+ anchors.bottomMargin: units.gu(2)
799+ verticalAlignment: Label.AlignVCenter
800+ text: model.label
801+ fontSize: index == 0 ? "medium" : "small"
802+ font.weight: index == 0 ? Font.Medium : Font.Light
803+ color: model.clickable ? theme.palette.normal.backgroundText : theme.palette.disabled.backgroundText
804+ }
793805
794806 onClicked: {
795807 if (!model.clickable) {
qml/Launcher/graphics/quicklist_tooltip@30.png

Binary file not shown.

qml/Panel/Indicators/client/IndicatorsClient.qml+1−1
@@ -22,7 +22,7 @@ import Ubuntu.Components 1.3
2222import Ubuntu.Components.ListItems 1.3 as ListItem
2323
2424Rectangle {
25− color: "#292929"
25+ color: theme.palette.normal.background
2626 id: root
2727
2828 Component.onCompleted: {
qml/Panel/Panel.qml+2−2
@@ -177,12 +177,12 @@ Item {
177177 topMargin: units.gu(0.5)
178178 bottomMargin: units.gu(0.5)
179179 }
180− color: PanelState.buttonsVisible ? "#ffffff" : "#5d5d5d"
180+ color: "white"
181181 height: indicators.minimizedPanelHeight - anchors.topMargin - anchors.bottomMargin
182182 visible: !windowControlButtons.visible && !root.locked && !callHint.visible
183183 verticalAlignment: Text.AlignVCenter
184184 fontSize: "medium"
185− font.weight: Font.Normal
185+ font.weight: PanelState.buttonsVisible ? Font.Light : Font.Medium
186186 text: PanelState.title
187187 elide: Text.ElideRight
188188 maximumLineCount: 1
qml/Stages/DecoratedWindow.qml+1−1
@@ -73,7 +73,7 @@ FocusScope {
7373 }
7474 source: "graphics/dropshadow2gu.sci"
7575 opacity: root.shadowOpacity * .3
76− enabled: !fullscreen
76+ visible: !fullscreen
7777 }
7878
7979 WindowDecoration {
qml/Stages/WindowDecoration.qml+2−2
@@ -93,12 +93,12 @@ MouseArea {
9393 Label {
9494 id: titleLabel
9595 objectName: "windowDecorationTitle"
96− color: root.active ? "white" : "#5d5d5d"
96+ color: root.active ? "white" : UbuntuColors.slate
9797 height: parent.height
9898 width: parent.width - buttons.width - parent.anchors.rightMargin - parent.anchors.leftMargin
9999 verticalAlignment: Text.AlignVCenter
100100 fontSize: "medium"
101− font.weight: root.active ? Font.Light : Font.Normal
101+ font.weight: root.active ? Font.Light : Font.Medium
102102 elide: Text.ElideRight
103103 }
104104 }
tests/qmltests/Components/tst_Dialogs.qml+4−2
@@ -1,5 +1,5 @@
11/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2014-2016 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
@@ -27,6 +27,8 @@ Rectangle {
2727 width: units.gu(70)
2828 height: fakeShell.longestDimension
2929
30+ Component.onCompleted: theme.name = "Ubuntu.Components.Themes.SuruDark" // use the same theme as the real shell
31+
3032 QtObject {
3133 id: fakeUnitySession
3234 signal logoutRequested
@@ -69,7 +71,7 @@ Rectangle {
6971 }
7072
7173 Rectangle {
72− color: "white"
74+ color: theme.palette.normal.background
7375 x: fakeShell.shortestDimension
7476 width: root.width - x
7577 anchors {
tests/qmltests/Launcher/tst_Launcher.qml+5−2
@@ -26,10 +26,13 @@ import Utils 0.1 // For EdgeBarrierSettings
2626
2727/* Nothing is shown at first. If you drag from left edge you will bring up the
2828 launcher. */
29−Item {
29+Rectangle {
3030 id: root
3131 width: units.gu(140)
3232 height: units.gu(70)
33+ color: UbuntuColors.graphite // something neither white nor black
34+
35+ Component.onCompleted: theme.name = "Ubuntu.Components.Themes.SuruDark"
3336
3437 Loader {
3538 id: launcherLoader
@@ -868,7 +871,7 @@ Item {
868871
869872 // Doing longpress
870873 mousePress(draggedItem);
871− tryCompare(quickListShape, "opacity", 0.8);
874+ tryCompare(quickListShape, "opacity", 0.95);
872875 mouseRelease(draggedItem);
873876
874877 verify(quickList.y >= units.gu(1));
tests/qmltests/Stages/ApplicationCheckBox.qml−1
@@ -96,7 +96,6 @@ Column {
9696 Label {
9797 id: appIdLabel
9898 text: root.appId
99− color: "white"
10099 anchors.verticalCenter: parent.verticalCenter
101100 }
102101 Rectangle {
tests/qmltests/Stages/SurfaceManagerControls.qml+6−7
@@ -20,14 +20,13 @@ import Unity.Application 0.1
2020
2121Column {
2222 id: root
23− property color textColor: "black"
2423
2524 Label {text: "Size hints for new surface:"; color: root.textColor; font.bold: true}
2625
27− SurfaceManagerField { text: "min width"; propertyName: "newSurfaceMinimumWidth"; textColor: root.textColor }
28− SurfaceManagerField { text: "max width"; propertyName: "newSurfaceMaximumWidth"; textColor: root.textColor }
29− SurfaceManagerField { text: "min height"; propertyName: "newSurfaceMinimumHeight"; textColor: root.textColor }
30− SurfaceManagerField { text: "max height"; propertyName: "newSurfaceMaximumHeight"; textColor: root.textColor }
31− SurfaceManagerField { text: "width increment"; propertyName: "newSurfaceWidthIncrement"; textColor: root.textColor }
32− SurfaceManagerField { text: "height increment"; propertyName: "newSurfaceHeightIncrement"; textColor: root.textColor }
26+ SurfaceManagerField { text: "min width"; propertyName: "newSurfaceMinimumWidth"; }
27+ SurfaceManagerField { text: "max width"; propertyName: "newSurfaceMaximumWidth"; }
28+ SurfaceManagerField { text: "min height"; propertyName: "newSurfaceMinimumHeight"; }
29+ SurfaceManagerField { text: "max height"; propertyName: "newSurfaceMaximumHeight"; }
30+ SurfaceManagerField { text: "width increment"; propertyName: "newSurfaceWidthIncrement"; }
31+ SurfaceManagerField { text: "height increment"; propertyName: "newSurfaceHeightIncrement"; }
3332}
tests/qmltests/Stages/tst_DesktopStage.qml+6−5
@@ -41,7 +41,10 @@ Item {
4141 value: false
4242 }
4343
44− Component.onCompleted: resetGeometry()
44+ Component.onCompleted: {
45+ theme.name = "Ubuntu.Components.Themes.SuruDark";
46+ resetGeometry();
47+ }
4548
4649 function resetGeometry() {
4750 // ensures apps which are tested decorations are in view.
@@ -71,7 +74,6 @@ Item {
7174 property bool itemDestroyed: false
7275 sourceComponent: Component {
7376 DesktopStage {
74− color: "white"
7577 anchors.fill: parent
7678 background: "../../../qml/graphics/tablet_background.jpg"
7779 focus: true
@@ -91,8 +93,8 @@ Item {
9193
9294 Rectangle {
9395 id: controls
94− color: "darkgrey"
9596 width: units.gu(30)
97+ color: theme.palette.normal.background
9698 anchors {
9799 top: parent.top
98100 bottom: parent.bottom
@@ -107,7 +109,6 @@ Item {
107109 spacing: units.gu(1)
108110
109111 Button {
110− color: "white"
111112 text: "Make surface slow to resize"
112113 activeFocusOnPress: false
113114 onClicked: {
@@ -134,7 +135,7 @@ Item {
134135 }
135136 }
136137
137− SurfaceManagerControls { textColor: "white" }
138+ SurfaceManagerControls { }
138139 }
139140 }
140141 }
tests/qmltests/tst_Shell.qml−1
@@ -226,7 +226,6 @@ Rectangle {
226226 MouseTouchEmulationCheckbox {
227227 id: mouseEmulation
228228 checked: true
229− color: "white"
230229 }
231230 ListItem.ItemSelector {
232231 id: ctrlModifier