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

[localfix] Rounding error in measured text causes truncation in Button label

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • Adobe Flex SDK 4.5 (Release)
    • Mobile: Button Skin
    • None
    • Affected OS(s): All OS Platforms
      Affected OS(s): All OS Platforms
      Browser: Other (specify version)
      Language Found: English

    Description

      Steps to reproduce:
      1. Run the following application in ADL at 240dpi

      <?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">
      <!-- RUN AT 240PPI -->
      <fx:Script>
      <![CDATA[
      private function swap(event:MouseEvent):void

      { b.label = (b.label == 'explicit') ? 'constraint' : 'explicit'; }

      ]]
      >
      </fx:Script>

      <fx:Declarations>
      <!-- Place non-visual elements (e.g., services, value objects) here -->
      </fx:Declarations>

      <s:layout>
      <s:VerticalLayout/>
      </s:layout>

      <s:ActionBar width="100%">
      <s:actionContent>
      <s:Button id="b" label="explicit" click="swap(event)"/>
      </s:actionContent>
      </s:ActionBar>
      </s:Application>

      2. Press the button twice
      3. Observe button label

      Actual Results:
      "explicit" text is not truncated initially. Pressing the button twice results in truncation. There's a floating point issue when measuring that manifests as a truncated label.

      Expected Results:
      No truncation.

      Workaround (if any):

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: