Remove 1-pixel x offset for icons

This commit is contained in:
2026-07-19 14:37:42 -04:00
parent 65dfb417d3
commit 2381dd27b1
+4 -4
View File
@@ -118,15 +118,15 @@ static void s_recenter_icons(NeatBarLayer *neat_bar) {
int8_t spread = neat_bar->spread;
if (neat_bar->up_layer) {
layer_set_frame(bitmap_layer_get_layer(neat_bar->up_layer),
GRect(1, UP_Y - spread - y_offset, neat_bar->main_grect.size.w, 18));
GRect(0, UP_Y - spread - y_offset, neat_bar->main_grect.size.w, 18));
}
if (neat_bar->select_layer) {
layer_set_frame(bitmap_layer_get_layer(neat_bar->select_layer),
GRect(1, SELECT_Y - y_offset, neat_bar->main_grect.size.w, 18));
GRect(0, SELECT_Y - y_offset, neat_bar->main_grect.size.w, 18));
}
if (neat_bar->down_layer) {
layer_set_frame(bitmap_layer_get_layer(neat_bar->down_layer),
GRect(1, DOWN_Y + spread - y_offset, neat_bar->main_grect.size.w, 18));
GRect(0, DOWN_Y + spread - y_offset, neat_bar->main_grect.size.w, 18));
}
}
@@ -249,7 +249,7 @@ void neat_bar_layer_set_icon(NeatBarLayer *neat_bar, ButtonId button_id, GBitmap
int16_t adjusted_y = (button_id == BUTTON_ID_UP) ? y_pos - neat_bar->spread
: (button_id == BUTTON_ID_DOWN) ? y_pos + neat_bar->spread
: y_pos;
current_bitmap_layer = bitmap_layer_create(GRect(1, adjusted_y, neat_bar->main_grect.size.w, 18));
current_bitmap_layer = bitmap_layer_create(GRect(0, adjusted_y, neat_bar->main_grect.size.w, 18));
layer_add_child(neat_bar->main_layer, bitmap_layer_get_layer(current_bitmap_layer));
switch (button_id) {
case BUTTON_ID_UP: