on xenial help sign in
Add custom bfb icon in /custom/graphics
a6e10ddDalton Durst
qml/Components/WallpaperResolver.qml → qml/Components/ImageResolver.qmlrenamed

The content is the same.

qml/Launcher/LauncherPanel.qml+14−3
@@ -90,16 +90,27 @@ Rectangle {
90 color: UbuntuColors.orange
90 color: UbuntuColors.orange
91 readonly property bool highlighted: root.highlightIndex == -1;
91 readonly property bool highlighted: root.highlightIndex == -1;
92
92
93− Icon {
93+ Image {
94 objectName: "dashItem"
94 objectName: "dashItem"
95 width: parent.width * .6
95 width: parent.width * .6
96 height: width
96 height: width
97 anchors.centerIn: parent
97 anchors.centerIn: parent
98− source: "graphics/home.svg"
98+ source: homeIconResolver.background
99− color: "white"
100 rotation: root.rotation
99 rotation: root.rotation
101 }
100 }
102
101
102+ ImageResolver {
103+ id: homeIconResolver
104+ objectName: "homeIconResolver"
105+
106+ readonly property url defaultHomeIcon: "graphics/home.svg"
107+
108+ candidates: [
109+ "file:///custom/graphics/homebutton.svg",
110+ defaultHomeIcon
111+ ]
112+ }
113+
103 AbstractButton {
114 AbstractButton {
104 id: dashItem
115 id: dashItem
105 anchors.fill: parent
116 anchors.fill: parent
qml/Shell.qml+1−1
@@ -157,7 +157,7 @@ StyledItem {
157
157
158 property real edgeSize: units.gu(settings.edgeDragWidth)
158 property real edgeSize: units.gu(settings.edgeDragWidth)
159
159
160− WallpaperResolver {
160+ ImageResolver {
161 id: wallpaperResolver
161 id: wallpaperResolver
162 objectName: "wallpaperResolver"
162 objectName: "wallpaperResolver"
163
163
tests/qmltests/CMakeLists.txt+1−1
@@ -24,7 +24,7 @@ add_unity8_qmltest(Components ResponsiveGridView)
24add_unity8_qmltest(Components SharingPicker)
24add_unity8_qmltest(Components SharingPicker)
25add_unity8_qmltest(Components Showable)
25add_unity8_qmltest(Components Showable)
26add_unity8_qmltest(Components VirtualTouchPad)
26add_unity8_qmltest(Components VirtualTouchPad)
27−add_unity8_qmltest(Components WallpaperResolver)
27+add_unity8_qmltest(Components ImageResolver)
28add_unity8_qmltest(Components ZoomableImage)
28add_unity8_qmltest(Components ZoomableImage)
29add_unity8_qmltest(Greeter Clock)
29add_unity8_qmltest(Greeter Clock)
30add_unity8_qmltest(Greeter Greeter)
30add_unity8_qmltest(Greeter Greeter)
tests/qmltests/Components/tst_WallpaperResolver.qml → tests/qmltests/Components/tst_ImageResolver.qmlrenamed+6−6
@@ -26,15 +26,15 @@ Image {
26 width: units.gu(70)
26 width: units.gu(70)
27 height: units.gu(70)
27 height: units.gu(70)
28
28
29− source: wallpaperResolver.background
29+ source: imageResolver.background
30
30
31− WallpaperResolver {
31+ ImageResolver {
32− id: wallpaperResolver
32+ id: imageResolver
33 }
33 }
34
34
35 UnityTestCase {
35 UnityTestCase {
36 id: testCase
36 id: testCase
37− name: "WallpaperResolver"
37+ name: "ImageResolver"
38 when: windowShown
38 when: windowShown
39
39
40 function test_background_data() {
40 function test_background_data() {
@@ -68,8 +68,8 @@ Image {
68 }
68 }
69
69
70 function test_background(data) {
70 function test_background(data) {
71− wallpaperResolver.candidates = data.list;
71+ imageResolver.candidates = data.list;
72− tryCompare(wallpaperResolver, "background", data.output);
72+ tryCompare(imageResolver, "background", data.output);
73 }
73 }
74 }
74 }
75}
75}