1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2025-04-14 17:43:01 -04:00

[Listview] Try to fix sizing of barview.

Issue: #1137
This commit is contained in:
Dave Davenport 2020-06-02 09:17:06 +02:00
parent 6a6216af13
commit 4821320833

View file

@ -328,7 +328,7 @@ static void barview_draw ( widget *wid, cairo_t *draw )
if ( lv->barview.direction == LEFT_TO_RIGHT ) {
for ( unsigned int i = 0; i < max && width > 0; i++ ) {
update_element ( lv, i, i + offset, TRUE );
int twidth = textbox_get_desired_width ( WIDGET ( lv->boxes[i].textbox ) );
int twidth = widget_get_desired_width ( lv->boxes[i].box );//textbox_get_desired_width ( WIDGET ( lv->boxes[i].textbox ) );
if ( twidth >= width ) {
if ( !first ) {
break;
@ -348,7 +348,7 @@ static void barview_draw ( widget *wid, cairo_t *draw )
else {
for ( unsigned int i = 0; i < lv->cur_elements && width > 0 && i <= offset; i++ ) {
update_element ( lv, i, offset - i, TRUE );
int twidth = textbox_get_desired_width ( WIDGET ( lv->boxes[i].textbox ) );
int twidth = widget_get_desired_width ( lv->boxes[i].box );// int twidth = textbox_get_desired_width ( WIDGET ( lv->boxes[i].textbox ) );
if ( twidth >= width ) {
if ( !first ) {
break;