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

Major skin enhancement #3325

Merged
merged 3 commits into from
May 13, 2024
Merged

Major skin enhancement #3325

merged 3 commits into from
May 13, 2024

Conversation

jbleyel
Copy link
Contributor

@jbleyel jbleyel commented May 13, 2024

  • This change introduces XML based skin templates. The old Python based templates are now deprecated. When they are no longer needed all code that supports them will be removed.
  • The new XML templates now use standard skin based attributes rather than Python code fragments and Python variable names.
  • The index into the data tuples with the data to be formatted can now be specified by index number into the tuple and by a new variable name mechanism. This now means that as long as the code behind the skin keeps the same variable name the actual tuple order can now be changed without requiring a skin change.
  • The templates can be defined in-line within a screen definition or they can be collected into a separate "skinTemplates.xml" file.

[skin.py]

  • Add new XML based multi-content parser.
  • Update f-strings to Python 3.12 format.
  • Remove the recently added gradient attributes and replace them with smarter color attributes. If the color attribute includes a comma "," then the color is a gradient.
  • Note that the "backgroundColorEven", "backgroundColorOdd", and "backgroundColorRows" can not be gradients.
  • Remove the unused "backgroundCrypted", "backgroundEncrypted", "backgroundNotCrypted", "foregroundCrypted", "foregroundEncrypted", "foregroundNotCrypted" attributes. If these attributes are used in a skin then please create an issue to discuss the problem.

[List.py]

  • Add support for the new XML templates via the "template", "mode", and "indexName" methods.
  • Optimize some of the code.
  • Tidy up the code and move all deprecated methods to the end of the module.

[Listbox.py]

  • Add support for the new XML templates.
  • Optimize some of the code.
  • Tidy up the code and move all deprecated methods to the end of the module.
  • Improve some of the comments.

[XmlMultiContent.py]

  • This is a new converter that supports the processing of XML templates for source based widgets.
  • This is a special internal converter that does not need to be specified in a "converter" tag. The presence of a "templates" tag in the screen will automatically invoke this converter.

jbleyel and others added 3 commits May 13, 2024 19:41
- This change introduces XML based skin templates.  The old Python based templates are now deprecated.  When they are no longer needed all code that supports them will be removed.
- The new XML templates now use standard skin based attributes rather than Python code fragments and Python variable names.
- The index into the data tuples with the data to be formatted can now be specified by index number into the tuple and by a new variable name mechanism. This now means that as long as the code behind the skin keeps the same variable name the actual tuple order can now be changed without requiring a skin change.
- The templates can be defined in-line within a screen definition or they can be collected into a separate "skinTemplates.xml" file.

[skin.py]
- Add new XML based multi-content parser.
- Update f-strings to Python 3.12 format.
- Remove the recently added gradient attributes and replace them with smarter color attributes.  If the color attribute includes a comma "," then the color is a gradient.
- Note that the "backgroundColorEven", "backgroundColorOdd", and "backgroundColorRows" can not be gradients.
- Remove the unused "backgroundCrypted", "backgroundEncrypted", "backgroundNotCrypted", "foregroundCrypted", "foregroundEncrypted", "foregroundNotCrypted" attributes. If these attributes are used in a skin then please create an issue to discuss the problem.

[List.py]
- Add support for the new XML templates via the "template", "mode", and "indexName" methods.
- Optimize some of the code.
- Tidy up the code and move all deprecated methods to the end of the module.

[Listbox.py]
- Add support for the new XML templates.
- Optimize some of the code.
- Tidy up the code and move all deprecated methods to the end of the module.
- Improve some of the comments.

[XmlMultiContent.py]
- This is a new converter that supports the processing of XML templates for source based widgets.
- This is a special internal converter that does not need to be specified in a "converter" tag. The presence of a "templates" tag in the screen will automatically invoke this converter.
* master:
  remove python 3.11 build test
Copy link

sonarcloud bot commented May 13, 2024

Quality Gate Passed Quality Gate passed

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@jbleyel jbleyel merged commit ec26377 into master May 13, 2024
3 checks passed
@jbleyel jbleyel deleted the Skin branch May 13, 2024 19:01
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