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

Fix vertical spacing for all navbar item combinations #10512

Merged
merged 1 commit into from
Sep 4, 2017
Merged
Show file tree
Hide file tree
Changes from all 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
5 changes: 3 additions & 2 deletions app/renderer/components/bookmarks/bookmarksToolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,13 +211,14 @@ const styles = StyleSheet.create({
boxSizing: 'border-box',
display: 'flex',
flex: 1,
padding: `${globalStyles.spacing.navbarMenubarMargin} ${globalStyles.spacing.bookmarksToolbarPadding}`
padding: `0 ${globalStyles.spacing.bookmarksToolbarPadding}`,
margin: `${globalStyles.spacing.navbarMenubarMargin} 0`
},
bookmarksToolbar__allowDragging: {
WebkitAppRegion: 'drag'
},
bookmarksToolbar__showOnlyFavicon: {
padding: `${globalStyles.spacing.navbarMenubarMargin} 0 ${globalStyles.spacing.tabPagesHeight} ${globalStyles.spacing.bookmarksToolbarPadding}`
padding: `0 0 0 ${globalStyles.spacing.bookmarksToolbarPadding}`
},
bookmarksToolbar__bookmarkButton: {
boxSizing: 'border-box',
Expand Down
34 changes: 21 additions & 13 deletions app/renderer/components/main/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,11 @@ class Main extends React.Component {
? <PopupWindow />
: null
}
<div className='top'
<div className={cx({
top: true,
allowDragging: this.props.shouldAllowWindowDrag,
})
}
onMouseEnter={windowActions.setMouseInTitlebar.bind(null, true)}
onMouseLeave={windowActions.setMouseInTitlebar.bind(null, false)}
>
Expand Down Expand Up @@ -690,18 +694,22 @@ class Main extends React.Component {
? <BookmarksToolbar />
: null
}
<div className={cx({
tabPages: true,
allowDragging: this.props.shouldAllowWindowDrag,
singlePage: this.props.isSinglePage
})}
onContextMenu={this.onTabContextMenu}>
{
this.props.showTabPages
? <TabPages />
: null
}
</div>
{
this.props.isSinglePage
Copy link
Contributor

Choose a reason for hiding this comment

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

nice one ;-)

? null
: <div className={cx({
tabPages: true,
allowDragging: this.props.shouldAllowWindowDrag,
singlePage: this.props.isSinglePage
})}
onContextMenu={this.onTabContextMenu}>
{
this.props.showTabPages
? <TabPages />
: null
}
</div>
}
<TabsToolbar key='tab-bar' />
{
this.props.showNotificationBar
Expand Down
1 change: 1 addition & 0 deletions app/renderer/components/styles/commonStyles.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ const styles = StyleSheet.create({

// notificationBar
notificationBar: {
'-webkit-app-region': 'no-drag',
display: 'inline-block',
boxSizing: 'border-box',
width: '100%',
Expand Down
1 change: 1 addition & 0 deletions less/findbar.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
@import "variables.less";

.findBar {
-webkit-app-region: no-drag;
background: @findbarBackground;
border-bottom: 1px solid @lightGray;
color: @highlightBlue;
Expand Down
2 changes: 1 addition & 1 deletion less/navigationBar.less
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@
// Styles had to be reworked to properly position the new caption buttons for Windows
.navbarCaptionButtonContainer {
display: flex;
//border-bottom: 1px solid #bbb;
margin-bottom: @navbarMenubarMargin;

&.allowDragging {
-webkit-app-region: drag;
Expand Down
8 changes: 2 additions & 6 deletions less/tabs.less
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
}

.tabsToolbar {
-webkit-app-region: no-drag;
box-sizing: border-box;
background: @tabsBackground;
display: flex;
Expand All @@ -143,7 +144,7 @@
display: flex;
justify-content: center;
height: @tabPagesHeight;
padding: @tabPagesHeight 0 @navbarMenubarMargin 0;
margin: @navbarMenubarMargin 0 @navbarMenubarMargin 0;
position: relative;
z-index: @zindexTabs;

Expand All @@ -154,11 +155,6 @@
}
}

&.singlePage {
margin: 0;
padding: 0;
}

>div {
display: flex
}
Expand Down
3 changes: 3 additions & 0 deletions less/window.less
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ html,

.top {
background: linear-gradient(to bottom, #eaeaea, #f2f2f4);
&.allowDragging {
-webkit-app-region: drag;
}
}

.mainContainer {
Expand Down