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

Side by Side Diff: ui/views/controls/combobox/combobox.cc

Issue 2533053002: Handle view resize for ripple (Closed)
Patch Set: const -> constexpr Created 4 years 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/controls/button/md_text_button.cc ('k') | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/controls/combobox/combobox.h" 5 #include "ui/views/controls/combobox/combobox.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 // Overridden from InkDropHost: 144 // Overridden from InkDropHost:
145 std::unique_ptr<InkDrop> CreateInkDrop() override { 145 std::unique_ptr<InkDrop> CreateInkDrop() override {
146 std::unique_ptr<views::InkDropImpl> ink_drop = CreateDefaultInkDropImpl(); 146 std::unique_ptr<views::InkDropImpl> ink_drop = CreateDefaultInkDropImpl();
147 ink_drop->SetShowHighlightOnHover(false); 147 ink_drop->SetShowHighlightOnHover(false);
148 return std::move(ink_drop); 148 return std::move(ink_drop);
149 } 149 }
150 150
151 std::unique_ptr<InkDropRipple> CreateInkDropRipple() const override { 151 std::unique_ptr<InkDropRipple> CreateInkDropRipple() const override {
152 return std::unique_ptr<views::InkDropRipple>( 152 return std::unique_ptr<views::InkDropRipple>(
153 new views::FloodFillInkDropRipple( 153 new views::FloodFillInkDropRipple(
154 GetLocalBounds(), GetInkDropCenterBasedOnLastEvent(), 154 size(), GetInkDropCenterBasedOnLastEvent(),
155 GetNativeTheme()->GetSystemColor( 155 GetNativeTheme()->GetSystemColor(
156 ui::NativeTheme::kColorId_LabelEnabledColor), 156 ui::NativeTheme::kColorId_LabelEnabledColor),
157 ink_drop_visible_opacity())); 157 ink_drop_visible_opacity()));
158 } 158 }
159 159
160 private: 160 private:
161 DISALLOW_COPY_AND_ASSIGN(TransparentButton); 161 DISALLOW_COPY_AND_ASSIGN(TransparentButton);
162 }; 162 };
163 163
164 // Returns the next or previous valid index (depending on |increment|'s value). 164 // Returns the next or previous valid index (depending on |increment|'s value).
(...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after
992 const int kMdPaddingWidth = 8; 992 const int kMdPaddingWidth = 8;
993 int arrow_pad = UseMd() ? kMdPaddingWidth 993 int arrow_pad = UseMd() ? kMdPaddingWidth
994 : PlatformStyle::kComboboxNormalArrowPadding; 994 : PlatformStyle::kComboboxNormalArrowPadding;
995 int padding = style_ == STYLE_NORMAL 995 int padding = style_ == STYLE_NORMAL
996 ? arrow_pad * 2 996 ? arrow_pad * 2
997 : kActionLeftPadding + kActionRightPadding; 997 : kActionLeftPadding + kActionRightPadding;
998 return ArrowSize().width() + padding; 998 return ArrowSize().width() + padding;
999 } 999 }
1000 1000
1001 } // namespace views 1001 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/button/md_text_button.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698