Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#723 closed (fixed)

Button icon should be displayed in gray if the button action is disabled

Reported by: olle Owned by: olle
Milestone: Proteios SE 2.14.0 Keywords:
Cc:

Description

A button icon should be displayed in gray if the button action is disabled, to be consistent with the button label being dimmed (grayed out) for a disabled button. Currently either the same icon is displayed as when the button action is enabled, or no button is displayed at all.

Change History (9)

comment:1 Changed 12 years ago by olle

Status: newassigned

Ticket accepted.

comment:2 Changed 12 years ago by olle

Traceability note:

  • Display of button icons was introduced in Ticket #290 (Show icons next to buttons).

comment:3 Changed 12 years ago by olle

Design discussion:

  • Icon images are normally stored in directory www/static/img/icons/ in client/servlet/.
  • Class GUIConverter checks default icon settings file "default" in icons/ in client/servlet/ for icon file paths using the button action link label as key.
  • Many icon images in directory www/static/img/icons/ in client/servlet/ exist in pairs, where one (colored) is intended for enabled buttons, and the other (gray) for disabled. Their names differ by the disabled one having "_disabled" added to the base filename, e.g. "delete.gif" and "delete_disabled.gif", respectively.

Proposed design update:

  • Class GUIConverter should be updated to support use of alternative icons for disabled buttons. The default icon file name should still be obtained from the default icon settings file using the button action link label as key, but when the button action is disabled, the icon base file name should be appended with "_disabled", before obtaining the image file.
  • The icon image repository in directory www/static/img/icons/ in client/servlet/ should be extended with icon images for disabled buttons, where the latter are missing. In the first phase, missing icons need only be added for buttons that currently might be disabled.

comment:4 Changed 12 years ago by olle

(In [3968]) Refs #723. Class/file gui/web/GUIConverter.java in client/servlet/ updated to support use of alternative icons for disabled buttons:

  1. Private method Tag convert(Toolbar toolbar, String formId)

updated to append the icon base filename with "_disabled", before obtaining the image file, in case the button action is disabled. This is done by calling new private convenience method String disabledIconString(String enabledIconStr)

  1. Public method Tag<?> convert(org.proteios.gui.Toolbar toolbar)

updated to append the icon base filename with "_disabled", before obtaining the image file, in case the button action is disabled. This is done by calling new private convenience method String disabledIconString(String enabledIconStr)

  1. New private method String disabledIconString(String enabledIconStr)

added. It adds "_disabled" to the bas filename.

comment:5 Changed 12 years ago by olle

(In [3969]) Refs #723. Refs #290. Refs #441. Icon image repository www/static/img/icons/ in client/servlet/ updated by adding new gray images "view_disabled.gif" and "use_in_project_disabled.gif".

comment:6 Changed 12 years ago by olle

Resolution: fixed
Status: assignedclosed

The ticket is closed, as the desired functionality has been added. Should problems with the current solution appear, this ticket may be reopened, or a new ticket created.

comment:7 Changed 12 years ago by olle

(In [3970]) Refs #723. Refs #290. Icon image repository www/static/img/icons/ in client/servlet/ updated by adding new gray images "goback_disabled.gif", and "gonext_disabled.gif"

comment:8 Changed 12 years ago by olle

(In [3971]) Refs #723. Refs #290. Icon image repository www/static/img/icons/ in client/servlet/ updated by adding new gray images "first_disabled.gif", "last_disabled", "next_disabled.gif", and "previous_disabled.gif". The images are copies of previous icon images with base filenames ending in "_gray" instead of "_disabled".

comment:9 Changed 12 years ago by olle

(In [4059]) Refs #723. Refs #290. Icon image repository www/static/img/icons/ in client/servlet/ updated by adding new gray image "refresh_disabled.gif".

Note: See TracTickets for help on using tickets.