Skip to content

Button's size doesn't include selection indicator  #74

@justinmclean

Description

@justinmclean

Selecting the middle button in this example code:

<?xml version="1.0" encoding="utf-8"?>
<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                xmlns:js="library://ns.apache.org/royale/basic">
    
    <js:valuesImpl>
        <js:SimpleCSSValuesImpl/>
    </js:valuesImpl>

    <js:initialView>
        <js:View>
            <js:style>
                <js:SimpleCSSStyles padding="20" />
            </js:style>
            <js:Container width="100%">
                <js:beads>
                    <js:HorizontalLayoutWithPaddingAndGap gap="20" />
                </js:beads>
                <js:TextButton text="Button 1" />
                <js:TextButton text="Button 2" />
                <js:TextButton text="Button 3" />
             </js:Container>
        </js:View>
    </js:initialView>

</js:Application>

Cuts off the selection indicator on the top and bottom of the button.

2017-11-13_12-36-28

On buttons 1 and 3 it only shows on one vertical edge.

One way of getting around this issue is adding padding to the buttons container like so:

<?xml version="1.0" encoding="utf-8"?>
<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                xmlns:js="library://ns.apache.org/royale/basic">
    
    <js:valuesImpl>
        <js:SimpleCSSValuesImpl/>
    </js:valuesImpl>

    <js:initialView>
        <js:View>
            <js:style>
                <js:SimpleCSSStyles padding="20" />
            </js:style>
            <js:Container width="100%">
                <js:beads>
                    <js:HorizontalLayoutWithPaddingAndGap paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10" gap="20" />
                </js:beads>
                <js:TextButton text="Button 1" />
                <js:TextButton text="Button 2" />
                <js:TextButton text="Button 3" />
             </js:Container>
        </js:View>
    </js:initialView>

</js:Application>

2017-11-13_12-42-28

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions