-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
expanded description for "radius" #4482
Conversation
I originally understood the wording around "65535 = pill shaped widget (true circle..." in a way that setting radius to 65535 always gives you a circle, also for widgets that (obviously) have way smaller widths and heights. Working with it a bit I realised it's not that straightforward, and that setting a radius in line with what is set for width/height is the way to go anyway. So I decided to expand the description a bit.
WalkthroughThis pull request updates the documentation for the LVGL component in ESPHome. Key modifications include clarifications on configuration options for widgets, specifically the Changes
Possibly related PRs
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (1)
components/lvgl/index.rst (1)
328-328
: Excellent clarification of the radius parameter behavior!The updated documentation correctly explains that setting radius to 65535 creates a pill-shaped widget, and only results in a true circle when the widget has equal width and height with radius set to half of those dimensions. This prevents potential misunderstandings about widget shapes.
Consider adding a brief example to make it even clearer:
- radius** (*Optional*, uint16): The radius to be used to form the widget's rounded corners. 0 = no radius (square corners); 65535 (max) = pill shaped widget (true circle if it has same width and height, radius then should be set to half the width/height). + radius** (*Optional*, uint16): The radius to be used to form the widget's rounded corners. 0 = no radius (square corners); 65535 (max) = pill shaped widget (true circle if it has same width and height, radius then should be set to half the width/height). For example, a 100x100 widget with radius=50 will be perfectly circular.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
components/lvgl/index.rst
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
components/lvgl/index.rst (1)
Pattern **
: - Do not generate or add any sequence diagrams
✅ Deploy Preview for esphome ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (1)
components/lvgl/index.rst (1)
328-328
: LGTM! Documentation improvement enhances clarity.The updated description correctly explains the relationship between the radius parameter and widget dimensions. This helps prevent the misconception that setting radius to 65535 always results in a circular widget.
Consider adding a small example to make it even clearer:
- radius** (*Optional*, uint16): The radius to be used to form the widget's rounded corners. 0 = no radius (square corners); 65535 (max) = pill shaped widget (true circle if it has same width and height, radius then should be set to half the width/height). + radius** (*Optional*, uint16): The radius to be used to form the widget's rounded corners. 0 = no radius (square corners); 65535 (max) = pill shaped widget (true circle if it has same width and height, radius then should be set to half the width/height). For example, for a 100x100 widget, setting radius to 50 will create a perfect circle.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
components/lvgl/index.rst
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
components/lvgl/index.rst (1)
Pattern **
: - Do not generate or add any sequence diagrams
I originally understood the wording around "65535 = pill shaped widget (true circle..." in a way that setting radius to 65535 always gives you a circle, also for widgets that (obviously) have way smaller widths and heights. Working with it a bit I realised it's not that straightforward, and that setting a radius in line with what is set for width/height is the way to go anyway. So I decided to expand the description a bit.
Description:
Related issue (if applicable): fixes
Pull request in esphome with YAML changes (if applicable): esphome/esphome#
Checklist:
I am merging into
next
because this is new documentation that has a matching pull-request in esphome as linked above.or
I am merging into
current
because this is a fix, change and/or adjustment in the current documentation and is not for a new component or feature.Link added in
/index.rst
when creating new documents for new components or cookbook.