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

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: Sync to latest 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 a86f1fe561906507185ae2443e79cfc73996d6d6..24365c22ddd3a2e4adea3dd3b8395c99fcc9316d 100644
--- a/chrome/browser/ui/panels/panel_browser_window_gtk.cc
+++ b/chrome/browser/ui/panels/panel_browser_window_gtk.cc
@@ -147,7 +147,7 @@ void PanelBrowserWindowGtk::OnSizeChanged(int width, int height) {
int left = bounds_.right() - width;
gtk_window_move(window_, left, top);
- StartBoundsAnimation(bounds_, gfx::Rect(left, top, width, height));
+ StartBoundsAnimation(gfx::Rect(left, top, width, height), bounds_);
panel_->OnWindowSizeAvailable();
content::NotificationService::current()->Notify(
@@ -422,11 +422,17 @@ int PanelBrowserWindowGtk::TitleOnlyHeight() const {
void PanelBrowserWindowGtk::StartBoundsAnimation(
const gfx::Rect& from_bounds, const gfx::Rect& to_bounds) {
- animation_start_bounds_ = from_bounds;
+ if (bounds_animator_.get() && bounds_animator_->is_animating()) {
+ animation_start_bounds_ = last_animation_progressed_bounds_;
+ } else {
+ animation_start_bounds_ = from_bounds;
+ }
bounds_animator_.reset(new PanelSlideAnimation(
this, panel_.get(), from_bounds, to_bounds));
+
bounds_animator_->Show();
+ last_animation_progressed_bounds_ = animation_start_bounds_;
}
bool PanelBrowserWindowGtk::IsAnimatingBounds() const {
@@ -506,6 +512,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