summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/location_bar_view_gtk.cc
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-29 23:23:25 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-29 23:23:25 +0000
commit7e9c5769dd8aaa4a72f2d272d17fbe57703cd143 (patch)
tree5a8f8cc41710d53c2d8d0a52c8e7dd45a3f23135 /chrome/browser/gtk/location_bar_view_gtk.cc
parentf7a684345d7bfa3ebcabdadecef3c720c7ac6812 (diff)
downloadchromium_src-7e9c5769dd8aaa4a72f2d272d17fbe57703cd143.zip
chromium_src-7e9c5769dd8aaa4a72f2d272d17fbe57703cd143.tar.gz
chromium_src-7e9c5769dd8aaa4a72f2d272d17fbe57703cd143.tar.bz2
GTK Themes: Native omnibox part 2.
Put the star and go/stop buttons inside the location bar drawing. Reverts my changes to location_bar_view_gtk.cc in the previous patch. (Showed mocks of this to Ben and Glen.) Also fixes rendering of the location bar background under Crux and other themes that draw an entry_bg. Review URL: http://codereview.chromium.org/159610 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22018 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/location_bar_view_gtk.cc')
-rw-r--r--chrome/browser/gtk/location_bar_view_gtk.cc33
1 files changed, 0 insertions, 33 deletions
diff --git a/chrome/browser/gtk/location_bar_view_gtk.cc b/chrome/browser/gtk/location_bar_view_gtk.cc
index d2d1346..8988f47f 100644
--- a/chrome/browser/gtk/location_bar_view_gtk.cc
+++ b/chrome/browser/gtk/location_bar_view_gtk.cc
@@ -120,13 +120,9 @@ LocationBarViewGtk::LocationBarViewGtk(CommandUpdater* command_updater,
LocationBarViewGtk::~LocationBarViewGtk() {
// All of our widgets should have be children of / owned by the alignment.
hbox_.Destroy();
-
- offscreen_entry_.Destroy();
}
void LocationBarViewGtk::Init(bool popup_window_mode) {
- offscreen_entry_.Own(gtk_entry_new());
-
popup_window_mode_ = popup_window_mode;
location_entry_.reset(new AutocompleteEditViewGtk(this,
toolbar_model_,
@@ -445,35 +441,6 @@ gboolean LocationBarViewGtk::HandleExpose(GtkWidget* widget,
}
g_object_unref(gc);
- } else {
- // Make sure our fake entry has the correct base color if we're in secure
- // mode.
- gtk_widget_modify_base(
- offscreen_entry_.get(), GTK_STATE_NORMAL,
- (toolbar_model_->GetSchemeSecurityLevel() == ToolbarModel::SECURE) ?
- &kBackgroundColorByLevel[ToolbarModel::SECURE] : NULL);
-
- GtkStyle* gtk_owned_style = gtk_rc_get_style(offscreen_entry_.get());
- // GTK owns the above and we're going to have to make our own copy of it
- // that we can edit.
- GtkStyle* our_style = gtk_style_copy(gtk_owned_style);
- our_style = gtk_style_attach(our_style, hbox_->window);
-
- // TODO(erg): Draw the focus ring if appropriate...
-
- // We're using GTK rendering; draw a GTK entry widget onto the background.
- gtk_paint_shadow(our_style, hbox_->window,
- GTK_STATE_NORMAL, GTK_SHADOW_NONE, NULL,
- hbox_.get(), "entry",
- inner_rect.x, inner_rect.y, inner_rect.width,
- inner_rect.height);
-
- // TODO(erg): The above works for Clearlooks and most theme engines, but
- // doesn't draw a background in Crux and some other engines. This requires
- // a separate gtk_paint_flat_box() call, and some math to calculate where
- // to draw the flat box.
-
- g_object_unref(our_style);
}
return FALSE; // Continue propagating the expose.