Skip to content

Make classic button styles consistent #994

@thomascobb

Description

@thomascobb

There seem to be 4 main button widgets in BOY, and they all draw their borders differently. I'd like to rationalise the behaviour, but I'm not sure which is the correct behaviour.

Action Button

1 pixel light grey top, 1 pixel grey bottom
action

ButtonScheme BUTTON = new ButtonScheme(
        new Color[] {buttonLightest},
        new Color[] {buttonDarker}
);

Menu Button

Doesn't draw a border. This is what it looks like with the border property set to "Button Raised".

menu

Boolean Button

toggle
3 pixel border in square mode

private final static int SQURE_BORDER_WIDTH = 3; 
...
pattern = GraphicsUtil.createScaledPattern(graphics, Display.getCurrent(), clientArea.x, clientArea.y, clientArea.x, clientArea.y+SQURE_BORDER_WIDTH, GRAY_COLOR, DARK_GRAY_COLOR);

Choice Button

1 pixel light grey top, 2 pixels dark grey bottom. Inherits whatever the draw2d ToggleButton does.

choice

Proposed changes

The line of least resistance would appear to be:

  • Make the action button draw a border that looks like the "Button Raised" border property
  • Leave the menu button as it is
  • Reduce the toggle button border to 2 pixels and make the grey colours the same as the "Button Raised" border property
  • Leave the choice button as it is

Sound reasonable to everyone?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions