From 04b8ac814d9cb2fdcde396e680aed1390b107e3d Mon Sep 17 00:00:00 2001 From: "joshmoz%gmail.com" Date: Mon, 9 Apr 2007 22:30:23 +0000 Subject: [PATCH] use native window resize animation API for Mac OS X preferences. b=355177 r=sspitzer r=enn git-svn-id: svn://10.0.0.236/trunk@224326 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/toolkit/content/widgets/preferences.xml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/mozilla/toolkit/content/widgets/preferences.xml b/mozilla/toolkit/content/widgets/preferences.xml index 0ed2de2acea..57f1023b222 100644 --- a/mozilla/toolkit/content/widgets/preferences.xml +++ b/mozilla/toolkit/content/widgets/preferences.xml @@ -744,9 +744,20 @@ // Don't let the new pane content flex to the current window // height if we're animating aPaneElement.removeAttribute("flex"); - +#ifdef XP_MACOSX + try { + window.animatedResize = window.RESIZE_ANIMATION_SLIDE; + // New height is the new pane's size plus the size of the pane selection bar + var newHeight = aPaneElement.contentHeight + (window.innerHeight - oldPane.contentHeight); + window.innerHeight = newHeight; + this._currentHeight = newHeight; + window.animatedResize = window.RESIZE_ANIMATION_OFF; + } + catch (e) { } +#else aPaneElement.style.opacity = 0.0; this.animate(oldPane, aPaneElement); +#endif } } break;