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
=== modified file 'src/Ubuntu/Browser/Chrome.qml'
--- src/Ubuntu/Browser/Chrome.qml 2013-06-13 15:52:21 +0000
+++ src/Ubuntu/Browser/Chrome.qml 2013-07-02 15:55:30 +0000
@@ -47,7 +47,7 @@
47 opacity: 0.9547 opacity: 0.95
48 }48 }
4949
50 ChromeButton {50 ToolbarButton {
51 id: backButton51 id: backButton
52 objectName: "backButton"52 objectName: "backButton"
53 anchors {53 anchors {
@@ -63,12 +63,12 @@
63 }63 }
64 height: units.gu(5)64 height: units.gu(5)
65 clip: true65 clip: true
66 icon: "assets/go-previous.png"66 iconSource: "assets/go-previous.png"
67 label: i18n.tr("Back")67 text: i18n.tr("Back")
68 onClicked: chrome.goBackClicked()68 onTriggered: chrome.goBackClicked()
69 }69 }
7070
71 ChromeButton {71 ToolbarButton {
72 id: forwardButton72 id: forwardButton
73 objectName: "forwardButton"73 objectName: "forwardButton"
74 anchors {74 anchors {
@@ -81,9 +81,9 @@
81 visible: !internal.isNarrow81 visible: !internal.isNarrow
82 width: visible ? units.gu(5) : 082 width: visible ? units.gu(5) : 0
83 height: units.gu(5)83 height: units.gu(5)
84 icon: "assets/go-next.png"84 iconSource: "assets/go-next.png"
85 label: i18n.tr("Forward")85 text: i18n.tr("Forward")
86 onClicked: chrome.goForwardClicked()86 onTriggered: chrome.goForwardClicked()
87 }87 }
8888
89 AddressBar {89 AddressBar {
@@ -104,7 +104,7 @@
104 onRequestStop: chrome.requestStop()104 onRequestStop: chrome.requestStop()
105 }105 }
106106
107 ChromeButton {107 ToolbarButton {
108 id: tabsButton108 id: tabsButton
109 objectName: "tabsButton"109 objectName: "tabsButton"
110110
@@ -116,10 +116,10 @@
116 width: units.gu(5)116 width: units.gu(5)
117 height: width117 height: width
118118
119 icon: "assets/browser-tabs.png"119 iconSource: "assets/browser-tabs.png"
120 label: i18n.tr("Tabs")120 text: i18n.tr("Tabs")
121121
122 onClicked: chrome.toggleTabsClicked()122 onTriggered: chrome.toggleTabsClicked()
123 }123 }
124124
125 EmbeddedProgressBar {125 EmbeddedProgressBar {
126126
=== removed file 'src/Ubuntu/Browser/ChromeButton.qml'
--- src/Ubuntu/Browser/ChromeButton.qml 2013-03-28 17:54:13 +0000
+++ src/Ubuntu/Browser/ChromeButton.qml 1970-01-01 00:00:00 +0000
@@ -1,55 +0,0 @@
1/*
2 * Copyright 2013 Canonical Ltd.
3 *
4 * This file is part of webbrowser-app.
5 *
6 * webbrowser-app is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 3.
9 *
10 * webbrowser-app is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19import QtQuick 2.0
20import Ubuntu.Components 0.1
21
22Item {
23 property alias icon: image.source
24 property alias label: label.text
25 signal clicked()
26
27 opacity: enabled ? 1.0 : 0.2
28
29 Image {
30 id: image
31 anchors {
32 top: parent.top
33 left: parent.left
34 right: parent.right
35 margins: units.gu(1)
36 }
37 fillMode: Image.PreserveAspectFit
38 }
39
40 Label {
41 id: label
42 fontSize: "x-small"
43 horizontalAlignment: Text.AlignHCenter
44 anchors {
45 left: parent.left
46 right: parent.right
47 bottom: parent.bottom
48 }
49 }
50
51 MouseArea {
52 anchors.fill: parent
53 onClicked: parent.clicked()
54 }
55}
560
=== modified file 'src/Ubuntu/Browser/qmldir'
--- src/Ubuntu/Browser/qmldir 2013-05-23 16:46:51 +0000
+++ src/Ubuntu/Browser/qmldir 2013-07-02 15:55:30 +0000
@@ -2,5 +2,4 @@
2plugin ubuntubrowser2plugin ubuntubrowser
3AddressBar 0.1 AddressBar.qml3AddressBar 0.1 AddressBar.qml
4Chrome 0.1 Chrome.qml4Chrome 0.1 Chrome.qml
5ChromeButton 0.1 ChromeButton.qml
6UbuntuWebView 0.1 UbuntuWebView.qml5UbuntuWebView 0.1 UbuntuWebView.qml
76
=== modified file 'tests/autopilot/webbrowser_app/emulators/main_window.py'
--- tests/autopilot/webbrowser_app/emulators/main_window.py 2013-06-05 15:59:45 +0000
+++ tests/autopilot/webbrowser_app/emulators/main_window.py 2013-07-02 15:55:30 +0000
@@ -38,14 +38,13 @@
38 objectName="actionButton")38 objectName="actionButton")
3939
40 def get_back_button(self):40 def get_back_button(self):
41 return self.app.select_single("ChromeButton", objectName="backButton")41 return self.app.select_single("ActionItem", objectName="backButton")
4242
43 def get_forward_button(self):43 def get_forward_button(self):
44 return self.app.select_single("ChromeButton",44 return self.app.select_single("ActionItem", objectName="forwardButton")
45 objectName="forwardButton")
4645
47 def get_tabs_button(self):46 def get_tabs_button(self):
48 return self.app.select_single("ChromeButton", objectName="tabsButton")47 return self.app.select_single("ActionItem", objectName="tabsButton")
4948
50 def get_current_webview(self):49 def get_current_webview(self):
51 browser = self.get_browser()50 browser = self.get_browser()

Subscribers

People subscribed via source and target branches

to status/vote changes: