OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |