-
Notifications
You must be signed in to change notification settings - Fork 39
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
axis: fix label thickness #68
Conversation
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.
lgtm
lets wait for @emilk
Whenever he has time :-)
egui_plot/src/axis.rs
Outdated
@@ -263,19 +263,22 @@ impl<'a> AxisWidget<'a> { | |||
TextStyle::Body, | |||
); | |||
|
|||
// Gap between tick labels and axis label in units of the axis label height | |||
const GAP: f32 = 0.25; |
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.
Could you please put consts on top of the file and give it a better name so it's correctly sorted?
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.
Done.
I don't think it helps though: it moves an item away from where it's used, similar existing top level items are not sorted, and both name and location don't match existing style.
When adding a bit longer axis labels it becomes clear that the Y axis label thickness is calculated wrong since #57. This fixes the computation.
Before (current main):
After: