Upgrade to Pro — share decks privately, control downloads, hide ads and more …

第8回SenchaUG@東京

Tanaka Yuuya
May 17, 2013
96

 第8回SenchaUG@東京

SenchaTouch2.2新機能の簡単な紹介と2.1→2.2のテーマ切り替えの説明でっす!

Tanaka Yuuya

May 17, 2013
Tweet

Transcript

  1. Microsoft Surface Pro Surface RT Windows Phone BlackBerry 10 サポート

    Sencha Touch 2.2 Features SenchaCmd 3.1 Sencha Architect 2.2 サポート
  2. Microsoft Surface Pro Surface RT Windows Phone BlackBerry 10 サポート

    Sencha Touch 2.2 Features SenchaCmd 3.1 Sencha Architect 2.2 サポート IE10 サポート:)
  3. Microsoft Surface Pro Surface RT Windows Phone BlackBerry 10 サポート

    Sencha Touch 2.2 Features SenchaCmd 3.1 Sencha Architect 2.2 サポート IE10 サポート:) プラットフォー ム用のコンフィ グオプションの 追加
  4. Microsoft Surface Pro Surface RT Windows Phone BlackBerry 10 サポート

    Sencha Touch 2.2 Features SenchaCmd 3.1 Sencha Architect 2.2 サポート IE10 サポート:) app.jsonのプラ ットフォーム検 出によるTheme の切り替え プラットフォー ム用のコンフィ グオプションの 追加
  5. Microsoft Surface Pro Surface RT Windows Phone BlackBerry 10 サポート

    Sencha Touch 2.2 Features SenchaCmd 3.1 Sencha Architect 2.2 サポート IE10 サポート:) app.jsonのプラ ットフォーム検 出によるTheme の切り替え プラットフォー ム用のコンフィ グオプションの 追加 レンダリング FPSモニター
  6. Microsoft Surface Pro Surface RT Windows Phone BlackBerry 10 サポート

    Sencha Touch 2.2 Features SenchaCmd 3.1 Sencha Architect 2.2 サポート IE10 サポート:) Icon font-face サポート app.jsonのプラ ットフォーム検 出によるTheme の切り替え プラットフォー ム用のコンフィ グオプションの 追加 レンダリング FPSモニター
  7. Microsoft Surface Pro Surface RT Windows Phone BlackBerry 10 サポート

    Sencha Touch 2.2 Features SenchaCmd 3.1 Sencha Architect 2.2 サポート IE10 サポート:) Icon font-face サポート app.jsonのプラ ットフォーム検 出によるTheme の切り替え プラットフォー ム用のコンフィ グオプションの 追加 パフォーマンス チューニング レンダリング FPSモニター
  8. Microsoft Surface Pro Surface RT Windows Phone BlackBerry 10 サポート

    Sencha Touch 2.2 Features SenchaCmd 3.1 Sencha Architect 2.2 サポート IE10 サポート:) Icon font-face サポート app.jsonのプラ ットフォーム検 出によるTheme の切り替え プラットフォー ム用のコンフィ グオプションの 追加 パフォーマンス チューニング レンダリング FPSモニター Themeの 新構造
  9. Microsoft Surface Pro Surface RT Windows Phone BlackBerry 10 サポート

    Sencha Touch 2.2 Features SenchaCmd 3.1 Sencha Architect 2.2 サポート IE10 サポート:) Icon font-face サポート app.jsonのプラ ットフォーム検 出によるTheme の切り替え プラットフォー ム用のコンフィ グオプションの 追加 パフォーマンス チューニング レンダリング FPSモニター Themeの 新構造 FF, Opera等の 実験的なサポ ート
  10. Microsoft Surface Pro Surface RT Windows Phone BlackBerry 10 サポート

    SenchaCmd 3.1 Sencha Architect 2.2 サポート IE10 サポート:) Icon font-face サポート app.jsonのプラ ットフォーム検 出によるTheme の切り替え プラットフォー ム用のコンフィ グオプションの 追加 パフォーマンス チューニング レンダリング FPSモニター FF, Opera等の 実験的なサポ ート Themeの 新構造 Sencha Touch 2.2 Features /今回ここやります\
  11. "css": [ { "path": "resources/css/sencha-touch.css", "platform": ["chrome", "ios", "android", "firefox"]

    } ] app.json pathに指定したリソースを読み込ませたいプラットフォームを、 platformプロパティに指定することで、切り替えることが可能 :) プラットフォームによる リソースの読み込み切り替え
  12. @mixin dropbox-titlebar { $toolbar-top-icon-size: 1.0em; $toolbar-top-icon-size: 1.0em; .x-dock > .x-toolbar

    + .x-dock-body { @include box-shadow(0 -1px 1px rgba(0, 0, 0, .5) inset !important); } .x-toolbar-dropbox { @include background-image( linear-gradient(#0085f2, #0074d4) ); .x-button.x-button-plain .x-button- icon, .x-toolbar .x-button.x-button- plain .x-button-icon { -webkit-mask-size: $toolbar- top-icon-size; width: $toolbar-top-icon-size; height: $toolbar-top-icon-size; @include background- gradient(#FFF, #FFF); } .x-title { color: #FFF; text-shadow: rgba(0, 0, 0, 0.5) 0 -0.08em 0; } &.x-docked-top { border-bottom-color: #00325c; border-top: 1px solid #75bdf8; } } } 実際に作ってみる(titlebar)
  13. @mixin dropbox-tabs { $tabs-bottom-icon-size: 1.4em; .x-tabbar.x-docked-bottom { border-top-width: .1em; border-top-style:

    solid; height: 49px !important; padding: 0; .x-tab { @include border-radius(0); @include box-orient(vertical); @include box-flex(1); min-width: 3.3em; min-height: 100%; position: relative; padding: .5em 0; .x-button-icon { -webkit-mask-size: $tabs- bottom-icon-size; width: $tabs-bottom-icon- size; height: $tabs-bottom- icon-size; display: block; margin: 0 auto; position: relative; @include box- shadow(#000 0 0 .25em); } .x-button-label { display: none; } } } $tabs-bottom-inner-border-color: #434343; .x-tabbar-dropbox { @include background-image(linear- gradient(#353535, #282828)); @include box-shadow( $tabs-bottom-inner-border- 実際に作ってみる(tabs)
  14. @mixin dropbox-searchbar { $toolbar-top-icon-size: 1.0em; $toolbar-top-icon-size: 1.0em; .x-dock > .x-toolbar

    + .x-dock-body { @include box-shadow(0 -1px 1px rgba(0, 0, 0, .5) inset !important); } .x-toolbar-searchbar { @include background-image(linear- gradient(#e7e7e7, #e2e2e2)); .x-button.x-button-plain, .x-toolbar .x-button.x-button-plain { @include border-radius(0); height: 2.5em; border-right: 1px solid #c7c7c7; padding-right: 1.0em; } .x-button.x-button-plain .x-button- icon, .x-toolbar .x-button.x-button- plain .x-button-icon { -webkit-mask-size: $toolbar- top-icon-size; width: $toolbar-top-icon-size; height: $toolbar-top-icon-size; @include background- gradient(#868686, #868686); } .x-title { color: #FFF; text-shadow: rgba(0, 0, 0, 0.5) 0 -0.08em 0; } &.x-docked-top { border-bottom-color: #9c9c9c; border-top: 1px solid #efefef; } .x-button, .x-field-select .x-component-outer, 実際に作ってみる(searchbar)
  15. @mixin dropbox-list { .x-list-item-body { background-color: #FFF; border-bottom: 1px solid

    #e0e0e0; .contents-list { clear: both; img { width: 35px; height: 35px; border: 1px solid #CCC; float: left; margin: 0 .5em 0 0; } h3 { font-size: .8em; font-weight: bold; padding: 0 0 .2em 0; } p { font-size: .6em; color: #666; } } } .x-list-item.x-item-selected { .x-list-item-body { color: #232323; text-shadow: none; background-color: #dee9f3; } } } 実際に作ってみる(list)
  16. @mixin dropbox-titlebar { $toolbar-top-icon-size: 1.0em; $toolbar-top-icon-size: 1.0em; .x-dock > .x-toolbar

    + .x-dock-body { @include box-shadow(0 -1px 1px rgba(0, 0, 0, .5) inset !important); } .x-toolbar-dropbox { @include background-image( linear-gradient(#0085f2, #0074d4) ); .x-button.x-button-plain .x-button- icon, .x-toolbar .x-button.x-button- plain .x-button-icon { // -webkit-mask-size: $toolbar- top-icon-size; width: $toolbar-top-icon-size; height: $toolbar-top-icon-size; // @include background- gradient(#FFF, #FFF); color: #FFF; } .x-title { color: #FFF; text-shadow: rgba(0, 0, 0, 0.5) 0 -0.08em 0; } &.x-docked-top { border-bottom-color: #00325c; border-top: 1px solid #75bdf8; } } } CSSの修正(titlebar)
  17. @mixin dropbox-tabs { $tabs-bottom-icon-size: 1.5em; .x-tabbar.x-docked-bottom { border-top-width: .1em; border-top-style:

    solid; height: 49px !important; padding: 0; .x-tab { @include border-radius(0); @include box-orient(vertical); @include box-flex(1); min-width: 3.3em; min-height: 100%; position: relative; padding: .5em 0; .x-button-icon { // -webkit-mask-size: $tabs-bottom-icon-size; width: $tabs-bottom-icon- size; height: $tabs-bottom- icon-size; display: block; margin: 0 auto; position: relative; // @include box- shadow(#000 0 0 .25em); } .x-button-label { display: none; } } } $tabs-bottom-inner-border-color: #434343; .x-tabbar-dropbox { @include background-image( linear-gradient(#353535, #282828) ); CSSの修正(tabs)
  18. @mixin dropbox-searchbar { $toolbar-top-icon-size: 1.5em; $toolbar-top-icon-size: 1.5em; .x-dock > .x-toolbar

    + .x-dock-body { @include box-shadow(0 -1px 1px rgba(0, 0, 0, .5) inset !important); } .x-toolbar-searchbar { @include background-image(linear- gradient(#e7e7e7, #e2e2e2)); .x-button.x-button-plain, .x-toolbar .x-button.x-button-plain { @include border-radius(0); // height: 2.5em; border-right: 1px solid #c7c7c7; padding-right: 1.0em; } .x-button.x-button-plain .x-button- icon, .x-toolbar .x-button.x-button- plain .x-button-icon { // -webkit-mask-size: $toolbar- top-icon-size; width: $toolbar-top-icon-size; height: $toolbar-top-icon-size; // @include background- gradient(#868686, #868686); color: #868686; } .x-title { color: #FFF; text-shadow: rgba(0, 0, 0, 0.5) 0 -0.08em 0; } &.x-docked-top { border-bottom-color: #9c9c9c; border-top: 1px solid #efefef; } .x-button, CSSの修正(searchbar)
  19. @mixin dropbox-list { .x-list-item { background-color: #FFF; border-bottom: 1px solid

    #e0e0e0; .contents-list { clear: both; img { width: 35px; height: 35px; border: 1px solid #CCC; float: left; margin: 0 .5em 0 0; } h3 { font-size: .8em; font-weight: bold; padding: 0 0 .2em 0; } p { font-size: .6em; color: #666; } } } .x-list-item.x-item-selected { color: #232323 !important; text-shadow: none !important; background-color: #dee9f3 ! important; background-image: none !important; } } CSSの修正(list)
  20. Sencha Touch 2.2へのスタイル作成まとめ ・-webkit-maskを利用している部分 ・List系コンポーネントのCSS └ DOM構造に変更が入っている為 Sencha Touch 2.1

    から 2.2 に移行する場合は、以下の箇所に 注意して作成 or 修正を行えば良い 新規に作成する場合は、Defaultテーマを import して各クラス を上書きしていくか、Baseテーマを import して自分でスタイ ルを作成していけばOKです