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

Rework SettingsValuesViewController #1087

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

wutschel
Copy link
Collaborator

@wutschel wutschel commented Jun 27, 2024

Description

Closes #509. Yay! :)

This PR delivers a major rework of SettingsValuesViewController. Main motivation was to set the label dimensions matching the text which needs to be displayed instead of hardcoding the dimensions or scaling down font sizes. While implementing this several other updates were obvious to be made ad well:

  • Aligning colors of slider, scrubbingView and footerView with App colors
  • Aligning font sizes with library view
  • Enlarged fonts for descriptions
  • Rework creation and layout of footerView (only create once)
  • Remove magic numbers
  • Coding styles
  • Remove obsolete or commented code

Screenshots (top = new, bottom = before):
Bildschirmfoto-2024-06-27-um-19-57-15

Summary for release notes

Maintenance: Internal rework of SettingsViewController for better maintenance
Improvement: Automatically choose correct sizes for setting labels
Improvement: Place toggle switch next to setting name and not its description
Improvement: Better readability by larger fonts for setting description
Improvement: Remove "[CR]", BB and html code from descriptions
Improvement: Align scrubbingView, footer and slider colors with App colors

@wutschel wutschel force-pushed the rework_settingsvc branch 4 times, most recently from 2386a74 to 46e13bd Compare June 28, 2024 08:08
@wutschel wutschel marked this pull request as ready for review June 28, 2024 08:09
Massive rework of SettingsValuesVC to let labels automatically choose the correct height instead of scaling the font size down.
- Background black with alpha = 0.8
- Scrubbing speed text in lightGray
- New line after case section
- Remove commented code
- Remove obsolete empty lines
- No space before method parameters
- completion:nil
- pragma with dash
- pointer declaration w/o leading space
Only create once
- Warning uses [Utilities getSystemRed:0.95
- Standard uses TOOLBAR_TINT_COLOR
- Easier to read
- Using new unicode icon
_tableView is only created later. Remove this non-working assignment.
Use stripBBandHTML instead of dedicated implementation. Apply stripping outside of the switch-case statement to apply it for all cases.
This ensures that the calculation of label heights is done after the cell and subview have been sized.
Remind that tableView:heightForHeaderInSection anyway returns 0.
@wutschel wutschel changed the title Rework SettingsViewController Rework SettingsValuesViewController Jun 28, 2024
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.

Kodi settings controller to dynamically adapt its layout
1 participant