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

Default Spark Button Skin should have an adjustable minWidth

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Adobe Flex SDK 4.5 (Release)
    • None
    • Spark: Button
    • Language Found: English

    Description

      Per this posting:

      https://prerelease.adobe.com/project/forum/thread.html?cap=b4dd6eba22d848afbd7e0c95bd5eae0c&forid=

      {E8AB0CF6-3479-4F80-96EB-C54C8C3C3919}

      &topid=

      {066E493F-AF90-4CB2-ACB5-8DB0E5D4C4A5}

      The default Spark ButtonSkin.mxml should not have a static minimum width that is not associated with the actual ButtonSkin/Button's minWidth. Currently the 'border' portion of the default skin has a set width of 69:

      <s:Rect id="border" left="0" right="0" top="0" bottom="0" width="69" height="20" radiusX="2">

      This means that regardless of changing a button's minimum width, it will not get any smaller than 69 without either a re-skin or manually setting the width.

      Sample application from the post (image is attached):

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

      <fx:Script>
      <![CDATA[
      [Embed(source="AddIcon.png")]
      public static const AddIcon : Class;
      ]]
      >
      </fx:Script>

      <s:VGroup>
      <s:Button icon="

      {AddIcon}" />
      <s:Button icon="{AddIcon}

      " minWidth="0" />
      <s:Button icon="

      {AddIcon}" width="25" />
      <s:Button icon="{AddIcon}

      " label="1" />
      <s:Button icon="

      {AddIcon}" label="12" />
      <s:Button icon="{AddIcon}

      " label="123" />
      <s:Button icon="

      {AddIcon}" label="1234" />
      <s:Button icon="{AddIcon}

      " label="12345" />
      <s:Button icon="

      {AddIcon}" label="123456" />
      <s:Button icon="{AddIcon}

      " label="1234567" />
      <s:Button icon="

      {AddIcon}" label="12345678" />
      <s:Button icon="{AddIcon}

      " label="123456789" />
      </s:VGroup>

      </s:Application>

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: