1 # HG changeset patch |
1 # HG changeset patch |
2 # Parent 1fccdb56cf307cef5ddd39ece2ac58c93fe706b8 |
2 # Parent a15b45ae85ab486503a1a09252734b80fe782998 |
3 Description: Add KDE integration to Firefox (toolkit parts) |
3 Description: Add KDE integration to Firefox (toolkit parts) |
4 Author: Wolfgang Rosenauer <wolfgang@rosenauer.org> |
4 Author: Wolfgang Rosenauer <wolfgang@rosenauer.org> |
5 Author: Lubos Lunak <lunak@suse.com> |
5 Author: Lubos Lunak <lunak@suse.com> |
6 Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=140751 |
6 Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=140751 |
7 https://bugzilla.novell.com/show_bug.cgi?id=170055 |
7 https://bugzilla.novell.com/show_bug.cgi?id=170055 |
1622 + // Only animate if we've switched between prefpanes |
1622 + // Only animate if we've switched between prefpanes |
1623 + if (this._shouldAnimate && oldPane.id != aPaneElement.id) { |
1623 + if (this._shouldAnimate && oldPane.id != aPaneElement.id) { |
1624 + aPaneElement.style.opacity = 0.0; |
1624 + aPaneElement.style.opacity = 0.0; |
1625 + this.animate(oldPane, aPaneElement); |
1625 + this.animate(oldPane, aPaneElement); |
1626 + } else if (!this._shouldAnimate && prefpanes.length > 1) { |
1626 + } else if (!this._shouldAnimate && prefpanes.length > 1) { |
1627 + var targetHeight = parseInt(window.getComputedStyle(this._paneDeckContainer, "").height); |
1627 + var targetHeight = parseInt(window.getComputedStyle(this._paneDeckContainer).height); |
1628 + var verticalPadding = parseInt(window.getComputedStyle(aPaneElement, "").paddingTop); |
1628 + var verticalPadding = parseInt(window.getComputedStyle(aPaneElement).paddingTop); |
1629 + verticalPadding += parseInt(window.getComputedStyle(aPaneElement, "").paddingBottom); |
1629 + verticalPadding += parseInt(window.getComputedStyle(aPaneElement).paddingBottom); |
1630 + if (aPaneElement.contentHeight > targetHeight - verticalPadding) { |
1630 + if (aPaneElement.contentHeight > targetHeight - verticalPadding) { |
1631 + // To workaround the bottom border of a groupbox from being |
1631 + // To workaround the bottom border of a groupbox from being |
1632 + // cutoff an hbox with a class of bottomBox may enclose it. |
1632 + // cutoff an hbox with a class of bottomBox may enclose it. |
1633 + // This needs to include its padding to resize properly. |
1633 + // This needs to include its padding to resize properly. |
1634 + // See bug 394433 |
1634 + // See bug 394433 |
1635 + var bottomPadding = 0; |
1635 + var bottomPadding = 0; |
1636 + var bottomBox = aPaneElement.getElementsByAttribute("class", "bottomBox")[0]; |
1636 + var bottomBox = aPaneElement.getElementsByAttribute("class", "bottomBox")[0]; |
1637 + if (bottomBox) |
1637 + if (bottomBox) |
1638 + bottomPadding = parseInt(window.getComputedStyle(bottomBox, "").paddingBottom); |
1638 + bottomPadding = parseInt(window.getComputedStyle(bottomBox).paddingBottom); |
1639 + window.innerHeight += bottomPadding + verticalPadding + aPaneElement.contentHeight - targetHeight; |
1639 + window.innerHeight += bottomPadding + verticalPadding + aPaneElement.contentHeight - targetHeight; |
1640 + } |
1640 + } |
1641 + |
1641 + |
1642 + // XXX rstrong - extend the contents of the prefpane to |
1642 + // XXX rstrong - extend the contents of the prefpane to |
1643 + // prevent elements from being cutoff (see bug 349098). |
1643 + // prevent elements from being cutoff (see bug 349098). |
1717 + aTimer.cancel(); |
1717 + aTimer.cancel(); |
1718 + this._setUpFadeTimer(); |
1718 + this._setUpFadeTimer(); |
1719 + } |
1719 + } |
1720 + } else if (aTimer == this._fadeTimer) { |
1720 + } else if (aTimer == this._fadeTimer) { |
1721 + var elt = document.getElementById(this.lastSelected); |
1721 + var elt = document.getElementById(this.lastSelected); |
1722 + var newOpacity = parseFloat(window.getComputedStyle(elt, "").opacity) + this._fadeIncrement; |
1722 + var newOpacity = parseFloat(window.getComputedStyle(elt).opacity) + this._fadeIncrement; |
1723 + if (newOpacity < 1.0) |
1723 + if (newOpacity < 1.0) |
1724 + elt.style.opacity = newOpacity; |
1724 + elt.style.opacity = newOpacity; |
1725 + else { |
1725 + else { |
1726 + aTimer.cancel(); |
1726 + aTimer.cancel(); |
1727 + elt.style.opacity = 1.0; |
1727 + elt.style.opacity = 1.0; |
2085 + </body> |
2085 + </body> |
2086 + </method> |
2086 + </method> |
2087 + |
2087 + |
2088 + <property name="contentHeight"> |
2088 + <property name="contentHeight"> |
2089 + <getter> |
2089 + <getter> |
2090 + var targetHeight = parseInt(window.getComputedStyle(this._content, "").height); |
2090 + var targetHeight = parseInt(window.getComputedStyle(this._content).height); |
2091 + targetHeight += parseInt(window.getComputedStyle(this._content, "").marginTop); |
2091 + targetHeight += parseInt(window.getComputedStyle(this._content).marginTop); |
2092 + targetHeight += parseInt(window.getComputedStyle(this._content, "").marginBottom); |
2092 + targetHeight += parseInt(window.getComputedStyle(this._content).marginBottom); |
2093 + return targetHeight; |
2093 + return targetHeight; |
2094 + </getter> |
2094 + </getter> |
2095 + </property> |
2095 + </property> |
2096 + <field name="_content"> |
2096 + <field name="_content"> |
2097 + document.getAnonymousElementByAttribute(this, "class", "content-box"); |
2097 + document.getAnonymousElementByAttribute(this, "class", "content-box"); |