ExtJS 5自定义主题测试 [英] ExtJS 5 Custom Theme Testing

查看:116
本文介绍了ExtJS 5自定义主题测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近开始为Sencha创建ExtJS 5的自定义主题.

I recently started to create custom theme for ExtJS 5 by Sencha.

跟随 http://docs.sencha.com/extjs/5.0 .0/core_concepts/theming.html 我设法创建了ThemeDemoApp,继承了ext-theme-neptune,将$base-color更改为绿色,并使用my-custom-theme刷新/重建了ThemeDemoApp.很好.

Following http://docs.sencha.com/extjs/5.0.0/core_concepts/theming.html I managed to create ThemeDemoApp, inherit ext-theme-neptune, change $base-color to green and refresh/rebuild ThemeDemoApp with my-custom-theme. All ok.

我的问题是, ThemeDemoApp不能很好地测试自定义主题.面板,选项卡,按钮和模式窗口.就是这样吗?

My problem is, ThemeDemoApp is quite poor for testing a custom theme. A panel, tab, button and a modal window. That's it?

经过一番谷歌搜索,我碰到了 http://dev .sencha.com/ext/5.0.0/examples/themes/index.html . (为什么在指南中没有提到?!)标题说:根据捆绑的Ext主题或您自己的自定义主题查看和测试每个Ext组件.

After bit of googling I bumped into http://dev.sencha.com/ext/5.0.0/examples/themes/index.html. (Why isn't this mentioned in the guide?!) Heading says: View and test every Ext component against bundled Ext Themes, or your own custom themes.

我的问题是:如何?如何针对此示例测试自己的自定义主题?我是否必须深入研究源代码(themes.js)并自己构建此类页面/应用程序?

My question is: How? How do I test my own custom theme against this example? Do I have to dig into the source (themes.js) and build such page/application myself?

推荐答案

ExtJS下载中包含示例(包括主题测试器).

The examples - including the Theme tester - is included in the ExtJS download.

您可以通过编辑shared/options-toolbar.js文件来修改可用的主题列表.

You can modify the list of themes available by editing the shared/options-toolbar.js file.

要找到主题,您需要将其命名为其他主题(ext-theme-name),或相应地修改themes.js.

To get it to find your theme, you'll either need to name it similar to the others (ext-theme-name), or modify themes.js accordingly.

或者您也可以破解theme.js文件来对您的主题进行硬编码.

Or you could just hack the theme.js file to hardcode your theme.

(Ext JS 4曾经自动为主题创建一个示例页面-尽管现在似乎没有这样做)

(Ext JS 4 used to create an example page for themes automatically - it doesn't seem to do that now, though)

这篇关于ExtJS 5自定义主题测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆