Commit 2c224b06 authored by Lei Zhang's avatar Lei Zhang Committed by Commit Bot

Change ChromeOS restored frame top to 8 DIP.

Change it to 8 from 7. Do this programmatically rather than with
hard-coded constants.

BUG=851101

Change-Id: I638dfcfc641c92af860f4b0d4e630914bc6426f9
Reviewed-on: https://chromium-review.googlesource.com/1137236Reviewed-by: default avatarScott Violet <sky@chromium.org>
Reviewed-by: default avatarPeter Kasting <pkasting@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#575457}
parent 54a963cd
......@@ -11,28 +11,19 @@ namespace ash {
gfx::Size GetAshLayoutSize(AshLayoutSize size) {
constexpr int kButtonWidth = 32;
const int mode = ui::MaterialDesignController::GetMode();
switch (size) {
case AshLayoutSize::kBrowserCaptionMaximized: {
// These constants should be kept in sync with those for TAB_HEIGHT in
// chrome/browser/ui/layout_constants.cc.
// TODO: Ideally these values should be obtained from a common location.
constexpr int kBrowserMaximizedCaptionButtonHeight[] = {29, 33, 41, 34,
41};
return gfx::Size(kButtonWidth,
kBrowserMaximizedCaptionButtonHeight[mode]);
}
case AshLayoutSize::kBrowserCaptionRestored: {
constexpr int kBrowserRestoredCaptionButtonHeight[] = {36, 40, 48, 41,
48};
return gfx::Size(kButtonWidth, kBrowserRestoredCaptionButtonHeight[mode]);
}
case AshLayoutSize::kNonBrowserCaption:
return gfx::Size(kButtonWidth, 32);
}
NOTREACHED();
return gfx::Size();
if (size == AshLayoutSize::kNonBrowserCaption)
return gfx::Size(kButtonWidth, 32);
// |kBrowserMaximizedCaptionButtonHeight| should be kept in sync with those
// for TAB_HEIGHT in // chrome/browser/ui/layout_constants.cc.
// TODO: Ideally these values should be obtained from a common location.
constexpr int kBrowserMaximizedCaptionButtonHeight[] = {29, 33, 41, 34, 41};
const int mode = ui::MaterialDesignController::GetMode();
int height = kBrowserMaximizedCaptionButtonHeight[mode];
if (size == AshLayoutSize::kBrowserCaptionRestored)
height += 8; // Restored window titlebars are 8 DIP taller than maximized.
return gfx::Size(kButtonWidth, height);
}
} // namespace ash
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