diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-29 21:33:52 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-29 21:33:52 +0000 |
commit | 91278f54c960acba09c108772c1971693387d0e9 (patch) | |
tree | 5aec557407a4dfb09a969d5b8967e17e06666cbb /chrome/browser/gtk/slide_animator_gtk.h | |
parent | e9eef651790d9ef810cf9bc22a69b02868e0b0cc (diff) | |
download | chromium_src-91278f54c960acba09c108772c1971693387d0e9.zip chromium_src-91278f54c960acba09c108772c1971693387d0e9.tar.gz chromium_src-91278f54c960acba09c108772c1971693387d0e9.tar.bz2 |
Fix SlideAnimatorGtk::OpenWithoutAnimation().
We weren't sizing the GtkFixed widget because the animation delegate callbacks weren't being called. Now we artificially call AnimationProgressed() once we know what size the GtkFixed should be.
TEST=switching back to a tab that has an infobar open should properly display that infobar.
Review URL: http://codereview.chromium.org/99110
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14893 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/slide_animator_gtk.h')
-rw-r--r-- | chrome/browser/gtk/slide_animator_gtk.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/chrome/browser/gtk/slide_animator_gtk.h b/chrome/browser/gtk/slide_animator_gtk.h index 054e9ec..bb8d0a9 100644 --- a/chrome/browser/gtk/slide_animator_gtk.h +++ b/chrome/browser/gtk/slide_animator_gtk.h @@ -9,14 +9,14 @@ #ifndef CHROME_BROWSER_GTK_SLIDE_ANIMATOR_GTK_H_ #define CHROME_BROWSER_GTK_SLIDE_ANIMATOR_GTK_H_ +#include <gtk/gtk.h> + #include "base/scoped_ptr.h" #include "chrome/common/animation.h" #include "chrome/common/owned_widget_gtk.h" class SlideAnimation; -typedef struct _GtkWidget GtkWidget; - class SlideAnimatorGtk : public AnimationDelegate { public: class Delegate { @@ -64,6 +64,10 @@ class SlideAnimatorGtk : public AnimationDelegate { void AnimationEnded(const Animation* animation); private: + static void OnChildSizeAllocate(GtkWidget* child, + GtkAllocation* allocation, + SlideAnimatorGtk* slider); + scoped_ptr<SlideAnimation> animation_; // The top level widget of the SlideAnimatorGtk. It is a GtkFixed. @@ -78,6 +82,10 @@ class SlideAnimatorGtk : public AnimationDelegate { // The object to inform about certain events. It may be NULL. Delegate* delegate_; + + // If true, we should resize |widget_| on the next "size-allocate" event that + // is received by |child_|. See the comment in SlideAnimatorGtk constructor. + bool fixed_needs_resize_; }; #endif // CHROME_BROWSER_GTK_SLIDE_ANIMATOR_GTK_H_ |