Commit 84077a2b authored by Sidney San Martín's avatar Sidney San Martín Committed by Commit Bot

Fix a regression that made bookmark buttons too wide.

r526520 started including a bookmark button's inset when calculating its width.
This turns out to change the layout and, because the inset is cr_lineWidth,
there's no way to pick padding constants which make the padding and spacing the
same on retina and non-retina.

The inset (which comes from GradientButton) isn't really used in MD, so
overriding insetInView: to return zero gets the right behavior back. This
class's layout code could still use cleanup.

Bug: 796836
Change-Id: I52741d9fb92db92fa07ba8b27077d8451383a47f
Reviewed-on: https://chromium-review.googlesource.com/848032Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Commit-Queue: Sidney San Martín <sdy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526739}
parent 6ffadfd6
......@@ -88,6 +88,11 @@ const CGFloat kKernAmount = 0.2;
@synthesize startingChildIndex = startingChildIndex_;
@synthesize drawFolderArrow = drawFolderArrow_;
// Overridden from GradientButtonCell.
+ (CGFloat)insetInView:(NSView*)view {
return 0;
}
+ (id)buttonCellForNode:(const BookmarkNode*)node
text:(NSString*)text
image:(NSImage*)image
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment