如何在 Sencha Touch tabBar 中使用附加图标?
使用 Sencha Touch,我想在页脚导航中使用 resources/themes/images/default/pictos/
目录中的一些图标作为 iconCls。但从我读到的内容来看,它说我需要在 Rails 服务器上设置一个 ruby,只是为了编译正确的样式表和 javascript 文件来使用它们?
我对如何设置自己的服务器或设置自己的 RoR 服务器一无所知。还有其他方法可以做到这一点吗?我只想要该目录中的 3 个图标...设置整个服务器似乎有点矫枉过正。
With Sencha Touch, i want to use some of the icons in the directory resources/themes/images/default/pictos/
for iconCls in my footer navigation. But from what I've read, it says I need to set up a ruby on rails server just to compile the right stylesheets and javascript files to use them?
I don't have the least bit knowledge of how to set up my own servers or set up my own RoR server. Is there anyway else to do this? I just want 3 icons from that directory...setting up a whole server seems a bit overkill.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,您需要安装 Ruby 和 RubyGems(仅当您使用 Windows 时,因为它们预先捆绑在 Mac 上)
然后您只需在 touch/resources/sass 中打开正确的 scss 文件(取决于您使用的是什么) )并向其中添加以下行:
最后,您需要在该文件夹中打开一个终端并执行以下命令:
或
有关 Sencha-Touch 主题的更多信息请点击此处
Yes, you need to install Ruby and RubyGems (only if you're on Windows because they are pre bundled on Mac)
Then you just need to open the right scss file in touch/resources/sass (depending on what them you're using) and to add the following line to it :
Finally you need to open a terminal in that folder and to execute the following command :
or
More information about Sencha-Touch Theming here
我使用了以下 CSS
实际上...说实话,我没有将 CSS 映射到图像,而是将图像转换为 Base64 并将其嵌入到 CSS 中。这样做的原因是我只需要 4 个图标,而且我不想每次都移动它们。
现在,当您创建 TabPanel 时,您想要按照这些思路做一些事情。
编辑
查看我的旧 Sencha Touch V1 代码库(根据下面的评论),您将需要为 Sencha Touch V1 使用以下 CSS
I used the following CSS
Actually... to be perfectly honest, I didn't map my CSS to the image, but rather converted the image to Base64 and embedded it in the CSS. The reason for this was that I only needed 4 of the icons and I didn't want to move them all around every time.
Now, when you're creating your TabPanel you want do do something along these lines.
EDIT
Looking over my old Sencha Touch V1 code base (as per your comment below) you will want to use the following CSS for Sencha Touch V1