-
-
Notifications
You must be signed in to change notification settings - Fork 352
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
fix(tabs): Tab widget now supports custom padding (Fixes issue #502)) #629
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #629 +/- ##
=======================================
- Coverage 90.7% 90.6% -0.2%
=======================================
Files 42 42
Lines 12170 12232 +62
=======================================
+ Hits 11042 11084 +42
- Misses 1128 1148 +20 ☔ View full report in Codecov by Sentry. |
Cool. I didn't realize that the spacing before the tabs was coming from padding left / right. My mental model without having looked at the code was that the spaces "belonged to the divider. This solution is better than the ones on the Issue. A question though, what if we made the padding accept A follow up to this might be to make padding accept
But with the background of the label part the same color as the tab padding parts. (copied from the discord feedback so that it's recorded for posterity) |
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.
approved by mistake
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.
We can include the padding part of the tabs in the highlight by adding it to the tab titles instead of the padding. So I wonder whether it would be the worst thing to omit the highlight part of this?
Can you please add some docs about padding to the main rustdoc comment for the type? The doc needs info on the defaults for the padding and divider.
I'm going to make a breaking change for highlight_style in another PR as it seems natural to make that actually do something reasonable in the default configuration.
Hey, would you mind setting up commit signing? |
I did, I think something went wrong as it says the email does not match the signature. |
Github mangles your email address to |
Thanks for fixing up the commit signing - Github still complains that it can't merge them as it needs all the commits to be signed. Can you please squash the commits into a single signed commit and force push the single commit as an update to your branch? |
…i#502))\nThe widget now contains padding_left and and padding_right properties.\nThose values can be set with functions padding_left, padding_right, and padding all of which takeInto<Line>.
Just merged this - thanks again for the PR :) |
The tab widget now contains the values padding_left/padding_right and the function padding() that sets those values.
Should fix issue #502.