You found a bug! We've classified it as SDKTOOLS-237 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha Premium Member
    Join Date
    Apr 2008
    Posts
    246
    Vote Rating
    23
    themightychris will become famous soon enough themightychris will become famous soon enough

      1  

    Default Howto: use custom pictos with Sencha Touch

    Howto: use custom pictos with Sencha Touch


    This was a pain, and I drew from Steffen Hiller's blog post on this. Follow this procedure to use your own icon masks without having to add them to the SDK's pictos directory and keep everything CMD-friendly:

    1) Add images_path setting after images_dir in MyApp/resources/sass/config.rb

    Code:
    # Require any additional compass plugins here.
    images_dir = File.join(dir, "..", "images")
    images_path = images_dir
    output_style = :compressed
    environment = :production
    2) Define this new mixin that is a modified copy of pictos-iconmask -- I stashed mine in MyApp/resources/sass/mixins/_custom-iconmask.scss and then @import'd it, but you could drop it right in app.scss for simplicity
    Code:
    @mixin custom-iconmask($name) {
      .x-tab .x-button-icon.#{$name},
      .x-button .x-button-icon.x-icon-mask.#{$name} {
        -webkit-mask-image: inline-image('icons/' + $name + '.png');
      }
    }
    3) Place your icons in MyApp/resources/images/icons/*.png

    4) Use custom-iconmask just like you would use pictos-iconmask:
    Code:
    @include custom-iconmask('myapp-logo');

    Sencha - please preconfigure compass for us so that inline-image() pulls from MyApp/resources/images out-of-the-box
    Chief Architect @ Jarv.us Innovations
    Co-captain @ Code for Philly
    Co-founder @ Devnuts - Philadelphia Hackerspace

  2. #2
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Posts
    1,339
    Vote Rating
    132
    dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all

      0  

    Default


    Thanks for the report! I have opened a bug in our bug tracker.

  3. #3
    Sencha Premium Member
    Join Date
    Jan 2012
    Posts
    10
    Vote Rating
    1
    youdonotexist is on a distinguished road

      0  

    Default


    Make sure to add

    Code:
    -webkit-mask-repeat: no-repeat;
    ..to _custom-iconmask.scss

    Code:
    @mixin custom-iconmask($name) {
      .x-tab .x-button-icon.#{$name},
      .x-button .x-button-icon.x-icon-mask.#{$name} {
        -webkit-mask-image: inline-image('icons/' + $name + '.png');
        -webkit-mask-repeat: no-repeat;
      }
    }
    if you don't want the icon to repeat vertically.

  4. #4
    Sencha User
    Join Date
    Mar 2012
    Posts
    35
    Vote Rating
    0
    ericchaves is on a distinguished road

      0  

    Default


    I'm not a saas guy and I would like to ask if is it possible to have directories handled by this mixing/function?

    For example, assuming the following directory structure

    Code:
    MyApp/resources/images/icons/myapp-logo.png
    MyApp/resources/images/icons/icons_white/myapp-logo.png
    MyApp/resources/images/icons/icons_gray/myapp-logo.png
    


    I'd like to have the following calls working:

    Code:
    @include custom-iconmask('myapp-logo');
    @include custom-iconmask('icons_white/myapp-logo');
    @include custom-iconmask('icons_gray/mayapp-logo');
    

    And then in my code to just reference it as

    Code:
    iconCls: 'myapp-logo';
    iconCls: 'icons_white/myapp-logo';
    iconCls: 'icons_gray/mayapp-logo';
    
    Thanks!

  5. #5
    Sencha User farion's Avatar
    Join Date
    Feb 2008
    Location
    Karlsruhe, Germany
    Posts
    75
    Vote Rating
    11
    farion will become famous soon enough

      0  

    Default


    Still not possible to use inline-image with sencha cmd 3.1.0.256.

    Regards arion.

  6. #6
    Sencha User
    Join Date
    Feb 2012
    Location
    Buenos Aires - Argentina
    Posts
    1
    Vote Rating
    0
    tatobari is on a distinguished road

      0  

    Default A few more details!

    A few more details!


    I lost a few minutes finding out these three facts. Thought I'd be helping other begginers by sharing this here.

    - Since the icon is used as a mask, remember to set the container's background-color to something different from the parent's background-color.

    - Size can be importante here. The property is -webkit-mask-size. Most of the times, the icon will be bigger than its container. In Sencha Touch 2.3.0, all Pictos Icons are 60x60.

    - Last but not least, -webkit-mask-position. I've set it as default to:
    Code:
    -webkit-mask-position; center center
    .

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi