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

Unified Diff: chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc

Issue 3053036: [GTK] Remove reference to obsolete constant. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc
diff --git a/chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc b/chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc
index 87ea9fc3e49c447d61e21c4d537e8e13c76e6362..bf28f0e58a98b3e4004808dbd64e67b6bcb5e3c1 100644
--- a/chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc
+++ b/chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc
@@ -568,17 +568,6 @@ gboolean AutocompletePopupViewGtk::HandleExpose(GtkWidget* widget,
pango_layout_set_height(layout_, kHeightPerResult * PANGO_SCALE);
- // An offset to align text in gtk mode. The hard coded constants in this file
- // are all created for the chrome-theme. In an effort to make this look good
- // on the majority of gtk themes, we shrink the popup by one pixel on each
- // side and push it downwards a bit so there's space between the drawn
- // location bar and the popup so we don't touch it (contrast with
- // chrome-theme where that's exactly what we want). Because of that, we need
- // to shift the content inside the popup by one pixel.
- int gtk_offset = 0;
- if (theme_provider_->UseGtkTheme())
- gtk_offset = kGtkHorizontalOffset;
-
for (size_t i = 0; i < result.size(); ++i) {
gfx::Rect line_rect = GetRectForLine(i, window_rect.width());
// Only repaint and layout damaged lines.
@@ -597,8 +586,8 @@ gboolean AutocompletePopupViewGtk::HandleExpose(GtkWidget* widget,
line_rect.width(), line_rect.height());
}
- int icon_start_x = ltr ? (kIconLeftPadding - gtk_offset) :
- (line_rect.width() - kIconLeftPadding - kIconWidth + gtk_offset);
+ int icon_start_x = ltr ? (kIconLeftPadding) :
Peter Kasting 2010/08/03 01:08:56 Nit: Extra parens
+ (line_rect.width() - kIconLeftPadding - kIconWidth);
// Draw the icon for this result.
DrawFullPixbuf(drawable, gc,
IconForMatch(match, is_selected),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698