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

Issue 437051: Mac: give visual feedback for bookmark button drags. (Closed)

Created:
11 years, 1 month ago by viettrungluu
Modified:
9 years, 6 months ago
CC:
chromium-reviews_googlegroups.com, John Grabowski
Visibility:
Public.

Description

Mac: give visual feedback for bookmark button drags. Draw a "ugly black bar" (where "black" is actually a theme colour) to indicate where a bookmark button that's being dragged will end up if dropped. This is a stopgap measure for the beta. Later, we will make the buttons move around instead (even if implementable in the time remaining, such animations would be a crash risk). BUG=17608 TEST=Drag bookmark bar buttons around. Make sure that the bar indicating where a button will be dropped is visible enough and accurate. Repeat with various themes. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=33079

Patch Set 1 #

Patch Set 2 : Visually tweaked per officemates' feedback. #

Patch Set 3 : Fixed unit test? (Haven't yet compiled.) #

Total comments: 3

Patch Set 4 : Added -draggingEnded:. #

Total comments: 8

Patch Set 5 : Updated per pinkerton's review. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+151 lines, -13 lines) Patch
M chrome/browser/cocoa/bookmark_bar_controller.h View 1 2 3 4 1 chunk +8 lines, -1 line 0 comments Download
M chrome/browser/cocoa/bookmark_bar_controller.mm View 1 2 3 4 6 chunks +74 lines, -10 lines 0 comments Download
M chrome/browser/cocoa/bookmark_bar_view.h View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/bookmark_bar_view.mm View 1 2 3 4 1 chunk +60 lines, -1 line 0 comments Download
M chrome/browser/cocoa/bookmark_bar_view_unittest.mm View 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/bookmark_button.mm View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 7 (0 generated)
viettrungluu
As the description says, this is a stopgap measure for the beta.
11 years, 1 month ago (2009-11-25 02:11:32 UTC) #1
mrossetti
http://codereview.chromium.org/437051/diff/3001/4004 File chrome/browser/cocoa/bookmark_bar_view.mm (right): http://codereview.chromium.org/437051/diff/3001/4004#newcode133 chrome/browser/cocoa/bookmark_bar_view.mm:133: if (dropIndicatorShown_) { I think you want to use ...
11 years, 1 month ago (2009-11-25 04:07:31 UTC) #2
viettrungluu
Thanks, Mike, for taking a look. http://codereview.chromium.org/437051/diff/3001/4004 File chrome/browser/cocoa/bookmark_bar_view.mm (right): http://codereview.chromium.org/437051/diff/3001/4004#newcode133 chrome/browser/cocoa/bookmark_bar_view.mm:133: if (dropIndicatorShown_) { ...
11 years, 1 month ago (2009-11-25 04:24:23 UTC) #3
mrossetti_google.com
If you're sure, then LGTM. But in my tests, draggingEnded: was always called when a ...
11 years, 1 month ago (2009-11-25 04:40:43 UTC) #4
viettrungluu
I guess the point is that we want to hide the indicator bar whenever the ...
11 years, 1 month ago (2009-11-25 04:45:35 UTC) #5
pink (ping after 24hrs)
LGTM with some comments. http://codereview.chromium.org/437051/diff/5001/6001 File chrome/browser/cocoa/bookmark_bar_controller.h (right): http://codereview.chromium.org/437051/diff/5001/6001#newcode179 chrome/browser/cocoa/bookmark_bar_controller.h:179: toPoint:(NSPoint)point; in the comment, specify ...
11 years ago (2009-11-25 16:26:44 UTC) #6
viettrungluu
11 years ago (2009-11-25 16:52:19 UTC) #7
Thanks, Pink.

http://codereview.chromium.org/437051/diff/5001/6001
File chrome/browser/cocoa/bookmark_bar_controller.h (right):

http://codereview.chromium.org/437051/diff/5001/6001#newcode179
chrome/browser/cocoa/bookmark_bar_controller.h:179: toPoint:(NSPoint)point;
On 2009/11/25 16:26:44, pink wrote:
> in the comment, specify the coordinate system for |point| (i believe it's the
> window's coordinate system, given how you're passing in from the drag info).

Done.

http://codereview.chromium.org/437051/diff/5001/6002
File chrome/browser/cocoa/bookmark_bar_controller.mm (right):

http://codereview.chromium.org/437051/diff/5001/6002#newcode544
chrome/browser/cocoa/bookmark_bar_controller.mm:544: if (destIndex >= 0) {
On 2009/11/25 16:26:44, pink wrote:
> check sourceNode here as well (dchecks do nothing in release).

Done. Also added the corresponding paranoia check to -indexForDragOfButton:....

http://codereview.chromium.org/437051/diff/5001/6004
File chrome/browser/cocoa/bookmark_bar_view.mm (right):

http://codereview.chromium.org/437051/diff/5001/6004#newcode85
chrome/browser/cocoa/bookmark_bar_view.mm:85: // Don't let the indicator be
half-off the view.
On 2009/11/25 16:26:44, pink wrote:
> i don't understand what this means.

Well, it is a bit cryptic. It just ensures that the indicator won't be clipped
(due to being partly out of the visible area). Comment changed.

http://codereview.chromium.org/437051/diff/5001/6004#newcode88
chrome/browser/cocoa/bookmark_bar_view.mm:88: NSRect uglyBlackBar =
On 2009/11/25 16:26:44, pink wrote:
> tell me how you really feel :-)

Actually, I think those were the words Ben used to describe this stopgap. But
for added value, I put in "uglyBlackBarColor". :-)

Powered by Google App Engine
This is Rietveld 408576698