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

Unified Diff: chrome/browser/ui/panels/panel_browser_window_gtk.cc

Issue 8879005: Fix bug where panels sometimes don't align on bottom. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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/ui/panels/panel_browser_window_gtk.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/panels/panel_browser_window_gtk.cc
diff --git a/chrome/browser/ui/panels/panel_browser_window_gtk.cc b/chrome/browser/ui/panels/panel_browser_window_gtk.cc
index d628e3478ed3d2f3d3b40e9d611410af30ec06a4..bb40924568c9581d8886efba176f108b09b8faef 100644
--- a/chrome/browser/ui/panels/panel_browser_window_gtk.cc
+++ b/chrome/browser/ui/panels/panel_browser_window_gtk.cc
@@ -149,6 +149,7 @@ void PanelBrowserWindowGtk::OnSizeChanged(int width, int height) {
int left = bounds_.right() - width;
gtk_window_move(window_, left, top);
+
StartBoundsAnimation(gfx::Rect(left, top, width, height));
panel_->OnWindowSizeAvailable();
@@ -413,16 +414,20 @@ int PanelBrowserWindowGtk::TitleOnlyHeight() const {
void PanelBrowserWindowGtk::StartBoundsAnimation(
const gfx::Rect& current_bounds) {
- animation_start_bounds_ = current_bounds;
+ if (bounds_animator_.get() && bounds_animator_->IsShowing()) {
Dmitry Titov 2011/12/08 19:04:45 should it be is_animating()? I think IsShowing() i
prasadt 2011/12/08 21:41:45 Done.
+ animation_start_bounds_ = last_animation_progressed_bounds_;
+ bounds_animator_->Reset();
Dmitry Titov 2011/12/08 19:04:45 Reset() says it goes back to 0, will it eventually
prasadt 2011/12/08 21:41:45 Done. That line doesn't exist after merging with l
+ } else {
+ animation_start_bounds_ = current_bounds;
+ }
if (!bounds_animator_.get()) {
bounds_animator_.reset(new ui::SlideAnimation(this));
bounds_animator_->SetSlideDuration(kSetBoundsAnimationMs);
}
- if (bounds_animator_->IsShowing())
- bounds_animator_->Reset();
bounds_animator_->Show();
+ last_animation_progressed_bounds_ = animation_start_bounds_;
}
bool PanelBrowserWindowGtk::IsAnimatingBounds() const {
@@ -502,6 +507,8 @@ void PanelBrowserWindowGtk::AnimationProgressed(
(animation_start_bounds_.right() != bounds_.right());
if (move)
gtk_window_move(window_, new_bounds.x(), new_bounds.y());
+
+ last_animation_progressed_bounds_ = new_bounds;
}
void PanelBrowserWindowGtk::CreateDragWidget() {
« no previous file with comments | « chrome/browser/ui/panels/panel_browser_window_gtk.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698