Skip to content

Commit c64fa56

Browse files
committed
[Listview] Remove weird x-offset
fixes: #2301
1 parent e7626bc commit c64fa56

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

source/widgets/listview.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,6 @@ static void listview_draw(widget *wid, cairo_t *draw) {
498498
int diff = d / (lv->cur_columns - 1);
499499
if (diff >= 1) {
500500
spacing_hori += 1;
501-
d -= lv->cur_columns - 1;
502501
}
503502
}
504503
for (unsigned int i = 0; i < max; i++) {
@@ -513,16 +512,9 @@ static void listview_draw(widget *wid, cairo_t *draw) {
513512
(lv->element_height + spacing_vert)) -
514513
lv->element_height;
515514

516-
if ((i) / lv->cur_columns == (lv->cur_columns - 1)) {
517-
ex += d;
518-
}
519515
} else {
520516
ey = top_offset +
521517
((i) / lv->cur_columns) * (lv->element_height + spacing_vert);
522-
523-
if ((i) / lv->cur_columns == (lv->cur_columns - 1)) {
524-
ex += d;
525-
}
526518
}
527519
widget_move(WIDGET(lv->boxes[i].box), ex, ey);
528520
widget_resize(WIDGET(lv->boxes[i].box), element_width,

0 commit comments

Comments
 (0)