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

Notch is off-centered #585

Closed
Capybara121 opened this issue Jul 29, 2024 · 3 comments · Fixed by #592
Closed

Notch is off-centered #585

Capybara121 opened this issue Jul 29, 2024 · 3 comments · Fixed by #592
Labels
bug Something isn't working

Comments

@Capybara121
Copy link
Contributor

I'm attempting to set up a split bar design using fillers positioned at positions q and e, and am noticing that the notch appears to be off-centered. The two sides of the bar reach out to different distances away from the notch.

Screenshot 2024-07-29 at 7 16 11 PM

The left bracket measures 1267 pixels wide, while the right bracket measures 1269 pixels wide.

@PhrantiK
Copy link

PhrantiK commented Aug 2, 2024

You have notch_width defined twice in your bar config, one value with an odd number.

@Capybara121
Copy link
Contributor Author

Capybara121 commented Aug 2, 2024

You have notch_width defined twice in your bar config, one value with an odd number.

Thanks, didn't notice that. That being said, the issue still persists as the newest value is an even number, which should have overwritten the odd number notch. Also, the behaviour for an odd-pixel notch should be that there is a one pixel difference, right?

Screenshot 2024-08-02 at 8 46 39 PM

@FelixKratz
Copy link
Owner

It is probably an off-by-one error I made here:

SketchyBar/src/bar.c

Lines 246 to 250 in c713afe

uint32_t bar_center_right_first_item_x = (bar->window.frame.size.width
+ notch_width) / 2 - 1;
uint32_t bar_center_left_first_item_x = (bar->window.frame.size.width
- notch_width) / 2 - 1;

Feel free to play with these two lines till it is symmetric and post a PR.

@FelixKratz FelixKratz added the bug Something isn't working label Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants