DescriptionMenu for the OSX app launcher, HoverImageMenuButton in src/ui/base/cocoa/controls.
Adds a drop-down menu to the right of the search entry area on the OSX
app launcher. The menu is shown when clicked, and the button responds to
hover effects.
The menu button uses a new class, HoverImageMenuButton, which is derived
from an NSPopUpButton with minor extensions. Notably, it does not have a
dependency on browser themes, as does MenuButton from
chrome/browser/ui/cocoa. It tracks the mouse hover state and updates
the cell, which extends NSPopUpButtonCell and shows only the image in
the control frame -- no border, bezel, label, or dropdown arrow.
HoverImageMenuButtonCell supports a hover image, which behaves much like
an additional 'alternateImage' from NSButtonCell but for the hover
state, rather than the 'pressed' (or 'lit') state.
The menu shows the currently signed-in user, in a custom view as the
first item. It also (currently) shows menu options for Settings, Help, and
Feedback.
BUG=138633
TEST=Added app_list_unittests AppsSearchBoxMenuTest and
AppsSearchBoxMenuTest and tested manually to ensure the items are
launched correctly. Added ui_unittests HoverImageMenuButtonTest.*
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=206237
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=206930
Patch Set 1 : split #
Total comments: 7
Patch Set 2 : ensure the correct font is used #Patch Set 3 : AppListMenuCocoa -> AppListMenuButton #Patch Set 4 : Refactor HoverImageMenuButton into /ui/base/cocoa/controls #
Total comments: 48
Patch Set 5 : respond to comments #Patch Set 6 : rebase wrt CL-15653008 #Patch Set 7 : rebase wrt a better CL-15653008 #Patch Set 8 : rebase only w.r.t. master and CL-15870006 #Patch Set 9 : fix tests, and align setHover* behaviour with setAlternateImage/setHighlighted #Patch Set 10 : Switch to using menu controller #Patch Set 11 : Discovered [NSFont menuFontOfSize:0] #Patch Set 12 : rebase for final CL-15653008 #Patch Set 13 : Apply CL to master (clean) #
Total comments: 13
Patch Set 14 : address comments #
Total comments: 6
Patch Set 15 : respond to comments #
Total comments: 3
Patch Set 16 : rebase only, for gyp conflict #Patch Set 17 : setImage -> setDefaultImage, fixes leak #
Total comments: 2
Patch Set 18 : fix comment #Messages
Total messages: 40 (0 generated)
|