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

Side by Side Diff: athena/home/minimized_home.cc

Issue 411543006: Explicit container priority (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « athena/home/home_card_impl.cc ('k') | athena/main/debug/debug_window.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 "athena/home/minimized_home.h" 5 #include "athena/home/minimized_home.h"
6 6
7 #include "ui/views/background.h" 7 #include "ui/views/background.h"
8 #include "ui/views/layout/box_layout.h" 8 #include "ui/views/layout/box_layout.h"
9 #include "ui/views/view.h" 9 #include "ui/views/view.h"
10 #include "ui/views/widget/widget.h" 10 #include "ui/views/widget/widget.h"
(...skipping 22 matching lines...) Expand all
33 } 33 }
34 34
35 // views::View: 35 // views::View:
36 virtual gfx::Size GetPreferredSize() const OVERRIDE { 36 virtual gfx::Size GetPreferredSize() const OVERRIDE {
37 const int kDragHandleWidth = 80; 37 const int kDragHandleWidth = 80;
38 const int kDragHandleHeight = 4; 38 const int kDragHandleHeight = 4;
39 return gfx::Size(kDragHandleWidth, kDragHandleHeight); 39 return gfx::Size(kDragHandleWidth, kDragHandleHeight);
40 } 40 }
41 41
42 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE { 42 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE {
43 if (event.IsLeftMouseButton() && event.GetClickCount() > 1) { 43 if (event.IsLeftMouseButton() && event.GetClickCount() == 1) {
44 delegate_->OnDragUpCompleted(); 44 delegate_->OnDragUpCompleted();
45 SetColor(kDragHandleColorNormal); 45 SetColor(kDragHandleColorNormal);
46 return true; 46 return true;
47 } 47 }
48 return false; 48 return false;
49 } 49 }
50 50
51 virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE { 51 virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE {
52 SetColor(kDragHandleColorHot); 52 SetColor(kDragHandleColorHot);
53 } 53 }
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 2, 0); 101 new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 2, 0);
102 layout->set_main_axis_alignment(views::BoxLayout::MAIN_AXIS_ALIGNMENT_CENTER); 102 layout->set_main_axis_alignment(views::BoxLayout::MAIN_AXIS_ALIGNMENT_CENTER);
103 content_view->SetLayoutManager(layout); 103 content_view->SetLayoutManager(layout);
104 104
105 views::View* view = new MinimizedHomeView(delegate); 105 views::View* view = new MinimizedHomeView(delegate);
106 content_view->AddChildView(view); 106 content_view->AddChildView(view);
107 return content_view; 107 return content_view;
108 } 108 }
109 109
110 } // namespace athena 110 } // namespace athena
OLDNEW
« no previous file with comments | « athena/home/home_card_impl.cc ('k') | athena/main/debug/debug_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698