Sidder med et lille css problem.
Sætter styles på min app ved at sætte tagget:
<style source="style.css" />
Så har jeg nogle moduler som bliver loaded ind i min app og de bliver lige ledes stylet, med undtagelse af en custom component ActiveButton (nedarver fra Button) som kun for det meste bliver stylet correct.
CSS for ActiveButton ser således ud:
1 2 3 4 5 6 7 8 9 10 11 12 13 | ActiveButton { skin: Embed(source="images/controls/activebutton/ActiveButton_UpSkin.png", scaleGridTop="2", scaleGridLeft="3", scaleGridRight="112", scaleGridBottom="22"); activeSkin: Embed(source="images/controls/activebutton/ActiveButton_ActiveSkin.png", scaleGridTop="2", scaleGridLeft="3", scaleGridRight="112", scaleGridBottom="22"); selectedUpSkin: Embed(source="images/controls/activebutton/ActiveButton_DownSkin.png", scaleGridTop="2", scaleGridLeft="3", scaleGridRight="112", scaleGridBottom="22"); selectedOverSkin: Embed(source="images/controls/activebutton/ActiveButton_DownSkin.png", scaleGridTop="2", scaleGridLeft="3", scaleGridRight="112", scaleGridBottom="22"); selectedDownSkin: Embed(source="images/controls/activebutton/ActiveButton_DownSkin.png", scaleGridTop="2", scaleGridLeft="3", scaleGridRight="112", scaleGridBottom="22"); color: #D0D0D0; textRollOverColor: #FFFFFF; fontFamily: MaxTFSemiBold; fontSize: 9px; textAlign: left; } |
og ActiveButton ser således ud:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | package dk.ipaper.scaffolding.modern.tabbar { import dk.ipaper.controls.IconButton; import dk.ipaper.icons.IIcon; import mx.core.mx_internal; use namespace mx_internal; [Style(name="activeSkin", type="Class", inherit="no")] public class ActiveButton extends IconButton { private var activeSkinName:String = "activeSkin"; private var _active:Boolean; public function ActiveButton(icon:IIcon) { super(icon); } public function set active(value:Boolean):void { _active = (selected) ? false : value; invalidateDisplayList(); } public function get active():Boolean { return _active; } override public function set selected(value:Boolean):void { super.selected = value; if(value) _active = false; } override mx_internal function viewSkin():void { if(_active) mx_internal::viewSkinForPhase(activeSkinName, "active"); else super.mx_internal::viewSkin(); } } } |
Ydermere så bliver min embedded font heller ikke vist på denne knap. Men bruger jeg en almindelig Button component så bliver den fint vist. Fonten er embedded i min App i et andet CSS.