Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1172)

Unified Diff: chrome/browser/gtk/find_bar_gtk.h

Issue 99166: Linux findbar improvements:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/gtk/browser_window_gtk.cc ('k') | chrome/browser/gtk/find_bar_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/find_bar_gtk.h
===================================================================
--- chrome/browser/gtk/find_bar_gtk.h (revision 14854)
+++ chrome/browser/gtk/find_bar_gtk.h (working copy)
@@ -32,7 +32,7 @@
// 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,15 +61,33 @@
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_;
« no previous file with comments | « chrome/browser/gtk/browser_window_gtk.cc ('k') | chrome/browser/gtk/find_bar_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698