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-04-29 21:17:36 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-29 21:17:36 +0000
commitf3089a667ef63143572a19a0ade9644d38cd3757 (patch)
tree7b41855722bf3d2459c5e7647fcca3b35f13540c /chrome/browser/gtk/find_bar_gtk.h
parentb4d31364cc189369cff90e95167bfff5f94dbcaf (diff)
downloadchromium_src-f3089a667ef63143572a19a0ade9644d38cd3757.zip
chromium_src-f3089a667ef63143572a19a0ade9644d38cd3757.tar.gz
chromium_src-f3089a667ef63143572a19a0ade9644d38cd3757.tar.bz2
Linux findbar improvements:
* clean up toolbar/infobar/findbar borders * move findbar to BrowserWindowGtk's vbox (so it stacks on top of infobar, as on windows) * properly show findbar when switching between tabs Review URL: http://codereview.chromium.org/99166 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14885 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/find_bar_gtk.h')
-rw-r--r--chrome/browser/gtk/find_bar_gtk.h24
1 files changed, 21 insertions, 3 deletions
diff --git a/chrome/browser/gtk/find_bar_gtk.h b/chrome/browser/gtk/find_bar_gtk.h
index 07aa76f..eedbcdf 100644
--- a/chrome/browser/gtk/find_bar_gtk.h
+++ b/chrome/browser/gtk/find_bar_gtk.h
@@ -32,7 +32,7 @@ class FindBarGtk : public FindBar,
// Callback when Escape is pressed.
void EscapePressed();
- GtkWidget* widget() const { return container_.get(); }
+ GtkWidget* widget() const { return fixed_.get(); }
// Methods from FindBar.
virtual FindBarController* GetFindBarController() const {
@@ -61,14 +61,32 @@ class FindBarGtk : public FindBar,
virtual bool GetFindBarWindowInfo(gfx::Point* position,
bool* fully_visible);
+ // Make sure the find bar is foremost on the z axis in the widget hierarchy
+ // by hiding and showing it.
+ void AssureOnTop();
+
private:
void InitWidgets();
// Callback for previous, next, and close button.
static void OnButtonPressed(GtkWidget* button, FindBarGtk* find_bar);
- // GtkHBox containing the find bar widgets.
- OwnedWidgetGtk container_;
+ // Called when |fixed_| changes sizes. Used to position |container_|.
+ static void OnSizeAllocate(GtkWidget* fixed,
+ GtkAllocation* allocation,
+ FindBarGtk* container_);
+
+ // GtkFixed containing the find bar widgets.
+ OwnedWidgetGtk fixed_;
+
+ // An event box which shows the background for |fixed_|. We could just set
+ // |fixed_| to have its own GdkWindow and draw the background directly, but
+ // 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.).
+ GtkWidget* container_;
// The widget where text is entered.
GtkWidget* find_text_;