Merge lp:~dpm/ubuntu-filemanager-app/kill-purple into lp:ubuntu-filemanager-app

Proposed by David Planella
Status: Merged
Approved by: Arto Jalkanen
Approved revision: 315
Merged at revision: 315
Proposed branch: lp:~dpm/ubuntu-filemanager-app/kill-purple
Merge into: lp:ubuntu-filemanager-app
Diff against target: 186 lines (+2/-161)
2 files modified
src/app/qml/components/SuruSheetStyle.qml (+0/-151)
src/app/qml/filemanager.qml (+2/-10)
To merge this branch: bzr merge lp:~dpm/ubuntu-filemanager-app/kill-purple
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Arto Jalkanen Approve
Review via email: mp+239860@code.launchpad.net

Commit message

Work around a toolkit bug that makes purple to be shown in header actions if a gradient is set.

Description of the change

Work around a toolkit bug that makes purple to be shown in header actions if a gradient is set. Removed gradient from the app and removed an unused style file.

To post a comment you must log in.
Revision history for this message
Arto Jalkanen (ajalkane) wrote :

Looks good to me.

review: Approve
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== removed file 'src/app/qml/components/SuruSheetStyle.qml'
--- src/app/qml/components/SuruSheetStyle.qml 2014-09-20 10:49:51 +0000
+++ src/app/qml/components/SuruSheetStyle.qml 1970-01-01 00:00:00 +0000
@@ -1,151 +0,0 @@
1/*
2 * Copyright 2012 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
17import QtQuick 2.3
18import Ubuntu.Components 1.1
19import Ubuntu.Components.ListItems 1.0 as ListItem
20
21Item {
22 id: visuals
23 // styling properties
24 property color backgroundColor: Qt.rgba(0.2,0.2,0.2,0.97)
25 property color headerColor: Qt.rgba(0,0,0,0.2)
26 property real headerHeight: units.gu(6)
27 property real buttonContainerWidth: units.gu(14)
28
29 implicitWidth: MathUtils.clamp(styledItem.contentsWidth, styledItem.minWidth, styledItem.maxWidth)
30 implicitHeight: header.height + containerItem.height
31
32 property alias contentItem: containerItem
33
34 property bool maximized: styledItem.contentsWidth > styledItem.maxWidth
35
36 UbuntuShape {
37 id: background
38 color: backgroundColor
39 visible: !maximized
40 anchors {
41 left: parent.left
42 right: parent.right
43 top: header.top
44 bottom: containerItem.bottom
45 }
46 }
47
48 Rectangle {
49 color: backgroundColor
50 visible: maximized
51 anchors {
52 left: parent.left
53 right: parent.right
54 top: header.top
55 bottom: containerItem.bottom
56 }
57 }
58
59 Item {
60 id: header
61 height: visuals.headerHeight
62 clip: true
63
64 anchors {
65 top: parent.top
66 left: parent.left
67 right: parent.right
68 }
69
70 UbuntuShape {
71 anchors {
72 fill: parent
73 bottomMargin: -units.gu(2)
74 }
75
76 visible: !maximized
77 color: visuals.headerColor
78 }
79
80 Rectangle {
81 anchors {
82 fill: parent
83 }
84
85 visible: maximized
86 color: visuals.headerColor
87 }
88
89 Label {
90 id: headerText
91 anchors {
92 verticalCenter: parent.verticalCenter
93 left: leftButtonContainer.right
94 right: rightButtonContainer.left
95 }
96 width: headerText.implicitWidth + units.gu(4)
97 elide: Text.ElideRight
98 horizontalAlignment: Text.AlignHCenter
99 text: styledItem.title
100 fontSize: "large"
101 color: "#F3F3E7"
102 }
103
104 Item {
105 id: leftButtonContainer
106 anchors {
107 left: parent.left
108 top: parent.top
109 bottom: parent.bottom
110 }
111 width: visuals.buttonContainerWidth
112 Component.onCompleted: header.updateButton(styledItem.leftButton, leftButtonContainer)
113 }
114
115 Item {
116 id: rightButtonContainer
117 anchors {
118 right: parent.right
119 top: parent.top
120 bottom: parent.bottom
121 }
122 width: visuals.buttonContainerWidth
123 Component.onCompleted: header.updateButton(styledItem.rightButton, rightButtonContainer)
124 }
125
126 function updateButton(button, container) {
127 if (!button) return;
128 button.parent = container;
129 button.anchors.left = container.left;
130 button.anchors.right = container.right;
131 button.anchors.verticalCenter = container.verticalCenter;
132 button.anchors.margins = units.gu(1);
133 }
134
135 Connections {
136 target: styledItem
137 onLeftButtonChanged: header.updateButton(styledItem.leftButton, leftButtonContainer)
138 onRightButtonChanged: header.updateButton(styledItem.rightButton, rightButtonContainer)
139 }
140 }
141
142 Item {
143 id: containerItem
144 height: false ? styledItem.maxHeight - header.height : MathUtils.clamp(styledItem.contentsHeight, styledItem.minHeight - header.height, styledItem.maxHeight - header.height)
145 anchors {
146 top: header.bottom
147 left: parent.left
148 right: parent.right
149 }
150 }
151}
1520
=== modified file 'src/app/qml/filemanager.qml'
--- src/app/qml/filemanager.qml 2014-10-24 03:00:16 +0000
+++ src/app/qml/filemanager.qml 2014-10-28 14:31:53 +0000
@@ -27,12 +27,6 @@
2727
28import "ui"28import "ui"
2929
30/*!
31 \brief MainView with Tabs element.
32 First Tab has a single Label and
33 second Tab has a single ToolbarAction.
34*/
35
36MainView {30MainView {
37 id: mainView31 id: mainView
38 // objectName for functional testing purposes (autopilot-qt5)32 // objectName for functional testing purposes (autopilot-qt5)
@@ -58,11 +52,9 @@
5852
59 property bool showSidebar: width >= units.gu(50)53 property bool showSidebar: width >= units.gu(50)
6054
61 property bool showToolbar: width >= units.gu(80)
62
63 headerColor: "#464646"55 headerColor: "#464646"
64 backgroundColor: "#797979"56 backgroundColor: "#464646"
65 footerColor: "#808080"57 footerColor: "#464646"
6658
67 QtObject {59 QtObject {
68 id: fileSelector60 id: fileSelector

Subscribers

People subscribed via source and target branches