diff options
author | jamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-21 04:07:16 +0000 |
---|---|---|
committer | jamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-21 04:07:16 +0000 |
commit | 65eb0f2a78048f554c74858c241bada4b97670e7 (patch) | |
tree | 21436fa182be7a4130b07adf1b38d37dcb6dd0c5 | |
parent | a05d8e170cbe0271828dc9ece24559d1206ded6b (diff) | |
download | chromium_src-65eb0f2a78048f554c74858c241bada4b97670e7.zip chromium_src-65eb0f2a78048f554c74858c241bada4b97670e7.tar.gz chromium_src-65eb0f2a78048f554c74858c241bada4b97670e7.tar.bz2 |
ash: Make exit warning dialog transparent black
This makes the text more readable against busy backgrounds.
Also round the corners.
BUG=276317
TEST=visual, ctrl-shift-Q dialog should match screenshots in bug
Review URL: https://chromiumcodereview.appspot.com/22816020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@218636 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | ash/accelerators/exit_warning_handler.cc | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/ash/accelerators/exit_warning_handler.cc b/ash/accelerators/exit_warning_handler.cc index 6612fc8..864286b 100644 --- a/ash/accelerators/exit_warning_handler.cc +++ b/ash/accelerators/exit_warning_handler.cc @@ -27,8 +27,12 @@ namespace ash { namespace { const int64 kTimeOutMilliseconds = 2000; -const SkColor kForegroundColor = 0xFFFFFFFF; -const SkColor kBackgroundColor = 0xE0808080; +// Color of the text of the warning message. +const SkColor kTextColor = SK_ColorWHITE; +// Color of the window background. +const SkColor kWindowBackgroundColor = SkColorSetARGB(0xC0, 0x0, 0x0, 0x0); +// Radius of the rounded corners of the window. +const int kWindowCornerRadius = 2; const int kHorizontalMarginAroundText = 100; const int kVerticalMarginAroundText = 100; @@ -68,8 +72,8 @@ class ExitWarningWidgetDelegateView : public views::WidgetDelegateView { label->SetText(text_); label->SetHorizontalAlignment(gfx::ALIGN_CENTER); label->SetFont(font_); - label->SetEnabledColor(kForegroundColor); - label->SetDisabledColor(kForegroundColor); + label->SetEnabledColor(kTextColor); + label->SetDisabledColor(kTextColor); label->SetAutoColorReadabilityEnabled(false); AddChildView(label); SetLayoutManager(new views::FillLayout); @@ -80,7 +84,10 @@ class ExitWarningWidgetDelegateView : public views::WidgetDelegateView { } virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE { - canvas->FillRect(GetLocalBounds(), kBackgroundColor); + SkPaint paint; + paint.setStyle(SkPaint::kFill_Style); + paint.setColor(kWindowBackgroundColor); + canvas->DrawRoundRect(GetLocalBounds(), kWindowCornerRadius, paint); views::WidgetDelegateView::OnPaint(canvas); } |