我正在尝试添加一个按钮栏使用以下代码在移动 Flex 应用程序的底部:
CSS:
@namespace s "library://ns.adobe.com/flex/spark";
s|ActionBar, s|ButtonBar {
chromeColor: #0066CC;
color: #FFFFFF;
titleAlign: center;
}
动作脚本:
<s:ButtonBar requireSelection="true"
width="100%"
bottom="0"
skinClass="spark.skins.mobile.TabbedViewNavigatorTabBarSkin">
<s:ArrayCollection>
<fx:Object label="Распасы" />
<fx:Object label="Пуля" icon="{MONEY}" />
<fx:Object label="10" icon="{CALL}" />
</s:ArrayCollection>
</s:ButtonBar>
不幸的是,按钮标签上的字体看起来很模糊或模糊(在以下屏幕截图的底部):
有人知道如何制作 ButtonBar 标签字体吗regular again?
我找不到 CSS 设置。
UPDATE:我搜索了AIR SDK的源代码(ButtonBase.as、Label.as、ButtonBarSkin.as等文件),但仍然找不到答案。
因此,我添加了一个简化的测试用例+下面的另一个屏幕截图以及针对这个问题的赏金。
测试应用程序.mxml:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
applicationDPI="160">
<fx:Style>
@namespace s "library://ns.adobe.com/flex/spark";
s|ActionBar, s|ButtonBar {
chromeColor: #0066CC;
color: #FFFFFF;
titleAlign: center;
}
</fx:Style>
<fx:Script>
<![CDATA[
import spark.events.IndexChangeEvent;
import spark.skins.mobile.TabbedViewNavigatorTabBarSkin;
private function handleTabs(event:IndexChangeEvent):void {
_tabs[2].label = String(1 + _tabBar.selectedIndex);
_tabs.refresh();
}
]]>
</fx:Script>
<fx:Declarations>
<s:MultiDPIBitmapSource id="CHAT"
source160dpi="@Embed('chat.png')"
source240dpi="@Embed('chat.png')"
source320dpi="@Embed('chat.png')" />
<s:ArrayCollection id="_tabs">
<fx:Object label="One" />
<fx:Object label="Two" />
<fx:Object label="Three" icon="{CHAT}" />
</s:ArrayCollection>
</fx:Declarations>
<s:ButtonBar id="_tabBar"
requireSelection="true"
width="100%"
bottom="0"
skinClass="spark.skins.mobile.TabbedViewNavigatorTabBarSkin"
dataProvider="{_tabs}"
change="handleTabs(event)">
</s:ButtonBar>
</s:Application>
聊天.png: