Commit 2cf06c31 authored by mgiuca's avatar mgiuca Committed by Commit bot

App list: The line under folder headings has a fixed margin.

Previously, it had a fixed width, causing it to be very short on the
wider app list window style. Now it extends (almost) all the way to the
edge regardless of the app list's width.

BUG=415461

Review URL: https://codereview.chromium.org/581853003

Cr-Commit-Position: refs/heads/master@{#295697}
parent dba9f11e
...@@ -27,7 +27,7 @@ const int kPreferredWidth = 360; ...@@ -27,7 +27,7 @@ const int kPreferredWidth = 360;
const int kPreferredHeight = 48; const int kPreferredHeight = 48;
const int kIconDimension = 24; const int kIconDimension = 24;
const int kPadding = 14; const int kPadding = 14;
const int kBottomSeparatorWidth = 380; const int kBottomSeparatorPadding = 9;
const int kBottomSeparatorHeight = 1; const int kBottomSeparatorHeight = 1;
const int kMaxFolderNameWidth = 300; const int kMaxFolderNameWidth = 300;
...@@ -192,9 +192,8 @@ void FolderHeaderView::OnPaint(gfx::Canvas* canvas) { ...@@ -192,9 +192,8 @@ void FolderHeaderView::OnPaint(gfx::Canvas* canvas) {
return; return;
// Draw bottom separator line. // Draw bottom separator line.
rect.set_x((rect.width() - kBottomSeparatorWidth) / 2 + rect.x()); rect.Inset(kBottomSeparatorPadding, 0);
rect.set_y(rect.y() + rect.height() - kBottomSeparatorHeight); rect.set_y(rect.bottom() - kBottomSeparatorHeight);
rect.set_width(kBottomSeparatorWidth);
rect.set_height(kBottomSeparatorHeight); rect.set_height(kBottomSeparatorHeight);
canvas->FillRect(rect, kTopSeparatorColor); canvas->FillRect(rect, kTopSeparatorColor);
} }
......
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