| 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 #include "chrome/browser/autocomplete/autocomplete_popup_view_gtk.h" | 5 #include "chrome/browser/autocomplete/autocomplete_popup_view_gtk.h" |
| 6 | 6 |
| 7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 return pixbufs_[bitmap]; | 488 return pixbufs_[bitmap]; |
| 489 } | 489 } |
| 490 | 490 |
| 491 int icon = match.starred ? | 491 int icon = match.starred ? |
| 492 IDR_OMNIBOX_STAR : AutocompleteMatch::TypeToIcon(match.type); | 492 IDR_OMNIBOX_STAR : AutocompleteMatch::TypeToIcon(match.type); |
| 493 if (selected) { | 493 if (selected) { |
| 494 switch (icon) { | 494 switch (icon) { |
| 495 case IDR_OMNIBOX_HTTP: icon = IDR_OMNIBOX_HTTP_DARK; break; | 495 case IDR_OMNIBOX_HTTP: icon = IDR_OMNIBOX_HTTP_DARK; break; |
| 496 case IDR_OMNIBOX_HISTORY: icon = IDR_OMNIBOX_HISTORY_DARK; break; | 496 case IDR_OMNIBOX_HISTORY: icon = IDR_OMNIBOX_HISTORY_DARK; break; |
| 497 case IDR_OMNIBOX_SEARCH: icon = IDR_OMNIBOX_SEARCH_DARK; break; | 497 case IDR_OMNIBOX_SEARCH: icon = IDR_OMNIBOX_SEARCH_DARK; break; |
| 498 case IDR_OMNIBOX_MORE: icon = IDR_OMNIBOX_MORE_DARK; break; | |
| 499 case IDR_OMNIBOX_STAR: icon = IDR_OMNIBOX_STAR_DARK; break; | 498 case IDR_OMNIBOX_STAR: icon = IDR_OMNIBOX_STAR_DARK; break; |
| 500 default: NOTREACHED(); break; | 499 default: NOTREACHED(); break; |
| 501 } | 500 } |
| 502 } | 501 } |
| 503 | 502 |
| 504 // TODO(estade): Do we want to flip these for RTL? (Windows doesn't). | 503 // TODO(estade): Do we want to flip these for RTL? (Windows doesn't). |
| 505 return theme_provider_->GetPixbufNamed(icon); | 504 return theme_provider_->GetPixbufNamed(icon); |
| 506 } | 505 } |
| 507 | 506 |
| 508 gboolean AutocompletePopupViewGtk::HandleMotion(GtkWidget* widget, | 507 gboolean AutocompletePopupViewGtk::HandleMotion(GtkWidget* widget, |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 666 (text_width - actual_content_width - | 665 (text_width - actual_content_width - |
| 667 (actual_description_width / PANGO_SCALE)), | 666 (actual_description_width / PANGO_SCALE)), |
| 668 content_y, layout_); | 667 content_y, layout_); |
| 669 } | 668 } |
| 670 } | 669 } |
| 671 | 670 |
| 672 g_object_unref(gc); | 671 g_object_unref(gc); |
| 673 | 672 |
| 674 return TRUE; | 673 return TRUE; |
| 675 } | 674 } |
| OLD | NEW |