From f14dabea4751a696d66e7aa73981c40c7f424a1b Mon Sep 17 00:00:00 2001 From: Jon Kuperman Date: Tue, 18 Oct 2016 01:48:12 -0700 Subject: [PATCH 1/2] convert toolbar icons to svg --- img/toolbar/home_btn.svg | 2 +- img/toolbar/verified_green_icon.svg | 1 + js/about/preferences.js | 5 +- js/components/longPressButton.js | 4 +- js/components/main.js | 46 ++++++---- js/components/navigationBar.js | 46 +++++----- js/components/tabsToolbar.js | 4 +- js/contextMenus.js | 10 ++- less/about/preferences.less | 15 ++-- less/button.less | 27 ++++-- less/navigationBar.less | 127 ++++++++++++++++++++++------ test/lib/selectors.js | 4 +- 12 files changed, 193 insertions(+), 98 deletions(-) create mode 100644 img/toolbar/verified_green_icon.svg diff --git a/img/toolbar/home_btn.svg b/img/toolbar/home_btn.svg index 26a56e679d6..6dd31081229 100644 --- a/img/toolbar/home_btn.svg +++ b/img/toolbar/home_btn.svg @@ -1 +1 @@ -home_btn \ No newline at end of file +home_btn2 \ No newline at end of file diff --git a/img/toolbar/verified_green_icon.svg b/img/toolbar/verified_green_icon.svg new file mode 100644 index 00000000000..7ef9da025e1 --- /dev/null +++ b/img/toolbar/verified_green_icon.svg @@ -0,0 +1 @@ +verified_green_icon \ No newline at end of file diff --git a/js/about/preferences.js b/js/about/preferences.js index 5a6794d1b6d..070c3c2c760 100644 --- a/js/about/preferences.js +++ b/js/about/preferences.js @@ -217,10 +217,7 @@ class LedgerTable extends ImmutableComponent { } getVerifiedIcon (synopsis) { - return - - - + return } enabledForSite (synopsis) { diff --git a/js/components/longPressButton.js b/js/components/longPressButton.js index 47eaefb64ff..2de74c58a13 100644 --- a/js/components/longPressButton.js +++ b/js/components/longPressButton.js @@ -21,12 +21,12 @@ class LongPressButton extends ImmutableComponent { } const self = this - const rect = e.target.getBoundingClientRect() + const target = e.target const LONG_PRESS_MILLISECONDS = 300 this.longPressTimer = setTimeout(function () { self.isLocked = true - self.props.onLongPress(rect) + self.props.onLongPress(target) }, LONG_PRESS_MILLISECONDS) } diff --git a/js/components/main.js b/js/components/main.js index 4b152d9d0f7..5fdcb1eaeb3 100644 --- a/js/components/main.js +++ b/js/components/main.js @@ -579,12 +579,12 @@ class Main extends ImmutableComponent { this.onNav(e, 'canGoForward', 'forward', this.activeFrame.goForward) } - onBackLongPress (rect) { - contextMenus.onBackButtonHistoryMenu(this.activeFrame, this.activeFrame.getHistory(this.props.appState), rect) + onBackLongPress (target) { + contextMenus.onBackButtonHistoryMenu(this.activeFrame, this.activeFrame.getHistory(this.props.appState), target) } - onForwardLongPress (rect) { - contextMenus.onForwardButtonHistoryMenu(this.activeFrame, this.activeFrame.getHistory(this.props.appState), rect) + onForwardLongPress (target) { + contextMenus.onForwardButtonHistoryMenu(this.activeFrame, this.activeFrame.getHistory(this.props.appState), target) } onBraveMenu () { @@ -910,20 +910,30 @@ class Main extends ImmutableComponent { onDragOver={this.onDragOver} onDrop={this.onDrop}>
- - +
+ +
+
+ +
{ this.navBar = node }} diff --git a/js/components/navigationBar.js b/js/components/navigationBar.js index 3ca34bbed68..cd559efa2e1 100644 --- a/js/components/navigationBar.js +++ b/js/components/navigationBar.js @@ -131,34 +131,38 @@ class NavigationBar extends ImmutableComponent { this.titleMode ? null : this.loading - ?