-
26 Apr 2012 3:39 AM #1
First button in titlebar gets too width
First button in titlebar gets too width
When my titlebar has a width of 400px or more, everything looks fine. But when I resize my browser window to less than 400px width, the first element of the title bar becomes too width.
I tried to give it a fixed width, but that is ignored.
Ok:
Not ok:
I was wondering if it's a bug or if I am doing something wrong.
I'm using Sencha 2.0.1 and here is my code:
Code:
config:
{
styleHtmlContent: true,
height: '100%',
layout: { type: 'vbox', pack: 'start', align: 'center' },
items: [
{ xtype: 'titlebar',
height: '100%',
docked: 'top',
items: [
{ xtype: 'button', iconCls: 'stopall', iconMask: true', align: 'left' },
{ xtype: 'button', iconCls: 'blankscr', iconMask: true, align: 'left' },
{ xtype: 'button', iconCls: 'restricted', iconMask: true, align: 'left' },
{ xtype: 'button', iconCls: 'classview', iconMask: true, align: 'right'},
{ xtype: 'button', iconCls: 'listview', iconMask: true, align: 'right'}
]
}
]
}
-
26 Apr 2012 6:38 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,599
- Vote Rating
- 434
Interesting. here is a full test case:
As you said, when the browser is resized smaller, the width of the first button gets set to a width. It should remain as auto.Code:new Ext.Container({ fullscreen : true, items : [ { xtype : 'titlebar', docked : 'top', items : [ { text : 'One', align : 'left' }, { text : 'Two', align : 'left' }, { text : 'Three', align : 'left' }, { text : 'Four', align : 'right' }, { text : 'Five', align : 'right' } ] } ] });Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
26 Apr 2012 7:19 AM #3Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Redwood City, California
- Posts
- 3,651
- Vote Rating
- 14
If you aren't using a Title, you should probably be using a Toolbar. It's going to be doing an awful lot of work behind the scenes to center something that doesn't exist.
-
12 Jun 2012 2:44 PM #4
Fixed for the next release. Thank you.
Sencha Inc.
Robert Dougan - @rdougan
Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.
Success! Looks like we've fixed this one. According to our records the fix was applied for
TOUCH-2838
in
Sprint 22 (2.0.2).


Reply With Quote