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

Side by Side Diff: chrome/browser/ui/views/autocomplete/autocomplete_result_view.cc

Issue 8632001: Removed TOUCH_UI (mostly constants) from chrome/browser/ui/views. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/views/bubble/bubble.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // For WinDDK ATL compatibility, these ATL headers must come first. 5 // For WinDDK ATL compatibility, these ATL headers must come first.
6 #include "build/build_config.h" 6 #include "build/build_config.h"
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <atlbase.h> // NOLINT 8 #include <atlbase.h> // NOLINT
9 #include <atlwin.h> // NOLINT 9 #include <atlwin.h> // NOLINT
10 #endif 10 #endif
(...skipping 18 matching lines...) Expand all
29 #include "ui/gfx/skia_utils_gtk.h" 29 #include "ui/gfx/skia_utils_gtk.h"
30 #endif 30 #endif
31 31
32 namespace { 32 namespace {
33 33
34 const char16 kEllipsis[] = { 0x2026, 0x0 }; 34 const char16 kEllipsis[] = { 0x2026, 0x0 };
35 35
36 // The minimum distance between the top and bottom of the {icon|text} and the 36 // The minimum distance between the top and bottom of the {icon|text} and the
37 // top or bottom of the row. 37 // top or bottom of the row.
38 const int kMinimumIconVerticalPadding = 2; 38 const int kMinimumIconVerticalPadding = 2;
39
40 #if defined(TOUCH_UI)
41 const int kMinimumTextVerticalPadding = 15;
42 #else
43 const int kMinimumTextVerticalPadding = 3; 39 const int kMinimumTextVerticalPadding = 3;
44 #endif
45 40
46 } // namespace 41 } // namespace
47 42
48 //////////////////////////////////////////////////////////////////////////////// 43 ////////////////////////////////////////////////////////////////////////////////
49 // AutocompleteResultView, public: 44 // AutocompleteResultView, public:
50 45
51 // Precalculated data used to draw the portion of a match classification that 46 // Precalculated data used to draw the portion of a match classification that
52 // fits entirely within one run. 47 // fits entirely within one run.
53 struct AutocompleteResultView::ClassificationData { 48 struct AutocompleteResultView::ClassificationData {
54 string16 text; 49 string16 text;
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 521
527 // Paint the icon. 522 // Paint the icon.
528 canvas->DrawBitmapInt(*GetIcon(), GetMirroredXForRect(icon_bounds_), 523 canvas->DrawBitmapInt(*GetIcon(), GetMirroredXForRect(icon_bounds_),
529 icon_bounds_.y()); 524 icon_bounds_.y());
530 525
531 // Paint the text. 526 // Paint the text.
532 int x = GetMirroredXForRect(text_bounds_); 527 int x = GetMirroredXForRect(text_bounds_);
533 mirroring_context_->Initialize(x, text_bounds_.width()); 528 mirroring_context_->Initialize(x, text_bounds_.width());
534 PaintMatch(canvas, match_, x); 529 PaintMatch(canvas, match_, x);
535 } 530 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/bubble/bubble.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698