Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-26797

Buttons with a custom style set sometimes loose their styles



    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Not A Problem
    • Affects Version/s: Adobe Flex SDK Previous
    • Fix Version/s: None
    • Component/s: Styles
    • Labels:
    • Environment:
      Affected OS(s): All OS Platforms
      Affected OS(s): All OS Platforms
      Language Found: English


      Buttons with a stylename set, loose their style randomly.

      This bug happens intermittently and I was unable to narrow it down to the minimum case possible to understand why it happens.

      I have recorded a video of the bug: http://www.webfuel.pt/public/jsaleiro/ButtonStyleBug/ButtonStyleBug.html

      Give it 20 seconds until it loads AND please ignore the lame background music :o).

      Note that the "please click here" is a normal button, except that it doesn't have a background graphic.
      This happens randomly with other Buttons, with different styles.

      The code for this specific case:

      A Button with a specific style in a view (LoginViewSkin.mxml)


      The linkTextButton is a style with a skin-class, and is specified in a .css stylesheet, embedded on the Main class. The style declaration in styles.css:

      skin-class: ClassReference("com.airgile.skins.petro.components.button.LinkTextButtonSkin");

      And the LinkTextButtonSkin.mxml is:

      <?xml version = "1.0" encoding = "utf-8"?>
      <s:SparkSkin xmlns:fx = "http://ns.adobe.com/mxml/2009"
      xmlns:s = "library://ns.adobe.com/flex/spark">

      <!-- host component -->

      • @copy spark.skins.spark.ApplicationSkin#hostComponent


      private static const exclusions:Array = [ "labelDisplay" ]; // NO PMD


      • @copy spark.skins.SparkSkin#colorizeExclusions
        override public function get colorizeExclusions():Array { return exclusions; }


      <s:State name = "up"/>
      <s:State name = "over"/>
      <s:State name = "down"/>
      <s:State name = "disabled"/>

      <s:Label id = "labelDisplay"
      styleName = "calibriRegularGrey"
      styleName.over = "calibriRegularBlack"
      textDecoration = "underline"
      maxDisplayedLines = "1"
      top = "0"
      left = "0"/>


      This happens with other buttons with custom styles set and it's hard to reproduce - doesn't happen always, and doesn't happen in the same component, but it happens in 5-10% of the times the view changes it state.

      I guess that the more complex is the application, the more likely it will happen.




            • Assignee:
              adobejira Adobe JIRA
              adobejira Adobe JIRA
            • Votes:
              0 Vote for this issue
              0 Start watching this issue


              • Created: