diff options
author | Dave Davenport <qball@blame.services> | 2021-06-09 01:17:16 +0200 |
---|---|---|
committer | Dave Davenport <qball@blame.services> | 2021-06-09 01:17:16 +0200 |
commit | af8e2865c129d79eea15174e810ed04f545fb5e6 (patch) | |
tree | db26c61249579d1a83b00929a81d4a1649d8f0b4 /source | |
parent | f394d65e4b1731f8b21075782cffa65092f5588b (diff) |
[Theme] Allow theme to set icon independent of show-icons option.
Diffstat (limited to 'source')
-rw-r--r-- | source/widgets/listview.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/source/widgets/listview.c b/source/widgets/listview.c index 893f24de..e9af2efd 100644 --- a/source/widgets/listview.c +++ b/source/widgets/listview.c @@ -169,10 +169,8 @@ static void listview_add_widget ( listview *lv, _listview_row *row, widget *wid, { TextboxFlags flags = ( lv->multi_select ) ? TB_INDICATOR : 0; if ( strcasecmp ( label, "element-icon" ) == 0 ) { - if ( config.show_icons ) { - row->icon = icon_create ( WIDGET ( wid ), "element-icon" ); - box_add ( (box *) wid, WIDGET ( row->icon ), FALSE ); - } + row->icon = icon_create ( WIDGET ( wid ), "element-icon" ); + box_add ( (box *) wid, WIDGET ( row->icon ), FALSE ); } else if ( strcasecmp ( label, "element-text" ) == 0 ) { row->textbox = textbox_create ( WIDGET ( wid ), WIDGET_TYPE_TEXTBOX_TEXT, "element-text", TB_AUTOHEIGHT | flags, NORMAL, "DDD", 0, 0 ); @@ -196,7 +194,12 @@ static void listview_create_row ( listview *lv, _listview_row *row ) { row->box = box_create ( WIDGET ( lv ), "element", ROFI_ORIENTATION_HORIZONTAL ); widget_set_type ( WIDGET ( row->box ), WIDGET_TYPE_LISTVIEW_ELEMENT ); - GList *list = rofi_theme_get_list ( WIDGET ( row->box ), "children", "element-icon,element-text" ); + GList *list = NULL; + if ( config.show_icons ) { + list = rofi_theme_get_list ( WIDGET ( row->box ), "children", "element-icon,element-text" ); + } else { + list = rofi_theme_get_list ( WIDGET ( row->box ), "children", "element-text" ); + } row->textbox = NULL; row->icon = NULL; |