New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 863697 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 20
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 2
Type: Bug



Sign in to add a comment

[MdRefresh] The items on the "Detached" Bookmarks Bar could be 1px lower to be vertically centered.

Project Member Reported by meh...@chromium.org, Jul 14

Issue description

Chrome Version: Canary 69.0.3491.0
OS: macOS 10.13.6 but probably OS=All

What steps will reproduce the problem?
(1) Start Canary
(2) Detach the Bookmarks Bar 
(3) Be sure that you are on the NTP, so that the detached Bookmarks Bar is visible
(4) Mouse over a bookmark item, so that the hover button appears
(5) Compare the white space above and below the hover button

What is the expected result?
All items on the "Detached" Bookmarks Bar could be 1px lower to be vertically centered.

What happens instead?
You see above 2px and below 4px space.

Screenshots are attached.

Thanks for looking into this issue :)
Mehmet
 
actual.png
41.3 KB View Download
expected.png
41.4 KB View Download
actual_zoom.png
38.8 KB View Download
expected_zoom.png
41.2 KB View Download
Sorry typo - I meant: Above it is 4px and below it is 6px. Anyway, moving the items 1px lower to 5px above and 5px below would center them nicely :)

Please feel free to close this issue, if the current position is intented.

Thanks.

Comment 2 Deleted

Cc: pbos@chromium.org
Labels: Hotlist-Polish
Owner: cyan@chromium.org
This might be a good first bug. :)
Cc: bettes@chromium.org
+bettes@ FYI, let us know if you disagree but I think this makes sense.
Status: Available (was: Assigned)
Triage: Unassigning for now.
Status: Started (was: Available)
She's already started, assigning back.
Project Member

Comment 7 by bugdroid1@chromium.org, Jul 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8025aa7e1614a59fb70f1f9589bb1e0d933f656e

commit 8025aa7e1614a59fb70f1f9589bb1e0d933f656e
Author: Charlene Yan <cyan@chromium.org>
Date: Tue Jul 17 19:10:05 2018

Changed kBottomMargin of the detached bookmark bar from 4 to 2 pixels.

This makes the detached bookmarks items vertically centered.

Bug:  863697 
Change-Id: Icf6529ec0b33255dc8072d5bfacc2f32b0495f93
Reviewed-on: https://chromium-review.googlesource.com/1139191
Reviewed-by: Bret Sepulveda <bsep@chromium.org>
Commit-Queue: Charlene Yan <cyan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#575746}
[modify] https://crrev.com/8025aa7e1614a59fb70f1f9589bb1e0d933f656e/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc

Hi cyan@,

thanks for fixing it for the detached BMB. I checked latest Canary and it is looking fine centered (4px top/4px bottom) in the detached Bookmarks Bar.

But your change has regressed it on the attached Bookmarks bar. The button is no longer vertically centered. It is now 4px top / 1px bottom :(

Can you give the bottom again +3px so that it nicely centered 4px top / 4px bottom?

Thanks in advance.


+ Screenshots.
Detached_BMB.png
15.1 KB View Download
Attached_BMB.png
12.3 KB View Download
Project Member

Comment 10 by bugdroid1@chromium.org, Jul 18

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/49ebcfa3d6fd8eda69b9f85ab69c30bd68a277e7

commit 49ebcfa3d6fd8eda69b9f85ab69c30bd68a277e7
Author: Peter Boström <pbos@chromium.org>
Date: Wed Jul 18 17:49:52 2018

Revert "Changed kBottomMargin of the detached bookmark bar from 4 to 2 pixels."

This reverts commit 8025aa7e1614a59fb70f1f9589bb1e0d933f656e.

Reason for revert: Inadvertently affects the attached bookmarks bar.

Original change's description:
> Changed kBottomMargin of the detached bookmark bar from 4 to 2 pixels.
> 
> This makes the detached bookmarks items vertically centered.
> 
> Bug:  863697 
> Change-Id: Icf6529ec0b33255dc8072d5bfacc2f32b0495f93
> Reviewed-on: https://chromium-review.googlesource.com/1139191
> Reviewed-by: Bret Sepulveda <bsep@chromium.org>
> Commit-Queue: Charlene Yan <cyan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#575746}

TBR=bsep@chromium.org,cyan@chromium.org

Change-Id: I9381f0796b85cd658d2101981e3a1ef7071fb4ab
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  863697 
Reviewed-on: https://chromium-review.googlesource.com/1142168
Reviewed-by: Peter Boström <pbos@chromium.org>
Commit-Queue: Peter Boström <pbos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576127}
[modify] https://crrev.com/49ebcfa3d6fd8eda69b9f85ab69c30bd68a277e7/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc

Thanks mehmet@, good catch. The code is actually trying to vertically center the bookmarks but failing (the bookmarks are pushed upwards), cyan@'ll look into why that is instead. I think fixing that might make the margins 3px on both sides instead which would also center them.
Okay, thanks for looking into this again :)
Labels: Group-Toolbar
Cc: yyushkina@chromium.org markchang@chromium.org ramyan@chromium.org
 Issue 864197  has been merged into this issue.
Labels: M-70 Target-70
Project Member

Comment 16 by bugdroid1@chromium.org, Aug 8

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8c86ba838fcfac0de766c5448a2dc5a35c28ca18

commit 8c86ba838fcfac0de766c5448a2dc5a35c28ca18
Author: Charlene Yan <cyan@chromium.org>
Date: Wed Aug 08 15:52:05 2018

Center bookmark bar icons.

Simplifying the button padding calculation for the bookmark bar. Checks that it is appropriately centered in attached and detached state as well as with and without an info bar and tab switching.

Bug:  865555 ,  864595 ,  863697 
Change-Id: I4550c65af596d51ca41b7ac3be2c8f14825e304f
Reviewed-on: https://chromium-review.googlesource.com/1155369
Reviewed-by: Bret Sepulveda <bsep@chromium.org>
Commit-Queue: Charlene Yan <cyan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#581574}
[modify] https://crrev.com/8c86ba838fcfac0de766c5448a2dc5a35c28ca18/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
[modify] https://crrev.com/8c86ba838fcfac0de766c5448a2dc5a35c28ca18/chrome/browser/ui/views/bookmarks/bookmark_bar_view.h
[modify] https://crrev.com/8c86ba838fcfac0de766c5448a2dc5a35c28ca18/chrome/browser/ui/views/frame/browser_view.cc
[modify] https://crrev.com/8c86ba838fcfac0de766c5448a2dc5a35c28ca18/chrome/browser/ui/views/frame/browser_view.h
[modify] https://crrev.com/8c86ba838fcfac0de766c5448a2dc5a35c28ca18/chrome/browser/ui/views/frame/browser_view_layout.cc
[modify] https://crrev.com/8c86ba838fcfac0de766c5448a2dc5a35c28ca18/chrome/browser/ui/views/frame/browser_view_layout.h
[modify] https://crrev.com/8c86ba838fcfac0de766c5448a2dc5a35c28ca18/chrome/browser/ui/views/frame/browser_view_layout_unittest.cc
[modify] https://crrev.com/8c86ba838fcfac0de766c5448a2dc5a35c28ca18/chrome/browser/ui/views/frame/browser_view_unittest.cc
[modify] https://crrev.com/8c86ba838fcfac0de766c5448a2dc5a35c28ca18/chrome/browser/ui/views/frame/contents_layout_manager.cc
[modify] https://crrev.com/8c86ba838fcfac0de766c5448a2dc5a35c28ca18/chrome/browser/ui/views/frame/contents_layout_manager.h
[modify] https://crrev.com/8c86ba838fcfac0de766c5448a2dc5a35c28ca18/chrome/browser/ui/views/toolbar/toolbar_view.cc

Status: Fixed (was: Started)
Thank you cyan@. The items on the detached BMB are nicely centered now in latest Canary Version 70.0.3529.0 on macOS 10.13.6. Tested with a MacBookAir 11" non-Retina.
Bildschirmfoto 2018-08-21 um 09.51.26.png
21.4 KB View Download

Sign in to add a comment