diff options
author | avayvod@chromium.org <avayvod@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-21 14:33:30 +0000 |
---|---|---|
committer | avayvod@chromium.org <avayvod@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-21 14:33:30 +0000 |
commit | a7c2ec976d124fd19dc41c9331a5a57bdbc74b3e (patch) | |
tree | a424e45a01d3134d13e50060b8af10a8ea3e4b1c /chrome/browser/chromeos | |
parent | ace7213ffdee41f62ff19e0b3c841dace26b3ce9 (diff) | |
download | chromium_src-a7c2ec976d124fd19dc41c9331a5a57bdbc74b3e.zip chromium_src-a7c2ec976d124fd19dc41c9331a5a57bdbc74b3e.tar.gz chromium_src-a7c2ec976d124fd19dc41c9331a5a57bdbc74b3e.tar.bz2 |
Fixed wizard screen background for OOBE mode. Made wizard screen window always transparent. Removed shadow stroke from screens.
BUG=none
TEST=Verify that there's no black border around screens in OOBE mode. Also verify that there's no light blue stroke at the edge of the screens.
Review URL: http://codereview.chromium.org/2873008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50348 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos')
5 files changed, 14 insertions, 37 deletions
diff --git a/chrome/browser/chromeos/login/existing_user_controller.cc b/chrome/browser/chromeos/login/existing_user_controller.cc index 9bedb95..de50787 100644 --- a/chrome/browser/chromeos/login/existing_user_controller.cc +++ b/chrome/browser/chromeos/login/existing_user_controller.cc @@ -183,7 +183,7 @@ void ExistingUserController::OnUserSelected(UserController* source) { void ExistingUserController::ActivateWizard(const std::string& screen_name) { // WizardController takes care of deleting itself when done. WizardController* controller = new WizardController(); - controller->Init(screen_name, background_bounds_, false); + controller->Init(screen_name, background_bounds_); controller->Show(); // Give the background window to the controller. diff --git a/chrome/browser/chromeos/login/rounded_rect_painter.cc b/chrome/browser/chromeos/login/rounded_rect_painter.cc index d93dbb1..4ae9bf4 100644 --- a/chrome/browser/chromeos/login/rounded_rect_painter.cc +++ b/chrome/browser/chromeos/login/rounded_rect_painter.cc @@ -20,7 +20,7 @@ const int kCornerRadius = 5; const SkColor kScreenTopColor = SkColorSetRGB(250, 251, 251); const SkColor kScreenBottomColor = SkColorSetRGB(204, 209, 212); const SkColor kScreenShadowColor = SkColorSetARGB(64, 34, 54, 115); -const SkColor kShadowStrokeColor = SkColorSetRGB(40, 90, 177); +const SkColor kShadowStrokeColor = 0; const int kScreenShadow = 10; static void DrawRoundedRect( @@ -185,15 +185,6 @@ void RoundedRectBorder::GetInsets(gfx::Insets* insets) const { } // namespace // static -const BorderDefinition BorderDefinition::kWizardBorder = { - 0, - SK_ColorBLACK, - 0, - SK_ColorBLACK, - 0, - SK_ColorBLACK, - SK_ColorBLACK -}; const BorderDefinition BorderDefinition::kScreenBorder = { 0, SK_ColorBLACK, diff --git a/chrome/browser/chromeos/login/rounded_rect_painter.h b/chrome/browser/chromeos/login/rounded_rect_painter.h index 485eafc..3788c1b 100644 --- a/chrome/browser/chromeos/login/rounded_rect_painter.h +++ b/chrome/browser/chromeos/login/rounded_rect_painter.h @@ -23,7 +23,6 @@ struct BorderDefinition { SkColor top_color; SkColor bottom_color; - static const BorderDefinition kWizardBorder; static const BorderDefinition kScreenBorder; }; diff --git a/chrome/browser/chromeos/login/wizard_controller.cc b/chrome/browser/chromeos/login/wizard_controller.cc index e80eb12..07bfbd8 100644 --- a/chrome/browser/chromeos/login/wizard_controller.cc +++ b/chrome/browser/chromeos/login/wizard_controller.cc @@ -48,8 +48,7 @@ const int kWizardScreenHeight = 416; // WizardController. class ContentView : public views::View { public: - ContentView(bool paint_background, int window_x, int window_y, int screen_w, - int screen_h) + ContentView(int window_x, int window_y, int screen_w, int screen_h) : window_x_(window_x), window_y_(window_y), screen_w_(screen_w), @@ -64,11 +63,6 @@ class ContentView : public views::View { false, true, true)), accel_image_screen_(views::Accelerator(base::VKEY_I, false, true, true)) { - if (paint_background) { - painter_.reset(chromeos::CreateWizardPainter( - &chromeos::BorderDefinition::kWizardBorder)); - } - AddAccelerator(accel_account_screen_); AddAccelerator(accel_login_screen_); AddAccelerator(accel_network_screen_); @@ -212,8 +206,7 @@ WizardController::~WizardController() { } void WizardController::Init(const std::string& first_screen_name, - const gfx::Rect& screen_bounds, - bool paint_background) { + const gfx::Rect& screen_bounds) { DCHECK(!contents_); int offset_x = (screen_bounds.width() - kWizardScreenWidth) / 2; @@ -221,20 +214,17 @@ void WizardController::Init(const std::string& first_screen_name, int window_x = screen_bounds.x() + offset_x; int window_y = screen_bounds.y() + offset_y; - contents_ = new ContentView(paint_background, - offset_x, offset_y, + contents_ = new ContentView(offset_x, offset_y, screen_bounds.width(), screen_bounds.height()); views::WidgetGtk* window = new views::WidgetGtk(views::WidgetGtk::TYPE_WINDOW); widget_ = window; - if (!paint_background) { - window->MakeTransparent(); - // Window transparency makes background flicker through controls that - // are constantly updating its contents (like image view with video - // stream). Hence enabling double buffer. - window->EnableDoubleBuffer(true); - } + window->MakeTransparent(); + // Window transparency makes background flicker through controls that + // are constantly updating its contents (like image view with video + // stream). Hence enabling double buffer. + window->EnableDoubleBuffer(true); window->Init(NULL, gfx::Rect(window_x, window_y, kWizardScreenWidth, kWizardScreenHeight)); chromeos::WmIpc::instance()->SetWindowType( @@ -594,7 +584,7 @@ void ShowLoginWizard(const std::string& first_screen_name, WizardController* controller = new WizardController(); controller->SetCustomization(customization.release()); controller->ShowBackground(screen_bounds); - controller->Init(first_screen_name, screen_bounds, true); + controller->Init(first_screen_name, screen_bounds); controller->Show(); if (chromeos::CrosLibrary::Get()->EnsureLoaded()) chromeos::CrosLibrary::Get()->GetLoginLibrary()->EmitLoginPromptReady(); diff --git a/chrome/browser/chromeos/login/wizard_controller.h b/chrome/browser/chromeos/login/wizard_controller.h index 6621315..2513094 100644 --- a/chrome/browser/chromeos/login/wizard_controller.h +++ b/chrome/browser/chromeos/login/wizard_controller.h @@ -50,13 +50,10 @@ class WizardController : public chromeos::ScreenObserver, } // Shows the first screen defined by |first_screen_name| or by default - // if the parameter is empty. |paint_background| indicates whether a - // background should be painted. If |paint_background| is false, the window is - // made transparent. |screen_bounds| are used to calculate position of the - // wizard screen. + // if the parameter is empty. |screen_bounds| are used to calculate position + // of the wizard screen. void Init(const std::string& first_screen_name, - const gfx::Rect& screen_bounds, - bool paint_background); + const gfx::Rect& screen_bounds); // Returns the view that contains all the other views. views::View* contents() { return contents_; } |