diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-17 18:50:17 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-17 18:50:17 +0000 |
commit | 83e5ec4e02e2c061793488b7bbc5bb83ae6c7c97 (patch) | |
tree | 05d14ee1a3b92d1c8c8e9290aad9072f53b4c5b0 /chrome | |
parent | dfa46e5f7c326aeb31d242599c367e73b0d85770 (diff) | |
download | chromium_src-83e5ec4e02e2c061793488b7bbc5bb83ae6c7c97.zip chromium_src-83e5ec4e02e2c061793488b7bbc5bb83ae6c7c97.tar.gz chromium_src-83e5ec4e02e2c061793488b7bbc5bb83ae6c7c97.tar.bz2 |
Attempt 2 at fixing white flash in switching between ntp and non-ntp.
BUG=27898
TEST=make sure tab switching on chrome os doesn't result in any visual
artifacts, especially when switching between ntp and non-ntp.
Review URL: http://codereview.chromium.org/404005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32189 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/gtk/bookmark_bar_gtk.cc | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/chrome/browser/gtk/bookmark_bar_gtk.cc b/chrome/browser/gtk/bookmark_bar_gtk.cc index d0f1cf0..7c22ccd 100644 --- a/chrome/browser/gtk/bookmark_bar_gtk.cc +++ b/chrome/browser/gtk/bookmark_bar_gtk.cc @@ -311,10 +311,6 @@ void BookmarkBarGtk::Show(bool animate) { } void BookmarkBarGtk::Hide(bool animate) { -#if defined(OS_CHROMEOS) - bool was_floating = floating_; -#endif - UpdateFloatingState(); // After coming out of fullscreen, the browser window sets the bookmark bar @@ -328,19 +324,6 @@ void BookmarkBarGtk::Hide(bool animate) { gtk_widget_hide(bookmark_hbox_); slide_animation_->Reset(0); AnimationProgressed(slide_animation_.get()); - -#if defined(OS_CHROMEOS) - if (floating_ != was_floating) { - // For some reason when switching between ntp and non-ntp (and other - // similar scenarios) the bookmark bar gets layed out a size of 1x1 and we - // get painting artifacts across the top of the window. By forcing a - // layout now we ensure the bookmark bar isn't sized to 1x1. This may not - // be specific to chromeos, but that's how we're scoping it for now. - GtkWidget* parent = gtk_widget_get_parent(widget()); - if (parent) - gtk_widget_size_allocate(parent, &parent->allocation); - } -#endif } } @@ -602,7 +585,9 @@ void BookmarkBarGtk::UpdateFloatingState() { return; if (floating_) { +#if !defined(OS_CHROMEOS) gtk_event_box_set_visible_window(GTK_EVENT_BOX(paint_box_), TRUE); +#endif GdkColor stroke_color = theme_provider_->UseGtkTheme() ? theme_provider_->GetBorderColor() : theme_provider_->GetGdkColor(BrowserThemeProvider::COLOR_NTP_HEADER); @@ -615,7 +600,9 @@ void BookmarkBarGtk::UpdateFloatingState() { gtk_container_set_border_width(GTK_CONTAINER(bookmark_hbox_), kNTPPadding); } else { gtk_util::StopActingAsRoundedWindow(paint_box_); +#if !defined(OS_CHROMEOS) gtk_event_box_set_visible_window(GTK_EVENT_BOX(paint_box_), FALSE); +#endif gtk_alignment_set_padding(GTK_ALIGNMENT(ntp_padding_box_), 0, 0, 0, 0); gtk_container_set_border_width(GTK_CONTAINER(bookmark_hbox_), 0); } @@ -655,8 +642,11 @@ void BookmarkBarGtk::UpdateEventBoxPaintability() { // When using the GTK+ theme, we need to have the event box be visible so // buttons don't get a halo color from the background. When using Chromium // themes, we want to let the background show through the toolbar. + +#if !defined(OS_CHROMEOS) gtk_event_box_set_visible_window(GTK_EVENT_BOX(event_box_.get()), theme_provider_->UseGtkTheme()); +#endif } void BookmarkBarGtk::PaintEventBox() { |