Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Side by Side Diff: ash/system/user/user_view.cc

Issue 2016203002: Widget opacity goes from 0 to 1, not 0 to 255. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resync Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/drag_drop/drag_image_view.cc ('k') | ash/wm/overview/window_grid.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/system/user/user_view.h" 5 #include "ash/system/user/user_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "ash/multi_profile_uma.h" 10 #include "ash/multi_profile_uma.h"
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 // gets destroyed.. 426 // gets destroyed..
427 add_menu_option_.reset(new views::Widget); 427 add_menu_option_.reset(new views::Widget);
428 views::Widget::InitParams params; 428 views::Widget::InitParams params;
429 params.type = views::Widget::InitParams::TYPE_TOOLTIP; 429 params.type = views::Widget::InitParams::TYPE_TOOLTIP;
430 params.keep_on_top = true; 430 params.keep_on_top = true;
431 params.context = this->GetWidget()->GetNativeWindow(); 431 params.context = this->GetWidget()->GetNativeWindow();
432 params.accept_events = true; 432 params.accept_events = true;
433 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; 433 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
434 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; 434 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
435 add_menu_option_->Init(params); 435 add_menu_option_->Init(params);
436 add_menu_option_->SetOpacity(0xFF); 436 add_menu_option_->SetOpacity(1.f);
437 add_menu_option_->GetNativeWindow()->set_owned_by_parent(false); 437 add_menu_option_->GetNativeWindow()->set_owned_by_parent(false);
438 SetShadowType(add_menu_option_->GetNativeView(), ::wm::SHADOW_TYPE_NONE); 438 SetShadowType(add_menu_option_->GetNativeView(), ::wm::SHADOW_TYPE_NONE);
439 439
440 // Position it below our user card. 440 // Position it below our user card.
441 gfx::Rect bounds = user_card_view_->GetBoundsInScreen(); 441 gfx::Rect bounds = user_card_view_->GetBoundsInScreen();
442 bounds.set_y(bounds.y() + bounds.height()); 442 bounds.set_y(bounds.y() + bounds.height());
443 add_menu_option_->SetBounds(bounds); 443 add_menu_option_->SetBounds(bounds);
444 444
445 // Show the content. 445 // Show the content.
446 add_menu_option_->SetAlwaysOnTop(true); 446 add_menu_option_->SetAlwaysOnTop(true);
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 focus_manager_ = NULL; 517 focus_manager_ = NULL;
518 if (user_card_view_->GetFocusManager()) 518 if (user_card_view_->GetFocusManager())
519 user_card_view_->GetFocusManager()->ClearFocus(); 519 user_card_view_->GetFocusManager()->ClearFocus();
520 popup_message_.reset(); 520 popup_message_.reset();
521 mouse_watcher_.reset(); 521 mouse_watcher_.reset();
522 add_menu_option_.reset(); 522 add_menu_option_.reset();
523 } 523 }
524 524
525 } // namespace tray 525 } // namespace tray
526 } // namespace ash 526 } // namespace ash
OLDNEW
« no previous file with comments | « ash/drag_drop/drag_image_view.cc ('k') | ash/wm/overview/window_grid.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698