Commit f0902d4c authored by Sammie Quon's avatar Sammie Quon Committed by Commit Bot

overview: minor ui tweaks.

Use kAppIconKey if possible instead of kWindowIconKey for the overview
icon. Its bigger and clearer when resized.
Change split view drag indicators text to use a flat 24 width so they
are always pill shaped, instead of line height if it is bigger.

Test: manaual
Bug: 817877, 817865
Change-Id: I880cbfe7d2474156e5268dcb02ef0efd6db12f00
Reviewed-on: https://chromium-review.googlesource.com/963673Reviewed-by: default avatarMitsuru Oshima <oshima@chromium.org>
Commit-Queue: Sammie Quon <sammiequon@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543491}
parent d9d9cf8c
......@@ -1128,12 +1128,14 @@ void WindowSelectorItem::CreateWindowLabel(const base::string16& title) {
transform_window_.window());
}
// Create an image view for and scale down the windows window icon, if it
// exists.
// Create an image view the header icon. Tries to use the app icon, as it is
// higher resolution. If it does not exist, use the window icon. If neither
// exist, display nothing.
views::ImageView* image_view = nullptr;
if (IsNewOverviewUi()) {
gfx::ImageSkia* icon =
transform_window_.window()->GetProperty(aura::client::kWindowIconKey);
gfx::ImageSkia* icon = GetWindow()->GetProperty(aura::client::kAppIconKey);
if (!icon || icon->size().IsEmpty())
icon = GetWindow()->GetProperty(aura::client::kWindowIconKey);
if (icon && !icon->size().IsEmpty()) {
image_view = new views::ImageView();
image_view->SetImage(gfx::ImageSkiaOperations::CreateResizedImage(
......
......@@ -374,10 +374,8 @@ class SplitViewDragIndicators::SplitViewDragIndicatorsView
// Calculate the bounds of the views which contain the guidance text and
// icon. Rotate the two views in landscape mode.
const gfx::Size size(
left_rotated_view_->GetPreferredSize().width(),
std::max(kSplitviewLabelPreferredHeightDp,
left_rotated_view_->GetPreferredSize().height()));
const gfx::Size size(left_rotated_view_->GetPreferredSize().width(),
kSplitviewLabelPreferredHeightDp);
gfx::Rect left_rotated_bounds(highlight_width / 2 - size.width() / 2,
highlight_height / 2 - size.height() / 2,
size.width(), size.height());
......
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