Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ChoiceList.py] Make vertical alignment configurable #2878

Merged
merged 1 commit into from
May 10, 2023

Conversation

IanSav
Copy link
Contributor

@IanSav IanSav commented May 10, 2023

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.

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.
@jbleyel jbleyel merged commit 360f594 into master May 10, 2023
@jbleyel jbleyel deleted the IanSav-ChoiceList branch May 10, 2023 15:33
@sonarcloud
Copy link

sonarcloud bot commented May 10, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

jbleyel added a commit that referenced this pull request May 10, 2023
[ChoiceList.py] Make vertical alignment configurable

(cherry picked from commit 360f594)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants