Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(886)

Issue 2667903002: The close button for bubbles should be an ImageButton, not a LabelButton. (Closed)

Created:
3 years, 10 months ago by Peter Kasting
Modified:
3 years, 10 months ago
Reviewers:
msw
CC:
chromium-reviews, msw+watch_chromium.org, groby+bubble_chromium.org, rouslan+bubble_chromium.org, hcarmona+bubble_chromium.org, tfarina
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

The close button for bubbles should be an ImageButton, not a LabelButton. This button never has a label; it's purely an image. Making it a LabelButton means its minimum height is the height of the label font, even if no label is visible. Accordingly, the button was not actually sized to its image (14x14), but to 14x16 (at least on my system -- maybe font metrics vary). I can't see any other effect of this. This button is not focusable, so there's no taborder focus rect that would change. I would be surprised if anyone notices the difference. I only noticed while trying to figure out how the positioning algorithms here work in preparation for simplifying them for Harmony. This change also eliminates usage of a non-const ref, and simplifies some code by refactoring into temps. BUG=686962 Review-Url: https://codereview.chromium.org/2667903002 Cr-Commit-Position: refs/heads/master@{#447337} Committed: https://chromium.googlesource.com/chromium/src/+/5c8c2e7b510f494dbde1a63f4fda119701a727db

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -22 lines) Patch
M ui/views/bubble/bubble_frame_view.cc View 5 chunks +21 lines, -22 lines 2 comments Download

Messages

Total messages: 15 (10 generated)
Peter Kasting
3 years, 10 months ago (2017-01-31 03:36:04 UTC) #2
msw
lgtm. Back in the day, I wanted to remove the ImageButon type, it's just a ...
3 years, 10 months ago (2017-01-31 17:53:16 UTC) #9
Peter Kasting
https://codereview.chromium.org/2667903002/diff/1/ui/views/bubble/bubble_frame_view.cc File ui/views/bubble/bubble_frame_view.cc (right): https://codereview.chromium.org/2667903002/diff/1/ui/views/bubble/bubble_frame_view.cc#newcode325 ui/views/bubble/bubble_frame_view.cc:325: if (ui::MaterialDesignController::IsSecondaryUiMaterial()) { On 2017/01/31 17:53:16, msw wrote: > ...
3 years, 10 months ago (2017-01-31 21:31:01 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2667903002/1
3 years, 10 months ago (2017-01-31 21:31:50 UTC) #12
commit-bot: I haz the power
3 years, 10 months ago (2017-01-31 21:40:16 UTC) #15
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/5c8c2e7b510f494dbde1a63f4fda...

Powered by Google App Engine
This is Rietveld 408576698