Streamline colors and button style / behaviour #1425
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 extensionswhich are added toUtilities.There are three main styles defined:
setImage(that's the majority of buttons)setBackgroundImageand 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
showsTouchWhenHighlightedanymore. 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