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

Commit

Permalink
Various URL bar related design fixes
Browse files Browse the repository at this point in the history
Resolves #8058

Auditors: @bradleyrichter @bsclifton

Test Plan:
- specified in #8058
  • Loading branch information
NejcZdovc committed Apr 4, 2017
1 parent c390661 commit 94e02ef
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 16 deletions.
5 changes: 2 additions & 3 deletions app/renderer/components/publisherToggle.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,10 @@ const styles = StyleSheet.create({
WebkitAppRegion: 'no-drag',
borderWidth: '1px 1px 1px 0px',
borderStyle: 'solid',
borderColor: '#CBCBCB',
borderColor: globalStyles.color.urlBarOutline,
borderRadius: '0 4px 4px 0',
borderTopLeftRadius: '0',
borderBottomLeftRadius: '0',
borderBottomColor: 'rgba(0, 0, 0, 0.1)'
borderBottomLeftRadius: '0'
},

noFundVerified: {
Expand Down
3 changes: 2 additions & 1 deletion app/renderer/components/styles/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ const globalStyles = {
statsBlue: '#0796fa',
statsLightGray: '#999999',
defaultIconBackground: '#F7F7F7',
almostInvisible: 'rgba(255,255,255,0.01)'
almostInvisible: 'rgba(255,255,255,0.01)',
urlBarOutline: '#bbb'
},
radius: {
borderRadius: '4px',
Expand Down
6 changes: 1 addition & 5 deletions js/components/navigationBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,6 @@ class NavigationBar extends ImmutableComponent {
: true
}

get isPublisherButtonEnabled () {
return UrlUtil.isHttpOrHttps(this.props.location) && this.visiblePublisher
}

componentDidMount () {
ipc.on(messages.SHORTCUT_ACTIVE_FRAME_BOOKMARK, () => this.onToggleBookmark())
ipc.on(messages.SHORTCUT_ACTIVE_FRAME_REMOVE_BOOKMARK, () => this.onToggleBookmark())
Expand Down Expand Up @@ -243,7 +239,7 @@ class NavigationBar extends ImmutableComponent {
urlbar={this.props.navbar.get('urlbar')}
onStop={this.onStop}
menubarVisible={this.props.menubarVisible}
noBorderRadius={this.isPublisherButtonEnabled}
noBorderRadius={!isSourceAboutUrl(this.props.location)}
activeTabShowingMessageBox={this.props.activeTabShowingMessageBox}
/>
{
Expand Down
19 changes: 13 additions & 6 deletions less/navigationBar.less
Original file line number Diff line number Diff line change
Expand Up @@ -660,19 +660,24 @@
z-index: @zindexUrlbarNotLegend;
}

input:focus + legend:before {
legend:before {
content: ' ';
position: absolute;
background: @navigationBarBackgroundActive;
border-radius: 4px;
box-shadow: 0 0 1px @focusUrlbarOutline, inset 0 0 2px @focusUrlbarOutline, inset 0 1px 8px rgba(0, 137, 255, 0.1);
border-radius: 0 4px 4px 0;
color: #333;
box-shadow: inset 0 0 0 1px @urlBarOutline, inset 0 0 0 3px @focusUrlbarOutline;
outline: none;
top: 0;
bottom: 0;
right: 0;
left: 0;
z-index: @zindexNavigationBar;
display: none;
}

input:focus + legend:before {
display: block;
}

#navigator:not(.titleMode) & {
Expand Down Expand Up @@ -718,20 +723,22 @@
&:not(.titleMode) {
> * {
animation: fadeIn .6s;
opacity: 0;
animation-fill-mode: forwards;
}

.urlbarForm {
&.noBorderRadius {
border-radius: 0;

legend:before {
border-radius: 0;
}
}
}

// Create 25x25 squares and place the buttons at the center of each container
.bookmarkButtonContainer,
.addPublisherButtonContainer {
border: 1px solid #bbb;
border: 1px solid @urlBarOutline;
border-radius: @borderRadiusURL;
box-sizing: border-box;
display: flex;
Expand Down
3 changes: 2 additions & 1 deletion less/variables.less
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
@defaultFontSize: 13px;
@contextMenuFontSize: 14px;
@audioColor: @highlightBlue;
@focusUrlbarOutline: @highlightBlue;
@focusUrlbarOutline: rgba(55, 169, 253, 0.4);
@siteSecureColor: @buttonColor;
@siteInsecureColor: #C63626;
@siteEVColor: green;
Expand All @@ -54,6 +54,7 @@
@braveMediumOrange: rgb(232, 72, 0);
@braveDarkOrange: #D44600;
@dragSpacing: 50px;
@urlBarOutline: #bbb;

@switchBG_on: #ff6000;
@switchBG_off: #ccc;
Expand Down

0 comments on commit 94e02ef

Please sign in to comment.