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

Commit

Permalink
Always show the overflow indicator
Browse files Browse the repository at this point in the history
On the bookmarks toolbar.

Fix #6869.

However, there is too much space before the overflow indicator.

I'm not well versed with CSS so I'd appreciate some pointers.
Auditors:

Test Plan:
  • Loading branch information
GreenRecycleBin committed Jun 22, 2017
1 parent 850d822 commit 06ecb04
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions app/renderer/components/bookmarks/bookmarksToolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,30 @@ class BookmarksToolbar extends ImmutableComponent {
const chevronWidth = props.showFavicon && noParentItems.getIn([i, 'folderId']) ? this.chevronWidth : 0
if (props.showFavicon && props.showOnlyFavicon) {
widthAccountedFor += this.padding + iconWidth + chevronWidth

if (widthAccountedFor >= props.windowWidth - overflowButtonWidth) {
widthAccountedFor -= this.padding + iconWidth + chevronWidth
i--

break
}
} else {
const text = noParentItems.getIn([i, 'customTitle']) || noParentItems.getIn([i, 'title']) || noParentItems.getIn([i, 'location'])
widthAccountedFor += Math.min(calculateTextWidth(text, `${this.fontSize} ${this.fontFamily}`) + this.padding + iconWidth + chevronWidth, this.maxWidth)

if (widthAccountedFor >= props.windowWidth - overflowButtonWidth) {
widthAccountedFor -= Math.min(calculateTextWidth(text, `${this.fontSize} ${this.fontFamily}`) + this.padding + iconWidth + chevronWidth, this.maxWidth)
i--

break
}
}
widthAccountedFor += margin

if (widthAccountedFor >= props.windowWidth - overflowButtonWidth) {
widthAccountedFor -= margin
i--

break
}
}
Expand Down

0 comments on commit 06ecb04

Please sign in to comment.