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

Made urlBarIconContainer clickable to display connection info #13164

Merged
merged 3 commits into from
Mar 20, 2018
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions app/renderer/components/navigation/urlBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,10 @@ class UrlBar extends React.Component {
}
}

onUrlBarIconContainerClick () {
windowActions.setSiteInfoVisible(true)
}

onBlur (e) {
windowActions.urlBarOnBlur(getCurrentWindowId(), e.target.value, this.props.urlbarLocation, eventElHasAncestorWithClasses(e, ['urlBarSuggestions', 'urlbarForm']))
}
Expand Down Expand Up @@ -497,13 +501,13 @@ class UrlBar extends React.Component {

render () {
const urlbarIconContainer = this.props.evCert
? (<div className='urlbarIconContainer'>
? (<div onClick={this.onUrlBarIconContainerClick} className='urlbarIconContainer'>
<UrlBarIcon
titleMode={this.props.titleMode}
/>
{this.showEvCert}
</div>)
: (<div className='urlbarIconContainer'>
: (<div onClick={this.onUrlBarIconContainerClick} className='urlbarIconContainer'>
<UrlBarIcon
titleMode={this.props.titleMode}
/>
Expand Down
1 change: 0 additions & 1 deletion app/renderer/components/styles/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,6 @@ globalStyles.color.chromeBorderColor = globalStyles.color.chromePrimary
globalStyles.color.chromeControlsWarningBackground = globalStyles.color.chromePrimary
globalStyles.color.audioColor = globalStyles.color.highlightBlue
globalStyles.color.focusUrlbarOutline = globalStyles.color.highlightBlue
globalStyles.color.siteSecureColor = globalStyles.color.buttonColor
globalStyles.color.loadTimeColor = globalStyles.color.highlightBlue
globalStyles.color.activeTabDefaultColor = globalStyles.color.chromePrimary

Expand Down
14 changes: 6 additions & 8 deletions less/navigationBar.less
Original file line number Diff line number Diff line change
Expand Up @@ -574,8 +574,6 @@
}
}

@urlbarFormHeight: 25px;

.urlbarForm {
position: relative; // PR #6485
width: 0; // Fixes #4298
Expand Down Expand Up @@ -619,8 +617,7 @@
color: @chromeText;

// #4922
// TODO: replace this value with a CSS variable to add a dark UI.
background: #fff;
background: @chromeControlsBackground2;
}

@media (max-width: @breakpointNarrowViewport) {
Expand Down Expand Up @@ -825,7 +822,7 @@
justify-content: center;
height: @urlbarFormHeight;
min-height: @urlbarFormHeight;
margin: 0 5px;
margin-right: 5px;
max-width: 40%;

.urlbarIcon {
Expand All @@ -835,7 +832,7 @@
background-position: center;
position: relative;
bottom: -1px;
margin-left: 3px;
padding: 5px 7px 5px 7px;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The extra space between an icon and address is caused by the padding. Looked okay with the secure connection, however as @diracdeltas mentioned with others not really. Changing to 5px 5px 5px 5px makes it better.


// about:newtab
&.fa-search {
Expand Down Expand Up @@ -863,8 +860,9 @@

.evCert {
font-size: 12px;
color: forestgreen;
padding: 5px;
font-weight: 500;
color: @siteEVColor;
padding-right: 5px;
border-right: 1px solid #ccc;
overflow: hidden;
text-overflow: ellipsis;
Expand Down
1 change: 1 addition & 0 deletions less/variables.less
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
@braveDarkOrange: #D44600;
@dragSpacing: 50px;
@urlBarOutline: #bbb;
@urlbarFormHeight: 25px;

@navbarHeight: 36px;
@downloadsBarHeight: 60px;
Expand Down