Skip to content
This repository was archived by the owner on Dec 11, 2019. It is now read-only.

Commit 8152c32

Browse files
committed
convert toolbar icons to svg
1 parent 42146a3 commit 8152c32

11 files changed

+177
-89
lines changed

img/toolbar/home_btn.svg

+1-1
Loading

img/toolbar/verified_green_icon.svg

+1
Loading

js/about/preferences.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,7 @@ class LedgerTable extends ImmutableComponent {
217217
}
218218

219219
getVerifiedIcon (synopsis) {
220-
return <span className='verified fa-stack'>
221-
<i className='fa fa-circle fa-stack-2x' />
222-
<i className='fa fa-check fa-stack-1x' />
223-
</span>
220+
return <span className='verified' />
224221
}
225222

226223
enabledForSite (synopsis) {

js/components/main.js

+24-14
Original file line numberDiff line numberDiff line change
@@ -910,20 +910,30 @@ class Main extends ImmutableComponent {
910910
onDragOver={this.onDragOver}
911911
onDrop={this.onDrop}>
912912
<div className='backforward'>
913-
<LongPressButton
914-
l10nId='backButton'
915-
className='back fa fa-angle-left'
916-
disabled={!activeFrame || !activeFrame.get('canGoBack')}
917-
onClick={this.onBack}
918-
onLongPress={this.onBackLongPress}
919-
/>
920-
<LongPressButton
921-
l10nId='forwardButton'
922-
className='forward fa fa-angle-right'
923-
disabled={!activeFrame || !activeFrame.get('canGoForward')}
924-
onClick={this.onForward}
925-
onLongPress={this.onForwardLongPress}
926-
/>
913+
<div className={cx({
914+
navigationButtonContainer: true,
915+
disabled: !activeFrame || !activeFrame.get('canGoBack')
916+
})}>
917+
<LongPressButton
918+
l10nId='backButton'
919+
className='navigationButton backButton'
920+
disabled={!activeFrame || !activeFrame.get('canGoBack')}
921+
onClick={this.onBack}
922+
onLongPress={this.onBackLongPress}
923+
/>
924+
</div>
925+
<div className={cx({
926+
navigationButtonContainer: true,
927+
disabled: !activeFrame || !activeFrame.get('canGoForward')
928+
})}>
929+
<LongPressButton
930+
l10nId='forwardButton'
931+
className='navigationButton forwardButton'
932+
disabled={!activeFrame || !activeFrame.get('canGoForward')}
933+
onClick={this.onForward}
934+
onLongPress={this.onForwardLongPress}
935+
/>
936+
</div>
927937
</div>
928938
<NavigationBar
929939
ref={(node) => { this.navBar = node }}

js/components/navigationBar.js

+25-21
Original file line numberDiff line numberDiff line change
@@ -131,34 +131,38 @@ class NavigationBar extends ImmutableComponent {
131131
this.titleMode
132132
? null
133133
: this.loading
134-
? <Button iconClass='fa-times'
135-
l10nId='stopButton'
136-
className='navbutton stop-button'
137-
onClick={this.onStop} />
138-
: <Button iconClass='fa-repeat'
139-
l10nId='reloadButton'
140-
className='navbutton reload-button'
141-
onClick={this.onReload} />
134+
? <span className='navigationButtonContainer'>
135+
<span data-l10n-id='stopButton'
136+
className='navigationButton stopButton'
137+
onClick={this.onStop} />
138+
</span>
139+
: <span className='navigationButtonContainer'>
140+
<span data-l10n-id='reloadButton'
141+
className='navigationButton reloadButton'
142+
onClick={this.onReload} />
143+
</span>
142144
}
143145
{
144146
!this.titleMode && getSetting(settings.SHOW_HOME_BUTTON)
145-
? <Button iconClass='fa-home'
146-
l10nId='homeButton'
147-
className='navbutton homeButton'
148-
onClick={this.onHome} />
147+
? <span className='navigationButtonContainer'>
148+
<span data-l10n-id='homeButton'
149+
className='navigationButton homeButton'
150+
onClick={this.onHome} />
151+
</span>
149152
: null
150153
}
151154
{
152155
!this.titleMode
153-
? <Button iconClass={this.bookmarked ? 'fa-star' : 'fa-star-o'}
154-
className={cx({
155-
navbutton: true,
156-
bookmarkButton: true,
157-
removeBookmarkButton: this.bookmarked,
158-
withHomeButton: getSetting(settings.SHOW_HOME_BUTTON)
159-
})}
160-
l10nId={this.bookmarked ? 'removeBookmarkButton' : 'addBookmarkButton'}
161-
onClick={this.onToggleBookmark} />
156+
? <span className='bookmarkButtonContainer'>
157+
<span data-l10n-id={this.bookmarked ? 'removeBookmarkButton' : 'addBookmarkButton'}
158+
className={cx({
159+
navigationButton: true,
160+
bookmarkButton: true,
161+
removeBookmarkButton: this.bookmarked,
162+
withHomeButton: getSetting(settings.SHOW_HOME_BUTTON)
163+
})}
164+
onClick={this.onToggleBookmark} />
165+
</span>
162166
: null
163167
}
164168
</div>

js/components/tabsToolbar.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,14 @@
55
const React = require('react')
66
const ImmutableComponent = require('./immutableComponent')
77
const Tabs = require('./tabs')
8-
const Button = require('./button')
98
const PinnedTabs = require('./pinnedTabs')
109
const contextMenus = require('../contextMenus')
1110
const windowStore = require('../stores/windowStore')
1211

1312
class TabsToolbarButtons extends ImmutableComponent {
1413
render () {
1514
return <div className='tabsToolbarButtons'>
16-
<Button iconClass='fa-bars'
17-
l10nId='menuButton'
15+
<span data-l10n-id='menuButton'
1816
className='navbutton menuButton'
1917
onClick={this.props.onMenu} />
2018
</div>

js/contextMenus.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1196,7 +1196,7 @@ function mainTemplateInit (nodeProps, frame) {
11961196

11971197
function onHamburgerMenu (location, e) {
11981198
const menuTemplate = hamburgerTemplateInit(location, e)
1199-
const rect = e.target.getBoundingClientRect()
1199+
const rect = e.target.parentNode.getBoundingClientRect()
12001200
windowActions.setContextMenuDetail(Immutable.fromJS({
12011201
right: 0,
12021202
top: rect.bottom + 2,

less/about/preferences.less

+5-10
Original file line numberDiff line numberDiff line change
@@ -788,17 +788,12 @@ div.nextPaymentSubmission {
788788
}
789789

790790
.verified{
791-
left: -10px;
791+
height: 20px;
792+
width: 20px;
793+
background: url('../../img/toolbar/verified_green_icon.svg') center no-repeat;
794+
display: inline-block;
792795
position: absolute;
793-
font-size: 10px;
794-
795-
.fa-circle {
796-
color: #67B640;
797-
}
798-
799-
.fa-check {
800-
color: white;
801-
}
796+
left: -10px;
802797
}
803798

804799
&.alignRight {

less/button.less

+14-8
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ span.buttonSeparator {
1919
margin: 4px 3px 4px 3px;
2020
}
2121

22+
span.menuButton {
23+
background: url('../img/toolbar/menu_btn.svg') center no-repeat;
24+
display: inline-block;
25+
width: 20px;
26+
height: 12px;
27+
margin: 6px 4px 0 0;
28+
}
29+
2230
a.browserButton,
2331
span.browserButton,
2432
.browserButton {
@@ -56,19 +64,17 @@ span.browserButton,
5664

5765
&.newFrameButton {
5866
font-size: 0px;
59-
width: 24px;
60-
height: 100%;
61-
opacity: 0.65;
62-
background: url('../img/icon_new_frame.svg') 50% 20% scroll / 20px no-repeat;
67+
width: 10px;
68+
height: 10px;
69+
opacity: 0.5;
70+
margin: 5px 0 0 5px;
71+
background: url('../img/toolbar/newtab_btn.svg') center no-repeat;
6372
&:hover {
6473
opacity: 0.8;
74+
background-color: black;
6575
}
6676
}
6777

68-
&.menuButton {
69-
height: auto;
70-
}
71-
7278
&.primaryButton,
7379
&.actionButton,
7480
&.wideButton,

0 commit comments

Comments
 (0)