mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-02-05 03:14:44 +00:00
Drop Firefox specific code
This change improves the responsiveness while resizing panels. The code was intended to fix bugs in really old versions of Firefox.
This commit is contained in:
parent
e83e46b08a
commit
465ff473f1
File diff suppressed because one or more lines are too long
@ -1626,15 +1626,6 @@ MUI.Window = new Class({
|
|||||||
this.windowEl.setStyle('backgroundImage', 'url(../images/spacer.gif)');
|
this.windowEl.setStyle('backgroundImage', 'url(../images/spacer.gif)');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((this.options.type == 'modal' || options.type == 'modal2' ) && Browser.Platform.mac && Browser.Engine.gecko){
|
|
||||||
if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)) {
|
|
||||||
var ffversion = new Number(RegExp.$1);
|
|
||||||
if (ffversion < 3) {
|
|
||||||
this.windowEl.setStyle('position', 'fixed');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (options.loadMethod == 'iframe') {
|
if (options.loadMethod == 'iframe') {
|
||||||
options.padding = { top: 0, right: 0, bottom: 0, left: 0 };
|
options.padding = { top: 0, right: 0, bottom: 0, left: 0 };
|
||||||
}
|
}
|
||||||
@ -2135,20 +2126,8 @@ MUI.Window = new Class({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
resizeOnDrag: function(){
|
resizeOnDrag: function(){
|
||||||
// Fix for a rendering glitch in FF when resizing a window with panels in it
|
|
||||||
if (Browser.Engine.gecko) {
|
|
||||||
this.windowEl.getElements('.panel').each(function(panel){
|
|
||||||
panel.store('oldOverflow', panel.getStyle('overflow'));
|
|
||||||
panel.setStyle('overflow', 'visible');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
this.drawWindow();
|
this.drawWindow();
|
||||||
this.adjustHandles();
|
this.adjustHandles();
|
||||||
if (Browser.Engine.gecko) {
|
|
||||||
this.windowEl.getElements('.panel').each(function(panel){
|
|
||||||
panel.setStyle('overflow', panel.retrieve('oldOverflow')); // Fix for a rendering bug in FF
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
resizeOnComplete: function(){
|
resizeOnComplete: function(){
|
||||||
$('windowUnderlay').hide();
|
$('windowUnderlay').hide();
|
||||||
@ -2460,16 +2439,6 @@ MUI.Window = new Class({
|
|||||||
cache.overlayEl.setStyle('zIndex', 2);
|
cache.overlayEl.setStyle('zIndex', 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
// For Mac Firefox 2 to help reduce scrollbar bugs in that browser
|
|
||||||
if (Browser.Platform.mac && Browser.Engine.gecko){
|
|
||||||
if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)){
|
|
||||||
var ffversion = new Number(RegExp.$1);
|
|
||||||
if (ffversion < 3){
|
|
||||||
cache.overlayEl.setStyle('overflow', 'auto');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (options.resizable){
|
if (options.resizable){
|
||||||
cache.n = new Element('div', {
|
cache.n = new Element('div', {
|
||||||
'id': id + '_resizeHandle_n',
|
'id': id + '_resizeHandle_n',
|
||||||
@ -5401,17 +5370,7 @@ function addResizeRight(element, min, max){
|
|||||||
element.getNext('.column').getElements('iframe').setStyle('visibility', 'hidden');
|
element.getNext('.column').getElements('iframe').setStyle('visibility', 'hidden');
|
||||||
}.bind(this),
|
}.bind(this),
|
||||||
onDrag: function(){
|
onDrag: function(){
|
||||||
if (Browser.Engine.gecko) {
|
|
||||||
$$('.panel').each(function(panel){
|
|
||||||
if (panel.getElements('.mochaIframe').length == 0) {
|
|
||||||
panel.hide(); // Fix for a rendering bug in FF
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
MUI.rWidth(element.getParent());
|
MUI.rWidth(element.getParent());
|
||||||
if (Browser.Engine.gecko) {
|
|
||||||
$$('.panel').show(); // Fix for a rendering bug in FF
|
|
||||||
}
|
|
||||||
if (Browser.Engine.trident4) {
|
if (Browser.Engine.trident4) {
|
||||||
element.getChildren().each(function(el){
|
element.getChildren().each(function(el){
|
||||||
var width = $(element).getStyle('width').toInt();
|
var width = $(element).getStyle('width').toInt();
|
||||||
@ -6071,16 +6030,6 @@ MUI.Dock = {
|
|||||||
instance.toolbarWrapperEl.hide();
|
instance.toolbarWrapperEl.hide();
|
||||||
}
|
}
|
||||||
windowEl.setStyle('visibility', 'hidden');
|
windowEl.setStyle('visibility', 'hidden');
|
||||||
|
|
||||||
// Fixes a scrollbar issue in Mac FF2
|
|
||||||
if (Browser.Platform.mac && Browser.Engine.gecko){
|
|
||||||
if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)){
|
|
||||||
var ffversion = new Number(RegExp.$1);
|
|
||||||
if (ffversion < 3) {
|
|
||||||
instance.contentWrapperEl.setStyle('overflow', 'hidden');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MUI.Desktop.setDesktopSize();
|
MUI.Desktop.setDesktopSize();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user