on xenial help sign in
Added custom scope background support
6588e34nfsprodriver
plugins/Dash/ScopeStyle.qml+7−6
@@ -17,6 +17,7 @@
17import QtQuick 2.4
17import QtQuick 2.4
18import Utils 0.1
18import Utils 0.1
19import Ubuntu.Components 1.3
19import Ubuntu.Components 1.3
20+import Ubuntu.Components.Themes 1.3
20
21
21/*! \brief Helper for processing scope customization options.
22/*! \brief Helper for processing scope customization options.
22
23
@@ -30,13 +31,13 @@ QtObject {
30 property var style: Object()
31 property var style: Object()
31
32
32 /// Color used for text and symbolic icons
33 /// Color used for text and symbolic icons
33− readonly property color foreground: "foreground-color" in style ? style["foreground-color"] : d.defaultDark
34+ readonly property color foreground: "white"
34
35
35 /// Luminance of the foreground color
36 /// Luminance of the foreground color
36 readonly property real foregroundLuminance: foreground ? Style.luminance(foreground) : Style.luminance(d.defaultDark)
37 readonly property real foregroundLuminance: foreground ? Style.luminance(foreground) : Style.luminance(d.defaultDark)
37
38
38 /// Color used for the overall background
39 /// Color used for the overall background
39− readonly property color background: "background-color" in style ? style["background-color"] : "#00f5f5f5"
40+ readonly property color background: "background-color" in style ? style["background-color"] : "transparent"
40
41
41 /// Luminance of the background color
42 /// Luminance of the background color
42 readonly property real backgroundLuminance: background ? Style.luminance(background) : Style.luminance(d.defaultLight)
43 readonly property real backgroundLuminance: background ? Style.luminance(background) : Style.luminance(d.defaultLight)
@@ -58,16 +59,16 @@ QtObject {
58 readonly property url headerLogo: "logo" in d.headerStyle ? d.headerStyle["logo"] : ""
59 readonly property url headerLogo: "logo" in d.headerStyle ? d.headerStyle["logo"] : ""
59
60
60 /// Background style for the header
61 /// Background style for the header
61− readonly property url headerBackground: "background" in d.headerStyle ? d.headerStyle["background"] : "color:///#ffffff"
62+ readonly property url headerBackground: "background" in d.headerStyle ? d.headerStyle["background"] : "color:///transparent"
62
63
63 /// Foreground color for the header
64 /// Foreground color for the header
64− readonly property color headerForeground: "foreground-color" in d.headerStyle ? d.headerStyle["foreground-color"] : foreground
65+ readonly property color headerForeground: "foreground-color" in d.headerStyle ? d.headerStyle["foreground-color"] : "white"
65
66
66 /// Color of the header divider
67 /// Color of the header divider
67− readonly property color headerDividerColor: "divider-color" in d.headerStyle ? d.headerStyle["divider-color"] : "#e0e0e0"
68+ readonly property color headerDividerColor: "divider-color" in d.headerStyle ? d.headerStyle["divider-color"] : "transparent"
68
69
69 /// Background style for the navigation
70 /// Background style for the navigation
70− readonly property url navigationBackground: "navigation-background" in d.headerStyle ? d.headerStyle["navigation-background"] : "color:///#f5f5f5"
71+ readonly property url navigationBackground: "navigation-background" in d.headerStyle ? d.headerStyle["navigation-background"] : "color:///white"
71
72
72 /// Color of the primary preview button
73 /// Color of the primary preview button
73 readonly property color previewButtonColor: "preview-button-color" in style ? style["preview-button-color"] : theme.palette.normal.positive
74 readonly property color previewButtonColor: "preview-button-color" in style ? style["preview-button-color"] : theme.palette.normal.positive
qml/Dash/DashBackground.qml+12−2
@@ -15,7 +15,17 @@
15 */
15 */
16
16
17import QtQuick 2.4
17import QtQuick 2.4
18+import QtQuick.Window 2.2
19+import AccountsService 0.1
20+import ImageCache 0.1
18
21
19Rectangle {
22Rectangle {
20− color: "white"
23+ color: "black"
24+
25+ Image {
26+ source: AccountsService.backgroundFile
27+ anchors.fill: parent
28+ fillMode: Image.PreserveAspectCrop
29+ opacity: 0.6
30+ }
21−}
31+}