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

Commit

Permalink
Merge pull request #1638 from bsclifton/win32-fix-backforward-spacing
Browse files Browse the repository at this point in the history
Fix for #1628
  • Loading branch information
bbondy committed May 9, 2016
2 parents f4cbb60 + f5d24d1 commit 090eeaf
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
29 changes: 14 additions & 15 deletions less/navigationBar.less
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@
// On MacOS we need to keep a padding left to avoid overlapping
// with the window buttons to close/maximize/minimize the window.
.platform--darwin .navigatorWrapper .backforward {
margin-left: 70px;
margin-left: @navbarLeftMarginDarwin;

// Since we want to keep the navigator centered, we need to calculate the
// difference between the width of the left box and the width of the right box.
@centerOffset: @navbarLeftMarginDarwin + 2 * (@navbarButtonWidth + @navbarButtonSpacing) // width area on the left
- (@navbarBraveButtonWidth + 2 * @navbarButtonSpacing);
}


Expand All @@ -20,34 +25,28 @@
// box on its left has different size than the one on the right.
// This is achieved by the local variable `@centerOffset`.
.navigatorWrapper {
@buttonSpacing: 4px;
@buttonWidth: 35px;
@braveButtonWidth: 23px;
@margin: 70px;

// Since we want to keep the navigator centered, we need to calculate the
// difference between the width of the left box and the width of the right box.
@centerOffset: @margin + 2 * (@buttonWidth + @buttonSpacing) // width area on the left
- (@braveButtonWidth + 2 * @buttonSpacing);
@centerOffset: 2 * (@navbarButtonWidth + @navbarButtonSpacing) // width area on the left
- (@navbarBraveButtonWidth + 2 * @navbarButtonSpacing);

display: flex;

// Buttons on the left
.backforward {
display: flex;
margin-left: @margin;

.back,
.forward {
width: @buttonWidth;
width: @navbarButtonWidth;
}

.back {
padding-right: @buttonSpacing;
padding-right: @navbarButtonSpacing;
}

.forward {
padding-left: @buttonSpacing;
padding-left: @navbarButtonSpacing;
}

}
Expand Down Expand Up @@ -83,9 +82,9 @@
.topLevelEndButtons {

.braveMenu {
width: @braveButtonWidth;
margin-left: @buttonSpacing;
margin-right: @buttonSpacing;
width: @navbarBraveButtonWidth;
margin-left: @navbarButtonSpacing;
margin-right: @navbarButtonSpacing;
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions less/variables.less
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,8 @@
@tabPagesHeight: 12px;
@bookmarksToolbarHeight: 23px;
@bookmarksToolbarWithFaviconsHeight: 28px;

@navbarButtonSpacing: 4px;
@navbarButtonWidth: 35px;
@navbarBraveButtonWidth: 23px;
@navbarLeftMarginDarwin: 70px;

0 comments on commit 090eeaf

Please sign in to comment.