PDA

View Full Version : [FIXED] Child panels with padding in border layout do not minimise correctly



ryanc
17 Nov 2011, 12:11 PM
REQUIRED INFORMATIONExt version tested:

Ext 4.0 rev 7
Browser versions tested against:

Chrome
DOCTYPE tested against:

____
Description:

Create a border layout
In one of the regions create a child panel which can be minimised with padding
When the child panel is minimised the title bar is clipped
If padding is removed the minimise works correctly
Steps to reproduce the problem:

see above
The result that was expected:

The title bar is intact
The result that occurs instead:

The title bar is clipped
Test Case:
Ext.application({ name: 'HelloExt',
launch: function() {
Ext.create('Ext.container.Viewport', {
layout: 'fit',
items: [
Ext.create('Ext.panel.Panel', {
width: 500,
height: 400,
title: 'Border Layout',
layout: 'border',
items: [{
title: 'South Region is resizable',
region: 'south', // position for region
xtype: 'panel',
height: 100,
split: true, // enable resizing
margins: '0 5 5 5'
},{
// xtype: 'panel' implied by default
title: 'Click here when minimised',
region:'west',
xtype: 'panel',
margins: '5 0 0 5',
width: 200,
collapsible: true, // make collapsible
id: 'west-region-container',
layout: 'fit'
},{
title: 'Center Region',
region: 'center', // center region is required, no width/height specified
xtype: 'panel',
layout: {
type: 'vbox',
align: 'stretch',
},
items: [{
xtype: 'panel',
title: 'Does not minimise correctly',
width: 300,
collapsible: true,
closable: true,
layout: 'fit',
padding: '10 0 3 10',
html: 'test content'
},
{
xtype: 'panel',
title: 'Spacer to illustrate effect',
width: 300,
collapsible: true,
closable: true,
layout: 'fit',
padding: '10 0 3 10',
html: 'test content'
},
{
xtype: 'panel',
title: 'Minimises correctly',
width: 300,
collapsible: true,
closable: true,
layout: 'fit',
html: 'test content'
}]
}],
})
]
});
}
});HELPFUL INFORMATIONScreenshot or Video:

attached
See this URL for live test case: http://Debugging already done:

none
Possible fix:

don't use padding
Additional CSS used:

only default ext-all.css
custom css (include details)
Operating System:

Windows 2003

mitchellsimoens
19 Nov 2011, 2:48 PM
Thank you for the report. btw, you are overnesting too. The Viewport could use the border layout and then you can get ride of that Panel and have the items on the viewport.