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

Unified Diff: chrome/browser/gtk/location_bar_view_gtk.cc

Issue 149681: GTK Themes: Make the omnibox area look more native. (Closed)
Patch Set: Change names for Dean Created 11 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 | « chrome/browser/gtk/go_button_gtk.cc ('k') | chrome/browser/gtk/toolbar_star_toggle_gtk.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/location_bar_view_gtk.cc
diff --git a/chrome/browser/gtk/location_bar_view_gtk.cc b/chrome/browser/gtk/location_bar_view_gtk.cc
index 211f9976a220511cc5cd22ec421c4edfc6d16579..503a4765ef84ec80ac148d9bd5dc55f3e0ff2ad4 100644
--- a/chrome/browser/gtk/location_bar_view_gtk.cc
+++ b/chrome/browser/gtk/location_bar_view_gtk.cc
@@ -389,19 +389,23 @@ gboolean LocationBarViewGtk::HandleExpose(GtkWidget* widget,
// window, set a clip to make sure that we don't draw outside.
gdk_gc_set_clip_rectangle(gc, &inner_rect);
- // Draw our 1px border. TODO(deanm): Maybe this would be cleaner as an
- // overdrawn stroked rect with a clip to the allocation?
- gdk_gc_set_rgb_fg_color(gc, &kBorderColor);
- gdk_draw_rectangle(drawable, gc, TRUE,
- inner_rect.x,
- inner_rect.y,
- inner_rect.width,
- kBorderThickness);
- gdk_draw_rectangle(drawable, gc, TRUE,
- inner_rect.x,
- inner_rect.y + inner_rect.height - kBorderThickness,
- inner_rect.width,
- kBorderThickness);
+ // If we're not using GTK theming, draw our own border.
+ if (!profile_ ||
+ !GtkThemeProvider::GetFrom(profile_)->UseGtkTheme()) {
+ // Draw our 1px border. TODO(deanm): Maybe this would be cleaner as an
+ // overdrawn stroked rect with a clip to the allocation?
+ gdk_gc_set_rgb_fg_color(gc, &kBorderColor);
+ gdk_draw_rectangle(drawable, gc, TRUE,
+ inner_rect.x,
+ inner_rect.y,
+ inner_rect.width,
+ kBorderThickness);
+ gdk_draw_rectangle(drawable, gc, TRUE,
+ inner_rect.x,
+ inner_rect.y + inner_rect.height - kBorderThickness,
+ inner_rect.width,
+ kBorderThickness);
+ }
// Draw the background within the border.
gdk_gc_set_rgb_fg_color(gc,
« no previous file with comments | « chrome/browser/gtk/go_button_gtk.cc ('k') | chrome/browser/gtk/toolbar_star_toggle_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698