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

Fix for https://github.com/brave/browser-laptop/issues/1628 #1638

Merged
merged 1 commit into from
May 9, 2016
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
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;