Fixed off-by-1 error (#592)

This commit is contained in:
Capybara121 2024-09-24 22:30:03 +12:00 committed by GitHub
parent 44565c8177
commit 6f7b1ae1e9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -244,10 +244,10 @@ static void bar_calculate_bounds_top_bottom(struct bar* bar) {
- center_length) / 2 - 1; - center_length) / 2 - 1;
uint32_t bar_center_right_first_item_x = (bar->window.frame.size.width 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 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* next_position = NULL;
uint32_t y = bar->window.frame.size.height / 2; uint32_t y = bar->window.frame.size.height / 2;
@ -364,10 +364,10 @@ static void bar_calculate_bounds_left_right(struct bar* bar) {
- center_length) / 2 - 1; - center_length) / 2 - 1;
uint32_t bar_center_right_first_item_y = (bar->window.frame.size.height 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 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; uint32_t* next_position = NULL;