mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-09 18:08:39 +00:00
improve the ToggleField widget, having the checkbox to the left of the
field rather than above it
This commit is contained in:
parent
a6c6d5b2b4
commit
47b5274f34
3 changed files with 12 additions and 13 deletions
|
@ -6,7 +6,8 @@
|
||||||
* Apply patch from adios fixing the cookie date
|
* Apply patch from adios fixing the cookie date
|
||||||
* Add tooltips to the statusbar items
|
* Add tooltips to the statusbar items
|
||||||
* Add disk usage to the statusbar
|
* Add disk usage to the statusbar
|
||||||
|
* Add a ToggleField widget and use this on the Downloads preferences
|
||||||
|
page allowing the movecom/copytorrent/autoadd boxes to be enabled.
|
||||||
|
|
||||||
==== GtkUI ====
|
==== GtkUI ====
|
||||||
* Attempt to register as the default magnet uri handler in GNOME on startup
|
* Attempt to register as the default magnet uri handler in GNOME on startup
|
||||||
|
|
|
@ -32,13 +32,10 @@ Ext.ux.form.ToggleField = Ext.extend(Ext.form.Field, {
|
||||||
initComponent: function() {
|
initComponent: function() {
|
||||||
Ext.ux.form.ToggleField.superclass.initComponent.call(this);
|
Ext.ux.form.ToggleField.superclass.initComponent.call(this);
|
||||||
|
|
||||||
this.toggle = new Ext.form.Checkbox({
|
this.toggle = new Ext.form.Checkbox();
|
||||||
region: 'west'
|
|
||||||
});
|
|
||||||
this.toggle.on('check', this.onToggleCheck, this);
|
this.toggle.on('check', this.onToggleCheck, this);
|
||||||
|
|
||||||
this.input = new Ext.form.TextField({
|
this.input = new Ext.form.TextField({
|
||||||
region: 'center',
|
|
||||||
disabled: true
|
disabled: true
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -47,20 +44,21 @@ Ext.ux.form.ToggleField = Ext.extend(Ext.form.Field, {
|
||||||
if (!this.el) {
|
if (!this.el) {
|
||||||
this.panel = new Ext.Panel({
|
this.panel = new Ext.Panel({
|
||||||
cls: this.groupCls,
|
cls: this.groupCls,
|
||||||
layout: 'border',
|
layout: 'table',
|
||||||
|
layoutConfig: {
|
||||||
|
columns: 2
|
||||||
|
},
|
||||||
border: false,
|
border: false,
|
||||||
renderTo: ct
|
renderTo: ct
|
||||||
});
|
});
|
||||||
this.panel.ownerCt = this;
|
this.panel.ownerCt = this;
|
||||||
this.el = this.panel.getEl();
|
this.el = this.panel.getEl();
|
||||||
|
|
||||||
this.toggle.ownerCt = this.panel;
|
this.panel.add(this.toggle);
|
||||||
this.toggle.render(this.el);
|
this.panel.add(this.input);
|
||||||
|
|
||||||
this.input.ownerCt = this.panel;
|
|
||||||
this.input.render(this.el);
|
|
||||||
|
|
||||||
this.panel.doLayout();
|
this.panel.doLayout();
|
||||||
|
|
||||||
|
this.toggle.getEl().parent().setStyle('padding-right', '10px');
|
||||||
}
|
}
|
||||||
Ext.ux.form.ToggleField.superclass.onRender.call(this, ct, position);
|
Ext.ux.form.ToggleField.superclass.onRender.call(this, ct, position);
|
||||||
},
|
},
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue