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

axis: fix label thickness #68

Merged
merged 3 commits into from
Jan 29, 2025
Merged

Conversation

jordens
Copy link
Contributor

@jordens jordens commented Jan 15, 2025

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):
image

After:
image

  • I have followed the instructions in the PR template

Copy link
Contributor

@bircni bircni left a 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 :-)

@@ -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;
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@emilk emilk added bug Something isn't working include in changelog This change will be included in the changelog labels Jan 29, 2025
@emilk emilk merged commit d318538 into emilk:main Jan 29, 2025
9 of 10 checks passed
@jordens jordens deleted the fix-axis-label-thickness branch January 29, 2025 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working include in changelog This change will be included in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants