on xenial help sign in
Added custom scope background support
commit6588e34422a264cf346ff912051739654794142a authornfsprodriver <ross.b@freenet.de> dateMon 31 Jul 2017, 03:49 (9 years ago) parent7821dc8
2 files changed+19−8
plugins/Dash/ScopeStyle.qml+7−6 qml/Dash/DashBackground.qml+12−2
plugins/Dash/ScopeStyle.qml+7−6
@@ -17,6 +17,7 @@
1717import QtQuick 2.4
1818import Utils 0.1
1919import Ubuntu.Components 1.3
20+import Ubuntu.Components.Themes 1.3
2021
2122/*! \brief Helper for processing scope customization options.
2223
@@ -30,13 +31,13 @@ QtObject {
3031 property var style: Object()
3132
3233 /// 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"
3435
3536 /// Luminance of the foreground color
3637 readonly property real foregroundLuminance: foreground ? Style.luminance(foreground) : Style.luminance(d.defaultDark)
3738
3839 /// 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"
4041
4142 /// Luminance of the background color
4243 readonly property real backgroundLuminance: background ? Style.luminance(background) : Style.luminance(d.defaultLight)
@@ -58,16 +59,16 @@ QtObject {
5859 readonly property url headerLogo: "logo" in d.headerStyle ? d.headerStyle["logo"] : ""
5960
6061 /// 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"
6263
6364 /// 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"
6566
6667 /// 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"
6869
6970 /// 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"
7172
7273 /// Color of the primary preview button
7374 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 @@
1515 */
1616
1717import QtQuick 2.4
18+import QtQuick.Window 2.2
19+import AccountsService 0.1
20+import ImageCache 0.1
1821
1922Rectangle {
20− color: "white"
21−}
23+ color: "black"
24+
25+ Image {
26+ source: AccountsService.backgroundFile
27+ anchors.fill: parent
28+ fillMode: Image.PreserveAspectCrop
29+ opacity: 0.6
30+ }
31+}