diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-01 22:44:56 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-01 22:44:56 +0000 |
commit | 36c165e203d4ddf415c29b865b4c13f0b9f32d38 (patch) | |
tree | 7d6b208cf21fa0cfd326d25a873857f25504555c /chrome/browser/gtk/slide_animator_gtk.h | |
parent | 5f594c011f9da68070a44cf3a97b411efa90d7c3 (diff) | |
download | chromium_src-36c165e203d4ddf415c29b865b4c13f0b9f32d38.zip chromium_src-36c165e203d4ddf415c29b865b4c13f0b9f32d38.tar.gz chromium_src-36c165e203d4ddf415c29b865b4c13f0b9f32d38.tar.bz2 |
Make the findbar slide in/out.
Change SlideAnimatorGtk so that its GtkFixed doesn't have its own window. Giving that fixed its own GdkWindow meant that as a client of SlideAnimatorGtk you were pretty much cornered into having rectangular widgets (unless you want to perform a lot of expensive operations during every frame of the slide). We solve the clipping problem this creates by making a "render area" vbox in BrowserWindowGtk that is all part of a single GdkWindow hierarchy.
This isn't yet perfect as there are sometimes occlusion problems with infobars. That will probably need to be solved in the same way it was solved for the tab contents container. This patch is already hard enough to grok, so I'm going to leave that problem for another patch.
Review URL: http://codereview.chromium.org/102021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15112 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 | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/chrome/browser/gtk/slide_animator_gtk.h b/chrome/browser/gtk/slide_animator_gtk.h index bb8d0a9..984827b 100644 --- a/chrome/browser/gtk/slide_animator_gtk.h +++ b/chrome/browser/gtk/slide_animator_gtk.h @@ -5,6 +5,11 @@ // A helper class for animating the display of native widget content. // Currently only handle vertical sliding, but could be extended to handle // horizontal slides or other types of animations. +// +// NOTE: This does not handle clipping. If you are not careful, you will +// wind up with visibly overlapping widgets. If you need clipping, you can +// extend the constructor to take an option to give |fixed| its own GdkWindow +// (via gtk_fixed_set_has_window). #ifndef CHROME_BROWSER_GTK_SLIDE_ANIMATOR_GTK_H_ #define CHROME_BROWSER_GTK_SLIDE_ANIMATOR_GTK_H_ @@ -86,6 +91,12 @@ class SlideAnimatorGtk : public AnimationDelegate { // 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_; + + // We need to move the child widget to (0, -height), but we don't know its + // height until it has been allocated. This variable will be true until the + // child widget has been allocated, at which point we will move it, and then + // set this variable to false to indicate it should not be moved again. + bool child_needs_move_; }; #endif // CHROME_BROWSER_GTK_SLIDE_ANIMATOR_GTK_H_ |