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

Side by Side Diff: chrome/browser/ui/views/location_bar/touchable_location_bar_view.cc

Issue 10519008: Enlarge size of touch target for several location bar buttons without affecting visual layout. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to LKGR Created 8 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/ui/views/location_bar/touchable_location_bar_view.h"
6
7 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
8 #include "ui/base/layout.h"
9 #include "ui/views/border.h"
10
11 void TouchableLocationBarViewBase::Init() {
12 if (ui::GetDisplayLayout() == ui::LAYOUT_TOUCH) {
13 SetBorder(3, touch_horizontal_padding());
14 }
15 }
16
17 int TouchableLocationBarViewBase::GetBuiltInHorizontalPadding() const {
18 return ui::GetDisplayLayout() == ui::LAYOUT_TOUCH ?
19 touch_horizontal_padding() : 0;
20 }
21
22 int TouchableLocationBarViewBase::touch_horizontal_padding() const {
23 return LocationBarView::GetItemPadding() / 2;
24 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698