[ChoiceList.py] Make vertical alignment configurable #2878
Merged
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.
Add a new skin parameter called "ChoicelistVerticalAlignment", that takes a value from "*top", "*center", "*middle" or "*bottom", to specify the vertical alignment of all ChoiceList base widgets. (NOTE: The "*" is required to tell the parameter processor that the data is actually a string value and to not try and process this value through the numeric parsers.)
This parameter is a temporary hack to allow skins from other distributions to work, unchanged, on openATV. The other images should really fix the alignment issue in their code. The issue in the other images is that the default alignment is "top" and skinners have been forced to manually calculate offsets of the text to cause the text to be centered vertically in the line. In openATV we fixed this issue so that no such offset is required. Manually calculating and maintaining centering offsets is a waste of time and code when Enigma2 is fully capable of centering text itself. Most Enigma2 displays assume and expect text to be centered in the space allocated. The opeATV change makes this automatic and consistent for all widgets.