Merge lp:~osomon/webbrowser-app/toolbar-buttons into lp:webbrowser-app

Proposed by Olivier Tilloy
Status: Merged
Approved by: Günter Schwann
Approved revision: 204
Merged at revision: 205
Proposed branch: lp:~osomon/webbrowser-app/toolbar-buttons
Merge into: lp:webbrowser-app
Diff against target: 157 lines (+15/-72)
4 files modified
src/Ubuntu/Browser/Chrome.qml (+12/-12)
src/Ubuntu/Browser/ChromeButton.qml (+0/-55)
src/Ubuntu/Browser/qmldir (+0/-1)
tests/autopilot/webbrowser_app/emulators/main_window.py (+3/-4)
To merge this branch: bzr merge lp:~osomon/webbrowser-app/toolbar-buttons
Reviewer Review Type Date Requested Status
Günter Schwann (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+172604@code.launchpad.net

Commit message

Use standard toolbar buttons for the chrome.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Günter Schwann (schwann) wrote :

On the desktop at least, the icons are bigger now. And vertical centered. This leads to a slight overlap at least for the "Tabs" button.
But maybe that should be fixed in the UITK

Revision history for this message
Günter Schwann (schwann) wrote :

It was the old version that looked wrong

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Ubuntu/Browser/Chrome.qml'
2--- src/Ubuntu/Browser/Chrome.qml 2013-06-13 15:52:21 +0000
3+++ src/Ubuntu/Browser/Chrome.qml 2013-07-02 15:55:30 +0000
4@@ -47,7 +47,7 @@
5 opacity: 0.95
6 }
7
8- ChromeButton {
9+ ToolbarButton {
10 id: backButton
11 objectName: "backButton"
12 anchors {
13@@ -63,12 +63,12 @@
14 }
15 height: units.gu(5)
16 clip: true
17- icon: "assets/go-previous.png"
18- label: i18n.tr("Back")
19- onClicked: chrome.goBackClicked()
20+ iconSource: "assets/go-previous.png"
21+ text: i18n.tr("Back")
22+ onTriggered: chrome.goBackClicked()
23 }
24
25- ChromeButton {
26+ ToolbarButton {
27 id: forwardButton
28 objectName: "forwardButton"
29 anchors {
30@@ -81,9 +81,9 @@
31 visible: !internal.isNarrow
32 width: visible ? units.gu(5) : 0
33 height: units.gu(5)
34- icon: "assets/go-next.png"
35- label: i18n.tr("Forward")
36- onClicked: chrome.goForwardClicked()
37+ iconSource: "assets/go-next.png"
38+ text: i18n.tr("Forward")
39+ onTriggered: chrome.goForwardClicked()
40 }
41
42 AddressBar {
43@@ -104,7 +104,7 @@
44 onRequestStop: chrome.requestStop()
45 }
46
47- ChromeButton {
48+ ToolbarButton {
49 id: tabsButton
50 objectName: "tabsButton"
51
52@@ -116,10 +116,10 @@
53 width: units.gu(5)
54 height: width
55
56- icon: "assets/browser-tabs.png"
57- label: i18n.tr("Tabs")
58+ iconSource: "assets/browser-tabs.png"
59+ text: i18n.tr("Tabs")
60
61- onClicked: chrome.toggleTabsClicked()
62+ onTriggered: chrome.toggleTabsClicked()
63 }
64
65 EmbeddedProgressBar {
66
67=== removed file 'src/Ubuntu/Browser/ChromeButton.qml'
68--- src/Ubuntu/Browser/ChromeButton.qml 2013-03-28 17:54:13 +0000
69+++ src/Ubuntu/Browser/ChromeButton.qml 1970-01-01 00:00:00 +0000
70@@ -1,55 +0,0 @@
71-/*
72- * Copyright 2013 Canonical Ltd.
73- *
74- * This file is part of webbrowser-app.
75- *
76- * webbrowser-app is free software; you can redistribute it and/or modify
77- * it under the terms of the GNU General Public License as published by
78- * the Free Software Foundation; version 3.
79- *
80- * webbrowser-app is distributed in the hope that it will be useful,
81- * but WITHOUT ANY WARRANTY; without even the implied warranty of
82- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
83- * GNU General Public License for more details.
84- *
85- * You should have received a copy of the GNU General Public License
86- * along with this program. If not, see <http://www.gnu.org/licenses/>.
87- */
88-
89-import QtQuick 2.0
90-import Ubuntu.Components 0.1
91-
92-Item {
93- property alias icon: image.source
94- property alias label: label.text
95- signal clicked()
96-
97- opacity: enabled ? 1.0 : 0.2
98-
99- Image {
100- id: image
101- anchors {
102- top: parent.top
103- left: parent.left
104- right: parent.right
105- margins: units.gu(1)
106- }
107- fillMode: Image.PreserveAspectFit
108- }
109-
110- Label {
111- id: label
112- fontSize: "x-small"
113- horizontalAlignment: Text.AlignHCenter
114- anchors {
115- left: parent.left
116- right: parent.right
117- bottom: parent.bottom
118- }
119- }
120-
121- MouseArea {
122- anchors.fill: parent
123- onClicked: parent.clicked()
124- }
125-}
126
127=== modified file 'src/Ubuntu/Browser/qmldir'
128--- src/Ubuntu/Browser/qmldir 2013-05-23 16:46:51 +0000
129+++ src/Ubuntu/Browser/qmldir 2013-07-02 15:55:30 +0000
130@@ -2,5 +2,4 @@
131 plugin ubuntubrowser
132 AddressBar 0.1 AddressBar.qml
133 Chrome 0.1 Chrome.qml
134-ChromeButton 0.1 ChromeButton.qml
135 UbuntuWebView 0.1 UbuntuWebView.qml
136
137=== modified file 'tests/autopilot/webbrowser_app/emulators/main_window.py'
138--- tests/autopilot/webbrowser_app/emulators/main_window.py 2013-06-05 15:59:45 +0000
139+++ tests/autopilot/webbrowser_app/emulators/main_window.py 2013-07-02 15:55:30 +0000
140@@ -38,14 +38,13 @@
141 objectName="actionButton")
142
143 def get_back_button(self):
144- return self.app.select_single("ChromeButton", objectName="backButton")
145+ return self.app.select_single("ActionItem", objectName="backButton")
146
147 def get_forward_button(self):
148- return self.app.select_single("ChromeButton",
149- objectName="forwardButton")
150+ return self.app.select_single("ActionItem", objectName="forwardButton")
151
152 def get_tabs_button(self):
153- return self.app.select_single("ChromeButton", objectName="tabsButton")
154+ return self.app.select_single("ActionItem", objectName="tabsButton")
155
156 def get_current_webview(self):
157 browser = self.get_browser()

Subscribers

People subscribed via source and target branches

to status/vote changes: