Skip to content

Conversation

@wutschel
Copy link
Collaborator

Description

As discussed in reviews of previous PRs it is desired to further streamline the colors, button styles and button behaviour. The main change in this PR is to define common button styles which can be set via UIButton extensions which are added to Utilities.

There are three main styles defined:

  1. Text style buttons (like "Edit")
  2. Icon style buttons using setImage (that's the majority of buttons)
  3. Icon style buttons using setBackgroundImage and overlays (only used for toolbar in database browser)

All icon buttons use a common style which highlights the button by the default way of darkening the icon, not using showsTouchWhenHighlighted anymore. Selected database browser icons use a blue tint for selected state. Only few exceptions are kept for colored icons like the Kodi icon and the white NowPlaying controls (incl. shuffle/repeat/fullscreen).

To align custom buttons to the highlight-by-fade theme an alpha animation is implemented for custom button selection.

For this change I am sure we will need to test before mainlining. The changes are quite visible when e.g. using playback controls, remote toolbar buttons or when changing volume. Some of the buttons before this change were not highlighting selection at all. Generally, I think the highlighting by darkening the icon is a very elegant way to give user feedback.

Summary for release notes

Improvement: Common button style / behaviour
Improvement: Buttons highlighted on selection

Uses ICON_TINT_COLOR on top of INFO_POPOVER_COLOR background. No colorization for NowPlaying to align with playback controls.
This ensures feedback is given to the user after selecting custom buttons. For the OnOff switch buttons the feedback is done via changing the OnOff switch state. Remove assignment of CustomButtonCell's title.highlightedTextColor as anyway unused.
Common style:
- ICON_TINT_COLOR for Normal
- ICON_TINT_COLOR_ACTIVE for Selected
- No image for Highlighted
- showsTouchWhenHighlighted = NO

Few deviations where color shall not be adapted, like Kodi icons or the Kodi blue shuffle/repeat icons.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant