1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-25 13:55:34 -05:00

[Listview] Fix drawing issue

This commit is contained in:
Dave Davenport 2019-12-29 20:33:34 +01:00
parent e6bed0e5d3
commit 40c1476855
3 changed files with 8 additions and 4 deletions

View file

@ -845,6 +845,8 @@ The current widgets available in \fBrofi\fP:
\fB\fCscrollbar\fR: the listview scrollbar \fB\fCscrollbar\fR: the listview scrollbar
.IP \(bu 2 .IP \(bu 2
\fB\fCelement\fR: a box in the listview holding the entries \fB\fCelement\fR: a box in the listview holding the entries
.RS
.IP \(bu 2 .IP \(bu 2
\fB\fCelement\-icon\fR: the widget in the listview's entry showing the (optional) icon \fB\fCelement\-icon\fR: the widget in the listview's entry showing the (optional) icon
.IP \(bu 2 .IP \(bu 2
@ -852,6 +854,8 @@ The current widgets available in \fBrofi\fP:
.IP \(bu 2 .IP \(bu 2
\fB\fCelement\-text\fR: the widget in the listview's entry showing the text. \fB\fCelement\-text\fR: the widget in the listview's entry showing the text.
.RE
.RE .RE
.IP \(bu 2 .IP \(bu 2
\fB\fCmode\-switcher\fR: the main horizontal @box packing the buttons. \fB\fCmode\-switcher\fR: the main horizontal @box packing the buttons.

View file

@ -517,9 +517,9 @@ The current widgets available in **rofi**:
* `listview`: The listview. * `listview`: The listview.
* `scrollbar`: the listview scrollbar * `scrollbar`: the listview scrollbar
* `element`: a box in the listview holding the entries * `element`: a box in the listview holding the entries
* `element-icon`: the widget in the listview's entry showing the (optional) icon * `element-icon`: the widget in the listview's entry showing the (optional) icon
* `element-index`: the widget in the listview's entry keybindable index (1,2,3..0) * `element-index`: the widget in the listview's entry keybindable index (1,2,3..0)
* `element-text`: the widget in the listview's entry showing the text. * `element-text`: the widget in the listview's entry showing the text.
* `mode-switcher`: the main horizontal @box packing the buttons. * `mode-switcher`: the main horizontal @box packing the buttons.
* `button`: the buttons @textbox for each mode * `button`: the buttons @textbox for each mode
* `message`: The container holding the textbox. * `message`: The container holding the textbox.

View file

@ -424,7 +424,7 @@ static void listview_draw ( widget *wid, cairo_t *draw )
} }
unsigned int element_width = ( width ) / lv->cur_columns; unsigned int element_width = ( width ) / lv->cur_columns;
int d = lv->widget.w - (element_width+spacing_hori)*(lv->cur_columns-1)-element_width; int d = width - (element_width+spacing_hori)*(lv->cur_columns-1)-element_width;
if ( lv->cur_columns > 1) if ( lv->cur_columns > 1)
{ {
int diff = d/(lv->cur_columns-1); int diff = d/(lv->cur_columns-1);