summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/slide_animator_gtk.cc
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-21 19:57:00 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-21 19:57:00 +0000
commit1ba48dd0630846f6c7e9ebd3ec16335fbb7b8c58 (patch)
tree2b83df446bac218feb31d62e42978be4315d9157 /chrome/browser/gtk/slide_animator_gtk.cc
parent8e0dffdf956edcebcee147e4f7df472fb9bde567 (diff)
downloadchromium_src-1ba48dd0630846f6c7e9ebd3ec16335fbb7b8c58.zip
chromium_src-1ba48dd0630846f6c7e9ebd3ec16335fbb7b8c58.tar.gz
chromium_src-1ba48dd0630846f6c7e9ebd3ec16335fbb7b8c58.tar.bz2
Findbar stuff:
- change dialog shape correctly when theme changes - vertically center the match label in gtk theme mode - update the match label colors when theme changes BUG=19726 Review URL: http://codereview.chromium.org/173176 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24001 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/slide_animator_gtk.cc')
-rw-r--r--chrome/browser/gtk/slide_animator_gtk.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/chrome/browser/gtk/slide_animator_gtk.cc b/chrome/browser/gtk/slide_animator_gtk.cc
index 2d66043..866aca5 100644
--- a/chrome/browser/gtk/slide_animator_gtk.cc
+++ b/chrome/browser/gtk/slide_animator_gtk.cc
@@ -24,6 +24,7 @@ SlideAnimatorGtk::SlideAnimatorGtk(GtkWidget* child,
Direction direction,
int duration,
bool linear,
+ bool control_child_size,
Delegate* delegate)
: child_(child),
direction_(direction),
@@ -32,10 +33,13 @@ SlideAnimatorGtk::SlideAnimatorGtk(GtkWidget* child,
widget_.Own(gtk_fixed_new());
gtk_fixed_put(GTK_FIXED(widget_.get()), child, 0, 0);
gtk_widget_set_size_request(widget_.get(), -1, 0);
- // We have to manually set the size request for |child_| every time the
- // GtkFixed changes sizes.
- g_signal_connect(widget_.get(), "size-allocate",
- G_CALLBACK(OnFixedSizeAllocate), child_);
+ if (control_child_size) {
+ // If the child requests it, we will manually set the size request for
+ // |child_| every time the GtkFixed changes sizes. This is mainly useful
+ // for bars, where we want the child to expand to fill all available space.
+ g_signal_connect(widget_.get(), "size-allocate",
+ G_CALLBACK(OnFixedSizeAllocate), child_);
+ }
// The size of the GtkFixed widget is set during animation. When we open
// without showing the animation, we have to call AnimationProgressed