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

Fixed off-by-1 error #592

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/bar.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,10 @@ static void bar_calculate_bounds_top_bottom(struct bar* bar) {
- center_length) / 2 - 1;

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

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

uint32_t* next_position = NULL;
uint32_t y = bar->window.frame.size.height / 2;
Expand Down Expand Up @@ -364,10 +364,10 @@ static void bar_calculate_bounds_left_right(struct bar* bar) {
- center_length) / 2 - 1;

uint32_t bar_center_right_first_item_y = (bar->window.frame.size.height
+ notch_width) / 2 - 1;
+ notch_width) / 2;

uint32_t bar_center_left_first_item_y = (bar->window.frame.size.height
- notch_width) / 2 - 1;
- notch_width) / 2 ;

uint32_t* next_position = NULL;

Expand Down