Results 1 to 6 of 6

Thread: How are default field widths determined as you switch between themes?

  1. #1
    Sencha Premium Member
    Join Date
    Oct 2015
    Posts
    15

    Question Answered: How are default field widths determined as you switch between themes?

    I'm looking for overrides in the theme packages and don't see them in the JS (for date field for instance). Is this in the css portion of the theme?

    With Triton, by default the date fields seem very wide.

    I assume if an override is wanted on a theme level, the right thing to do is place it in the appropriate sass/src directory for that component. Would the best method be to override the component as part of the theme or use a ui?

  2. Quote Originally Posted by eweiler View Post
    When I switch between the default themes, where is the default width of a date field coming from?
    There are differences in padding on the textfields from theme to theme (for example, Triton seems to have at least 8px extra padding on text fields).

    Thanks!
    Joel

  3. #2
    Sencha User joel.watson's Avatar
    Join Date
    Nov 2014
    Posts
    3,120
    Answers
    446

    Default

    The best approach will depend on the level of change you want to make. If you want to influence every single form field, then yes, a variable (or style rule) override in your theme will probably work the best, and will require the least amount of changes. On the other hand, if you only want to target specific component instances, a custom UI will probably be better as it will only affect the instances that you choose.

    Thanks!
    Joel

  4. #3

  5. #4
    Sencha Premium Member
    Join Date
    Oct 2015
    Posts
    15

    Default

    Quote Originally Posted by joel.watson View Post
    The best approach will depend on the level of change you want to make. If you want to influence every single form field, then yes, a variable (or style rule) override in your theme will probably work the best, and will require the least amount of changes. On the other hand, if you only want to target specific component instances, a custom UI will probably be better as it will only affect the instances that you choose.

    Thanks!
    Joel
    When I switch between the default themes, where is the default width of a date field coming from?

  6. #5
    Sencha User joel.watson's Avatar
    Join Date
    Nov 2014
    Posts
    3,120
    Answers
    446

    Default

    Quote Originally Posted by eweiler View Post
    When I switch between the default themes, where is the default width of a date field coming from?
    There are differences in padding on the textfields from theme to theme (for example, Triton seems to have at least 8px extra padding on text fields).

    Thanks!
    Joel

  7. #6
    Sencha Premium Member
    Join Date
    Oct 2015
    Posts
    15

    Default

    I think the answer to the questions is a css variable on the Date class:

    $form-text-field-body-width

    It says it defaults to 150px in the API.

Similar Threads

  1. [FIXED] Sencha touch 2.3 themes are not installed by default
    By _tmalek in forum Sencha Touch 2.x: Bugs
    Replies: 17
    Last Post: 26 May 2014, 6:17 PM
  2. How to switch themes dynamically without app.json ?
    By sudhirkd in forum Sencha Touch 2.x: Q&A
    Replies: 1
    Last Post: 17 Apr 2014, 10:16 PM
  3. Default mobile themes with Architect
    By flowolf in forum Sencha Architect 2.x: Help & Discussions
    Replies: 1
    Last Post: 19 Apr 2013, 10:07 AM
  4. How can we change the default widths for a PropertyGrid?
    By aendo in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 21 Nov 2007, 5:11 PM

Posting Permissions

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