summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/find_bar_gtk.h
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-01 22:44:56 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-01 22:44:56 +0000
commit36c165e203d4ddf415c29b865b4c13f0b9f32d38 (patch)
tree7d6b208cf21fa0cfd326d25a873857f25504555c /chrome/browser/gtk/find_bar_gtk.h
parent5f594c011f9da68070a44cf3a97b411efa90d7c3 (diff)
downloadchromium_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/find_bar_gtk.h')
-rw-r--r--chrome/browser/gtk/find_bar_gtk.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/chrome/browser/gtk/find_bar_gtk.h b/chrome/browser/gtk/find_bar_gtk.h
index a25d5be..90b0338 100644
--- a/chrome/browser/gtk/find_bar_gtk.h
+++ b/chrome/browser/gtk/find_bar_gtk.h
@@ -15,6 +15,7 @@
class BrowserWindowGtk;
class CustomDrawButton;
class FindBarController;
+class SlideAnimatorGtk;
class TabContentsContainerGtk;
class WebContents;
@@ -68,10 +69,15 @@ class FindBarGtk : public FindBar,
private:
void InitWidgets();
+ // Returns the child of |fixed_| that holds what the user perceives as the
+ // findbar.
+ GtkWidget* slide_widget();
+
// Callback for previous, next, and close button.
static void OnButtonPressed(GtkWidget* button, FindBarGtk* find_bar);
- // Called when |fixed_| changes sizes. Used to position |container_|.
+ // Called when |fixed_| changes sizes. Used to position the dialog (the
+ // "dialog" is the widget hierarchy rooted at |slide_widget_|).
static void OnFixedSizeAllocate(GtkWidget* fixed,
GtkAllocation* allocation,
FindBarGtk* findbar);
@@ -81,7 +87,6 @@ class FindBarGtk : public FindBar,
GtkAllocation* allocation,
FindBarGtk* findbar);
-
// GtkFixed containing the find bar widgets.
OwnedWidgetGtk fixed_;
@@ -90,8 +95,10 @@ class FindBarGtk : public FindBar,
// then |container_| would clip to the bounds of |fixed_|.
GtkWidget* border_;
- // A GtkAlignment which holds what the user perceives as the findbar (the text
- // field, the buttons, etc.).
+ // The widget that animates the slide-in and -out of the findbar.
+ scoped_ptr<SlideAnimatorGtk> slide_widget_;
+
+ // A GtkAlignment that is the child of |slide_widget_|.
GtkWidget* container_;
// This will be set to true after ContourWidget() has been called so we don't