Results 1 to 3 of 3

Thread: Overriding TitleBar/Toolbar default heights

  1. #1
    Sencha Premium Member
    Join Date
    Dec 2011
    Location
    Denver, CO, USA
    Posts
    2
    Vote Rating
    0
      0  

    Default Answered: Overriding TitleBar/Toolbar default heights

    I noticed the following in the release notes for Sencha Touch 2.1.0-b2: "TitleBar/Toolbar now have default height instead of pure CSS." A couple questions:

    • Why was the decision made to hard-code the TitleBar.height and Toolbar.minHeight?
    • Is there a way to override these default values on a project-wide basis?

    Our software was written in Touch 2.0.x and overrode .x-toolbar for a fixed height of 2.2em unfortunately there's no way to override the default 2.6em height from within the stylesheet. I understand we could set this value whenever we instantiate TitleBar or Toolbar, but it gets hairy with controls such as NestedList.

    Any guidance/insight would be much appreciated!

  2. Code:
    Ext.define('Override.Toolbar', {
        override : 'Ext.Toolbar',
    
        config : {
            minHeight : '2.2em'
        }
    });
    
    Ext.define('Override.TitleBar', {
        override : 'Ext.TitleBar',
    
        config : {
            height : '2.2em'
        }
    });

  3. #2
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,050
    Answers
    3976
    Vote Rating
    1381
      0  

    Default

    Code:
    Ext.define('Override.Toolbar', {
        override : 'Ext.Toolbar',
    
        config : {
            minHeight : '2.2em'
        }
    });
    
    Ext.define('Override.TitleBar', {
        override : 'Ext.TitleBar',
    
        config : {
            height : '2.2em'
        }
    });
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  4. #3
    Sencha Premium Member
    Join Date
    Dec 2011
    Location
    Denver, CO, USA
    Posts
    2
    Vote Rating
    0
      0  

    Default

    Awesome! Thanks for the quick reply.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •