Commit 956b9f66 authored by Peter Boström's avatar Peter Boström Committed by Commit Bot

Reduce the tab-animation throbber height

Bug: chromium:905515
Change-Id: I99ee7721c56583b8bf0cdc48a06d05371f8c4c4b
Reviewed-on: https://chromium-review.googlesource.com/c/1337828Reviewed-by: default avatarSidney San Martín <sdy@chromium.org>
Commit-Queue: Peter Boström <pbos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608532}
parent ff395248
......@@ -48,10 +48,13 @@ bool ShouldThemifyFaviconForUrl(const GURL& url) {
url.host_piece() != chrome::kChromeUIAppLauncherPageHost;
}
// Fraction of the icon height used for the throbber.
constexpr float kThrobberBoundsFraction = 1 / 8.0f;
// Returns a rect that covers the bottom quarter of |bounds|.
gfx::RectF GetThrobberBounds(const gfx::Rect& bounds) {
gfx::RectF throbber_bounds(bounds);
const float height = bounds.height() / 4;
const float height = bounds.height() * kThrobberBoundsFraction;
throbber_bounds.set_y(bounds.bottom() - height);
throbber_bounds.set_height(height);
return throbber_bounds;
......@@ -334,7 +337,8 @@ void TabIcon::PaintFaviconPlaceholder(gfx::Canvas* canvas,
flags.setStyle(cc::PaintFlags::kFill_Style);
flags.setAntiAlias(true);
canvas->DrawRoundRect(bounds, bounds.height() / 4, flags);
canvas->DrawRoundRect(bounds, bounds.height() * kThrobberBoundsFraction,
flags);
}
bool TabIcon::MaybePaintFavicon(gfx::Canvas* canvas,
......
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