3 * @class Ext.layout.component.field.File
4 * @extends Ext.layout.component.field.Field
5 * Layout class for {@link Ext.form.field.File} fields. Adjusts the input field size to accommodate
6 * the file picker trigger button.
10 Ext.define('Ext.layout.component.field.File', {
11 alias: ['layout.filefield'],
12 extend: 'Ext.layout.component.field.Field',
16 sizeBodyContents: function(width, height) {
20 if (!owner.buttonOnly) {
21 // Decrease the field's width by the width of the button and the configured buttonMargin.
22 // Both the text field and the button are floated left in CSS so they'll stack up side by side.
23 me.setElementSize(owner.inputEl, Ext.isNumber(width) ? width - owner.button.getWidth() - owner.buttonMargin : width);