Ext.data.JsonP.theming({"title":"Theming","guide":"

Theming Ext JS

\n
\n

Contents

\n
    \n
  1. Requirements
  2. \n
  3. Building a Custom Theme
  4. \n
  5. Styling Your Application
  6. \n
  7. Sharing a Theme Between Applications
  8. \n
\n
\n\n

Theming defines the visual motif of your application.\nA theme is a set of visual aspects that can be easily switched\nwithout affecting the basic functionality of your application\nsuch as base color, font family, borders, backgrounds,\nand other CSS properties.\nTheming is differentiated from \"styling\"\nby the abilty to flip a switch and change the theme.

\n\n

Ext JS 4.2 includes an overhaul of the theming system\nthat makes it much easier to customize\nthe look and feel of an application.\nExt JS themes leverage\nSASS and Compass\nwhich enable the use of variables and mixins in your stylesheets.\nAlmost all of the styles for Ext JS Components can now be customized,\nincluding colors, fonts, borders, and backgrounds, by simply changing SASS variables.

\n\n

Ext JS includes a default themes\nthat you can use as a base to create your own Custom Theme package\nthat can then be used in an Ext JS application.\nThis tutorial shows you how to create a custom theme\nthat is sharable between applications,\nhow to use that theme in an application,\nand how to create application-specific styling that is not shared.

\n\n

Requirements

\n\n

Sencha Cmd 3.1

\n\n

Sencha Cmd is a command-line tool\nused to package and deploy Ext JS and Sencha Touch applications.\nTo build a theme in Ext JS 4.2,\nyou must have Sencha Cmd 3.1 or higher installed on your computer.\nSencha Cmd 3.1 removes the need to have SASS and Compass installed on your computer\nsince it uses its own bundled version of SASS and Compass.

\n\n

For more information about installing and getting started with Sencha Cmd see\nIntroduction to Sencha Cmd.

\n\n

Ruby

\n\n

Ruby\nis an open source programming language\nthat is required to run Sencha Cmd.\nRefer to the Introduction to Sencha Cmd guide for instructions on\ninstalling Ruby.

\n\n

Ext JS

\n\n

Custom themes are based on default themes that ship with the Ext JS SDK,\nso you will need to download Ext JS 4.2 or later.\nUnzip the Ext JS development kit (SDK) to a location of your choosing.\nFor this tutorial,\nwe assume that you unzipped the SDK to your home directory: \"~/extjs-4.2.0/\"

\n\n

Building a Custom Theme

\n\n

Now that we have installed the requirements for theme building,\nlet's get started creating a fully custom theme.

\n\n

Set up the Workspace

\n\n

The first step in building a custom theme\nis to set up your workspace using Sencha Cmd.\nRun the following from the command line,\nreplacing \"~/ext-4.2.0\" with the path\nwhere you unzipped the Ext JS SDK.

\n\n
sencha -sdk ~/ext-4.2.0 generate workspace my-workspace\n
\n\n

This creates a directory named \"my-workspace\"\nthat contains your custom theme package;\nyou will also create an application here that uses the new custom theme.\nThis command copies the Ext JS SDK and packages into your workspace\nso that the theme and application can find their required dependencies.\nThe commands for generating the theme and application\nmust be executed from inside the workspace directory\nso change your working directory to the new \"my-workspace\" directory now:

\n\n
cd my-workspace\n
\n\n

You should now see two directories inside your workspace

\n\n\n\n\n

Generating an Application for Testing the Theme

\n\n

Before creating a custom theme we need to set up a way to test the theme.\nThe best way to test a theme is to use it in an application.\nRun the following command from the \"my-workspace\" directory:

\n\n
sencha -sdk ext generate app ThemeDemoApp theme-demo-app\n
\n\n

This tells Sencha Cmd to generate an application named ThemeDemoApp\nin a new sub-directory named \"theme-demo-app\",\nand to find the Ext JS SDK in the \"ext\" directory\nthat was copied into \"my-workspace\" when the workspace was generated.\nNow let's build the app:

\n\n
cd theme-demo-app\nsencha app build\n
\n\n

There are two ways to run your app:

\n\n
    \n
  1. Development mode: simply open \"theme-demo-app/index.html\" in a browser.
  2. \n
  3. Production mode: open \"build/ThemeDemoApp/production/index.html\" in a browser.
  4. \n
\n\n\n

We will use development mode for this tutorial\nsince it uses unminified source files for easy debugging.

\n\n

Production mode uses minified source files\nfor a smaller footprint and better performance\nfor the application.

\n\n

Generating the Theme Package and File Structure

\n\n

Sencha Cmd allows you to automatically generate the theme package and file structure.\nRun the following command from the theme-demo-app directory:

\n\n
sencha generate theme my-custom-theme\n
\n\n

This tells Sencha Cmd to generate a theme package\nnamed \"my-custom-theme\" in the current workspace.\nYou should see a newly created directory\nnamed \"my-custom-theme\" in the \"packages\" directory of your workspace.\nThis is the theme package. Lets take a look at its contents:

\n\n\n\n\n

Configuring Theme Inheritance.

\n\n

All Sencha theme packages are part of a larger hierarchy of themes, and each theme package\nmust extend a base theme. The next step in creating your custom theme is to figure out\nwhich theme to extend. In the packages directory your workspace you will see the following\ntheme packages:

\n\n\n\n\n

So which theme should your custom theme extend? We recommend using either \"ext-theme-neptune\"\nor \"ext-theme-classic\" as the starting point for custom themes. The reason for this is\nbecause these themes contain all the code necessary for creating an attractive theme out\nof the box. The neutral theme should be thought of as a very abstract theme, and should not\ntypically need to be extended directly. Creating a custom theme by overriding \"ext-theme-neutral\"\nrequires hundreds of variable overrides and many hours of work, and should only be done\nby very advanced theme developers, whereas a derivation of neptune or classic theme can be up\nand running in minutes by simply changing a couple variables. Additionally you can override\n\"ext-theme-gray\" or \"ext-theme-access\"\nif they provide a more desirable starting point for your custom theme.

\n\n

For this tutorial we will create a custom theme that extends the Neptune theme. To do this,\nreplace the following line in \"packages/my-custom-theme/package.json\":

\n\n
\"extend\": \"ext-theme-classic\"\n
\n\n

with this:

\n\n
\"extend\": \"ext-theme-neptune\"\n
\n\n

You now need to refresh your application. This ensures that the correct theme JavaScript\nfiles are included in the application's \"bootstrap.js\" file so that the application can\nbe run in development mode. Run the following command from the \"theme-demo-app\" directory.

\n\n
sencha app refresh\n
\n\n

Configuring Global Theme Variables

\n\n

Now that you have set up your theme package, its time to begin modifying the visual appearance\nof the theme. Let's start by modify the base color from which many Ext JS Components'\ncolors are derived. Create a file called Component.scss in \"my-custom-theme/sass/var/\".\nAdd the following code to the Component.scss file:

\n\n
$base-color: #317040 !default;\n
\n\n

Be sure to include !default at the end of all variable assignments if you want your\ncustom theme to be extensible. Without !default you will not be able to override the\nvariable in a derived theme, because Sencha Cmd includes variable files in \"reverse\" order -\nmost-derived theme first, base theme last. For more information on the use of !default see\nVariable Defaults

\n\n

The value of $base-color must be a valid HTML color code;\nsee the HTML Color Codes web page.

\n\n

For the complete list of Ext JS global SASS variables see Global_CSS.

\n\n

Building the Package

\n\n

To generate a css file containing all the style rules for your theme, run the following\ncommand from the \"packages/my-custom-theme/\" directory:

\n\n
sencha package build\n
\n\n

Building the package generates a build directory in your theme package directory.\nInside \"my-custom-theme/build/resources\" you will find a file named my-custom-theme-all.css.\nThis file contains all the style rules for all Ext JS Components for your theme. You can\nlink directly to this file from your app but this is not recommended because the \"all\"\nfile contains all styles for every Ext JS Component and most apps only use a subset of\nExt JS Components. Sencha Cmd has the ability to filter out unused CSS style rules when\nyou build an app, but first we need to configure the test app to use the custom theme.

\n\n

Using a Theme in an Application

\n\n

To configure your test application to use the custom theme that you just created,\nfind the following line in theme-demo-app/.sencha/app/sencha.cfg

\n\n
app.theme=ext-theme-classic\n
\n\n

and replace it with:

\n\n
app.theme=my-custom-theme\n
\n\n

If you have already run a build of the app using the classic theme,\nyou should clean the build directory. From the theme-demo-app directory run:

\n\n
sencha ant clean\n
\n\n

Now from the \"theme-demo-app\" directory, run the following command to build the app:

\n\n
sencha app build\n
\n\n

Open \"theme-demo-app/index.html\" in a browser. You should see the green color we specified\nearlier as $base-color applied to the components on the screen.

\n\n

Configuring Component Variables

\n\n

Each Ext JS Component has a list of global variables that can be used to configure its\nappearance. Let's change the font-family of Panel Headers in \"my-custom-theme\". Create a\nfile named \"packages/my-custom-theme/sass/var/panel/Panel.scss\" and add the following\ncode:

\n\n
$panel-header-font-family: Times New Roman !default;\n
\n\n

Now build your app by running the following command from the \"theme-demo-app\" directory.

\n\n
sencha app build\n
\n\n

Open \"theme-demo-app/index.html\" in a web browser and you should see that the panel header\nuses \"Times New Roman\" font.

\n\n

You can find the complete list of SASS variables for each Component\nin the \"CSS Variables\" section of each page in the API docs.\nFor example, see Ext.panel.Panel\nand scroll down to the section titled \"CSS Variables\"

\n\n

Creating Custom Component UIs

\n\n

Every component in the Ext JS framework has a ui configuration (which defaults to \"default\").\nThis property can be configured on individual Component instances to give them a different\nappearance from other Component instances of the same type. This is used in the Neptune\ntheme to create different types of Panels and Buttons. For example panels with the 'default' UI have dark blue headers and panels with\nthe 'light' UI have light blue headers. Buttons use UIs to give toolbar buttons a different\nappearance from regular buttons.

\n\n

The ext-theme-neutral theme includes SASS mixins for many different Ext JS Components.\nYou can call these mixins to generate new UIs for Components. Available mixins for each\nComponent are listed in the API Documentation. For example, see Ext.panel.Panel\nand scroll down to the \"CSS Mixins\" section to see what parameters the Panel UI mixin\naccepts. Let's use this mixin to create a custom Panel UI. Create a file named\n\"packages/my-custom-theme/sass/src/panel/Panel.scss\" and add the following code to it:

\n\n
@include extjs-panel-ui(\n    $ui-label: 'highlight-framed',\n    $ui-header-background-color: red,\n    $ui-border-color: red,\n    $ui-header-border-color: red,\n    $ui-body-border-color: red,\n    $ui-border-width: 5px,\n    $ui-border-radius: 5px\n);\n
\n\n

This mixin call produces a new Panel UI named \"highlight-framed\" which has a red header\nbackground, red bordering, 5px border, and 5px border-radius. To use this UI, just configure\na Panel with \"highlight\" as its ui property (the \"-framed\" suffix is added to the UI of\na panel when you set the frame config to true). Open\n\"theme-demo-app/app/view/Viewport.js\" and replace the items array with the following:

\n\n
items: [{\n    // default UI\n    region: 'west',\n    xtype: 'panel',\n    title: 'West',\n    split: true,\n    width: 150\n}, {\n    // custom \"highlight\" UI\n    region: 'center',\n    xtype: 'panel',\n    layout: 'fit',\n    bodyPadding: 20,\n    items: [\n        {\n            xtype: 'panel',\n            ui: 'highlight',\n            frame: true,\n            bodyPadding: 10,\n            title: 'Highlight Panel'\n        }\n    ]\n}, {\n    // neptune \"light\" UI\n    region: 'east',\n    xtype: 'panel',\n    ui: 'light',\n    title: 'East',\n    split: true,\n    width: 150\n}]\n
\n\n

Now build your app by running the following command from the \"theme-demo-app\" directory.

\n\n
sencha app build\n
\n\n

Open \"theme-demo-app/index.html\" in a web browser and you should see the red \"highlight\" panel\nin the center region.

\n\n

While UI mixins are a handy way to configure multiple appearances for a component, they\nshould not be overused. Because each call to a UI mixin generates additional CSS rules,\ngratuitous calls to UI mixins can produce an overly large CSS file.

\n\n

Another important point to remember when calling UI mixins is to call the mixin by passing\nits named parameters, not an ordered list of parameter values. Although SASS supports\nboth forms it's best to use this form:

\n\n
@include extjs-component-ui(\n    $ui-foo: foo,\n    $ui-bar: bar\n);\n
\n\n

And avoid this form:

\n\n
@include extjs-component-ui(foo, bar);\n
\n\n

The reason for this is, because of the complexity and number of mixin parameters, we cannot\nguarantee that the order will stay the same if new parameters are added, or if a deprecated\nparameter is removed. It is therefore safest to always specify the parameters by name\nand not by ordinal names when calling UI mixins.

\n\n

Modifying Image Assets

\n\n

All required image assets are inherited from the parent theme by default, but in some cases you may need to override an image. This can be easily done by placing the desired image\nin \"my-custom-theme/resources/images/\" and giving it the same name as the image it is\nintended to override. For example, let's change the info icon of the MessageBox component.\nSave the following image as \"packages/my-custom-theme/resources/images/shared/icon-info.png\"

\n\n

\"Info

\n\n

Now modify your test application to show a MessageBox that uses the custom icon. Add the\nfollowing items array to the highlight panel in your application's Viewport\n(\"theme-demo-app/app/view/Viewport.js\"):

\n\n
...\ntitle: 'Highlight Panel',\nitems: [{\n    xtype: 'button',\n    text: 'Show Message',\n    handler: function() {\n        Ext.Msg.show({\n            title: 'Info',\n            msg: 'Message Box with custom icon',\n            buttons: Ext.MessageBox.OK,\n            icon: Ext.MessageBox.INFO\n        });\n    }\n}]\n...\n
\n\n

And add Ext.window.MessageBox to the requires array of the Viewport:

\n\n
requires: [\n    ...\n    'Ext.window.MessageBox',\n    ...\n],\n
\n\n

Now build the app and view it in the browser;\nwhen you click the button you should see\na MessageBox containing the custom icon.

\n\n

Slicing Images for CSS3 effects in IE

\n\n

In many cases when creating new UI's, you will want to include background gradients or\nrounded corners. Unfortunately, legacy browsers do not support the CSS3 properties for these\neffects, so we must use images instead. Sencha Cmd includes the ability to automatically\nslice these images for you. To do this, we need to tell Sencha Cmd which Components need\nslicing. The files that contain the slicing configuration are contained in the \"sass/example/\"\ndirectory of a theme. To get an idea of what these files look like, let's look at the\n\"packages/ext-theme-base/sass/example/\" directory in your workspace:

\n\n\n\n\n

To create slices for the rounded corners of the \"highlight\" panel UI that you created\nearlier in this tutorial, create a file named\n\"packages/my-custom-theme/sass/example/manifest.js\" and add the following code to it.

\n\n
Ext.theme.addManifest(\n    {\n        xtype: 'panel',\n        ui: 'highlight'\n    }\n);\n
\n\n

Now edit \"packages/my-custom-theme/sass/example/theme.html\" and add the following script\ntags:

\n\n
<!-- Required because Sencha Cmd doesn't currently add manifest.js from parent themes -->\n<script src=\"../../../ext-theme-neptune/sass/example/manifest.js\"></script>\n<!-- Your theme's manifest.js file -->\n<script src=\"manifest.js\"></script>\n
\n\n

That ensures that the UIs defined in ext-theme-neptune and my-custom-theme get sliced\ncorrectly when you build the my-custom-theme package using sencha package build.\nYoull musst also add these 2 script tags to \"theme-demo-app/sass/example/theme.html\",\nso that the UIs will get sliced when building the app using sencha app build:

\n\n
<script type=\"text/javascript\" src=\"../../../packages/ext-theme-neptune/sass/example/manifest.js\"></script>\n<script type=\"text/javascript\" src=\"../../../packages/my-custom-theme/sass/example/manifest.js\"></script>\n
\n\n

In the future, it will seldom be necessary to modify \"theme.html\" manually but,\nin Sencha Cmd 3.1.0, script tags\nfor \"shortcuts.js\" and \"manifest.js\" are not added automatically.

\n\n

That's all there is to it. Now just build the demo app again, and run it in IE8 or below.\nYou should see rounded corners on the \"highlight\" panel that look just like the ones\ncreates using CSS3 when you run the app in a modern browser.

\n\n

Theme JS Overrides

\n\n

Sometimes a theme needs to change the appearance of some aspect of a Component that is\nonly configurable via JavaScript. This can easily be accomplished by adding a JavaScript\noverride to your theme package. To demonstrate how this is done, let's change the\ntitleAlign config of Panels in the custom theme.\nCreate a new file named \"packages/my-custom-theme/overrides/panel/Panel.js\" and add\nthe following code:

\n\n
Ext.define('MyCustomTheme.panel.Panel', {\n    override: 'Ext.panel.Panel',\n    titleAlign: 'center'\n});\n
\n\n

Now lets build the theme package so that \"packages/my-custom-theme/build/my-custom-theme.js\"\nwill include the new override. From the \"packages/my-custom-theme/\" directory run:

\n\n
sencha package build\n
\n\n

You should now refresh the application so that the theme's JS overrides will get included\nwhen running the application in development mode. Run the following command from the\n\"theme-demo-app\" directory:

\n\n
sencha app refresh\n
\n\n

Now build the app from the theme-demo-app directory:

\n\n
sencha app build\n
\n\n

Then open \"theme-demo-app/index.html\" in the browser. You should notice that all Panel\nheaders have centered titles.

\n\n

Although any Ext JS Component config can be overridden in this manner, best practice is\nto only use theme overrides to change those configs that directly affect the visual\nappearance of a Component.

\n\n

The SASS Namespace

\n\n

As described above, Sencha Cmd looks for files in \"sass/var\" and \"sass/src\" that match\nup with JavaScript classes. By default, for themes, the Ext namespace is assumed to be\nthe top-level namespace and so your theme would have a \"sass/src/panel/Panel.scss\" file\ncorresponding to Ext.panel.Panel.

\n\n

For a theme to apply outside the Ext namespace, you must change a config property\ncalled package.sass.namespace in \".sencha/package/sencha.cfg\". To be able to style all\ncomponents in your theme, you will need to set this as blank:

\n\n
package.sass.namespace=\n
\n\n

With this set, the file you need to create to correspond with Ext.panel.Panel\nis \"sass/src/Ext/panel/Panel.scss\".

\n\n

Adding Custom Utility SASS

\n\n

If your theme requires SASS functions or mixins that are not related to Component styling,\ne.g. utilities, these should be placed in the theme's \"sass/etc\" directory. You can organize\nfiles in this directory however you like, but the only file that Sencha Cmd includes\nin the build is \"sass/etc/all.scss\".\nAny other files must be imported by the \"all.scss\" file.\nFor an example that follows this pattern see \"packages/ext-theme-base/sass/etc/\".

\n\n

Migrating a Theme from Ext JS 4.1 or earlier.

\n\n

In Ext 4.1, theming was done quite differently. Typically, all the SASS variables\nwould be placed in one \"all.scss\" file,\nand at the end of the file, the base theme's \"all.scss\" file would be imported.\nThe best starting point for migrating an existing theme is to place\nall the old SASS variables in the theme's \"sass/etc/all.scss\" file. Any SASS rules that\nthe legacy theme had should be placed in \"sass/src/Component.scss\". Then try to build\nthe theme or an app that uses the theme as described above. Eventually you may want to\nmove the variables and rules into the files that correspond to the Components being styled.

\n\n

Styling Your Application

\n\n

Styling that is not shared between applications belongs in the application itself, not\nin the theme. Sencha Cmd provides an easy way to add application-level styling by following\nthe same pattern as theme styling. The application acts as the final level in the theme\nhierarchy. Applications can change theme variables, and they can add their own custom\nvariables and rules for styling the application's views.

\n\n

Changing Theme Variables in Your Application

\n\n

Let's continue using the \"theme-demo-app\" application created above,\nand override the theme's $base-color in the application.\nCreate a file named \"theme-demo-app/sass/var/view/Viewport.scss\"\nand add the following code:

\n\n
$base-color: #333;\n
\n\n

Then build the app by running the following command from the \"theme-demo-app\" directory:

\n\n
sencha app build\n
\n\n

Open the application's \"index.html\" page in a browser and you will see that the color has\nchanged to gray.

\n\n

Notice how we did not use !default when setting the $base-color variable. !default is\nused for setting variables in themes, because those theme variables might need to be\noverridden in a derived theme, or in an application. !default is not needed here because\nthe application is the end of the line in the theme inheritance tree.

\n\n

You may also be wondering why we set $base-color in \"Viewport.scss\"\ninstead of \"Component.scss\" like we did when changing the $base-color for a theme.\nThe reason for this is because the namespace that Sencha Cmd uses\nfor resolving scss file names is the namespace of the application.\nFor each class in your application, Sencha Cmd checks for a corresponding scss\nfile in \"sass/var/\" for variables, and \"sass/src/\" for rules.\nSince the application has a class named ThemeDemoApp.view.Viewport,\nthe \"sass/var/view/Viewport.scss\" file gets included in the build.\n\"sass/var/Componenent.scss\" is not included unless the application\nhad a class named \"ThemeDemoApp.Component\".

\n\n

Styling Your Application's Views

\n\n

CSS style rules for your application's views should go in the app's \"sass/src/\" directory\nin a scss file that has the same path and name as the view it is styling. Let's style\nthe center panel in the ThemeDemoApp application. Since that panel is defined in\nThemeDemoApp.view.Viewport, the CSS rule that styles it goes in\n\"sass/src/view/Viewport.scss\":

\n\n
.content-panel-body {\n    background-color: #ccc;\n}\n
\n\n

Add the \"content-panel-body\" CSS class to the body of the center panel in your application's\nviewport:

\n\n
...\nxtype: 'panel',\nui: 'highlight',\nbodyCls: 'content-panel-body',\nframe: true,\n...\n
\n\n

Now build and run the app. You should see a gray background-color on the body of the center\npanel.

\n\n

The SASS Namespace

\n\n

Similar to themes, applications also have \"sass/var\" and \"sass/src\" folders and these\nalso correspond to the JavaScript class hierarchy. For an application, the top-level\nnamespace is specified by app.sass.namespace in \".sencha/app/sencha.cfg\". By default\nthis value is the application's namespace.

\n\n

This default is most convenient for styling just your application's views since these are\nmost likely in your application's namespace. To style components outside your application\nnamespace, you can change app.sass.namespace but it may be a better idea to create a\ntheme instead.

\n\n

Organization of Generated SASS

\n\n

When using themes as described above, the SASS from your theme and from your application\nas well as from required packages (see Sencha Cmd Packages)\nis combined in an \"app-all.scss\" file that is then compiled by Compass. It is important\nto understand the structure of this file so that you know what you can use from your\ntheme or required packages and when.

\n\n

The structure of the \"all.scss\" file generated for your application is this:

\n\n
+---------------------------------------+\n| inclusion flags                       |\n+-----------+-----------+---------------+\n|           |           | base          |\n|           | theme     +---------------+\n|           |           | derived       |\n|           +-----------+---------------+\n|           |                           |\n|    etc    | packages (dep order)      |\n|           |                           |\n|           +---------------------------+\n|           |                           |\n|           | application               |\n|           |                           |\n+-----------+---------------------------+\n|           |                           |\n|           | application               |\n|           |                           |\n|           +-----------+---------------+\n|           |           | derived       |\n|    var    | theme     +---------------+\n|           |           | base          |\n|           +-----------+---------------+\n|           |                           |\n|           | packages (dep order)      |\n|           |                           |\n+-----------+-----------+---------------+\n|           |           | base          |\n|           | theme     +---------------+\n|           |           | derived       |\n|           +-----------+---------------+\n|           |                           |\n|    src    | packages (dep order)      |\n|           |                           |\n|           +---------------------------+\n|           |                           |\n|           | application               |\n|           |                           |\n+-----------+---------------------------+\n
\n\n

Inside the \"bands\" for \"sass/var\" and \"sass/src\", the individual \".scss\" files for a\ngiven theme, package and the application are always ordered to match the JavaScript class\nhierarchy. For example, if the \"base\" theme had \".scss\" files for Ext.window.Window\nand Ext.panel.Panel in its \"sass/var\" folder, the file for Ext.panel.Panel would be\nincluded before the file for Ext.window.Window since Ext.window.Window extends\nExt.panel.Panel.

\n\n

The goals and rationale for this particular structure are as follows:

\n\n\n\n\n

Inclusion Flags

\n\n

The \"inclusion flags\" section is a set of variables defined to be true or false for\neach JavaScript class that could be included. The value of this variable is true if\nthat class is being included. For example, if the build uses Ext.grid.Panel, this line\nis present in this section:

\n\n
$include-ext-grid-panel: true;\n
\n\n

If this build does not include Ext.menu.ColorPicker then this line is present:

\n\n
$include-ext-menu-colorpicker: false;\n
\n\n

Sharing a Theme Between Applications

\n\n

It's easy to share the theme you've just built with a second application. Simply navigate\nto the \"my-workspace\" directory and run the following command:

\n\n
sencha -sdk ext generate app AnotherApp another-app\n
\n\n

This tells Sencha Cmd to generate an app in the \"another-app\" directory named \"AnotherApp\"\nand to use the same Ext JS SDK as the first app you created.

\n\n

The next step is to tell the app to use the custom theme: Edit\n\"another-app/.sencha/app/sencha.cfg\" and replace the following line:

\n\n
app.theme=ext-theme-classic\n
\n\n

with:

\n\n
app.theme=my-custom-theme\n
\n\n

Now build the app. From the \"another-app\" directory run:

\n\n
sencha app build\n
\n\n

Then open \"another-app/index.html\" page in your browser. You should see a starter app\nthat uses the same custom theme as ThemeDemoApp.

\n"});