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

Side by Side Diff: ui/views/touchui/touch_editing_menu.cc

Issue 13142003: Fix app list position in windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 7 years, 8 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 | « ui/views/bubble/bubble_delegate.cc ('k') | ui/views/touchui/touch_selection_controller_impl.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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "ui/views/touchui/touch_editing_menu.h" 5 #include "ui/views/touchui/touch_editing_menu.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "grit/ui_strings.h" 8 #include "grit/ui_strings.h"
9 #include "ui/base/l10n/l10n_util.h" 9 #include "ui/base/l10n/l10n_util.h"
10 #include "ui/base/resource/resource_bundle.h" 10 #include "ui/base/resource/resource_bundle.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 DISALLOW_COPY_AND_ASSIGN(TouchEditingMenuButtonBorder); 55 DISALLOW_COPY_AND_ASSIGN(TouchEditingMenuButtonBorder);
56 }; 56 };
57 57
58 TouchEditingMenuView::TouchEditingMenuView( 58 TouchEditingMenuView::TouchEditingMenuView(
59 TouchEditingMenuController* controller, 59 TouchEditingMenuController* controller,
60 gfx::Rect anchor_rect, 60 gfx::Rect anchor_rect,
61 gfx::NativeView context) 61 gfx::NativeView context)
62 : BubbleDelegateView(NULL, views::BubbleBorder::BOTTOM_CENTER), 62 : BubbleDelegateView(NULL, views::BubbleBorder::BOTTOM_CENTER),
63 controller_(controller) { 63 controller_(controller) {
64 set_anchor_point(anchor_rect.CenterPoint()); 64 set_anchor_rect(anchor_rect);
65 set_anchor_insets(gfx::Insets(-anchor_rect.height() / 2,
66 -anchor_rect.width() / 2,
67 -anchor_rect.height() / 2,
68 -anchor_rect.width() / 2));
69 set_shadow(views::BubbleBorder::SMALL_SHADOW); 65 set_shadow(views::BubbleBorder::SMALL_SHADOW);
70 set_parent_window(context); 66 set_parent_window(context);
71 set_margins(gfx::Insets()); 67 set_margins(gfx::Insets());
72 set_use_focusless(true); 68 set_use_focusless(true);
73 set_adjust_if_offscreen(true); 69 set_adjust_if_offscreen(true);
74 70
75 SetLayoutManager(new BoxLayout(BoxLayout::kHorizontal, 0, 0, 71 SetLayoutManager(new BoxLayout(BoxLayout::kHorizontal, 0, 0,
76 kSpacingBetweenButtons)); 72 kSpacingBetweenButtons));
77 CreateButtons(); 73 CreateButtons();
78 views::BubbleDelegateView::CreateBubble(this); 74 views::BubbleDelegateView::CreateBubble(this);
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 button->set_focusable(true); 138 button->set_focusable(true);
143 button->set_request_focus_on_press(false); 139 button->set_request_focus_on_press(false);
144 button->set_border(new TouchEditingMenuButtonBorder(button->style())); 140 button->set_border(new TouchEditingMenuButtonBorder(button->style()));
145 button->SetFont(ui::ResourceBundle::GetSharedInstance().GetFont( 141 button->SetFont(ui::ResourceBundle::GetSharedInstance().GetFont(
146 ui::ResourceBundle::SmallFont)); 142 ui::ResourceBundle::SmallFont));
147 button->set_tag(tag); 143 button->set_tag(tag);
148 return button; 144 return button;
149 } 145 }
150 146
151 } // namespace views 147 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/bubble/bubble_delegate.cc ('k') | ui/views/touchui/touch_selection_controller_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698