diff --git a/man/wofi.5 b/man/wofi.5 index e52a4c9..fe6ab7d 100644 --- a/man/wofi.5 +++ b/man/wofi.5 @@ -141,15 +141,19 @@ The name of all the text in entries. .TP .B #unselected .br -The name of all entries currently unselected. +The name of all entries currently unselected. A better way of doing this is to do #entry and combine that with #entry:selected .TP .B #selected .br -The name of all entries currently selected. +The name of all entries currently selected. A better way of doing this is to do #entry:selected .TP .B .entry .br -The class attached to all entries. +The class attached to all entries. This is attached to the inside property box and is old, you probably want #entry instead +.TP +.B #entry +.br +The name of all entries. .SH COLORS The colors file should be formatted as new line separated hex values. These values should be in the standard HTML format and begin with a hash. diff --git a/man/wofi.7 b/man/wofi.7 index 3ff84db..3096bbf 100644 --- a/man/wofi.7 +++ b/man/wofi.7 @@ -76,11 +76,11 @@ This section is for advanced CSS which needs more control than the built in wofi .RS 4 .B flowbox \- #inner\-box .RS 4 -.B flowboxchild +.B flowboxchild \- #entry .RS 4 .B .entry \- #unselected or #selected .br -This is a WofiPropertyBox which has no CSS node however the .entry class is attached, the name is dependent on whether or not the entry is selected. +This is a WofiPropertyBox which has no CSS node and should probably not be used, the name is dependent on whether or not the entry is selected. See \fBwofi\fR(5) on #selected and #unselected for info. .RS 4 .B image diff --git a/src/wofi.c b/src/wofi.c index e23a33b..73ba8c5 100644 --- a/src/wofi.c +++ b/src/wofi.c @@ -379,13 +379,22 @@ static gboolean _insert_widget(gpointer data) { gtk_container_add(GTK_CONTAINER(parent), exp_box); for(size_t count = 1; count < node->action_count; ++count) { box = create_label(node->mode, node->text[count], node->search_text, node->actions[count]); - gtk_container_add(GTK_CONTAINER(exp_box), box); + + GtkWidget* row = gtk_list_box_row_new(); + gtk_widget_set_name(row, "entry"); + + gtk_container_add(GTK_CONTAINER(row), box); + gtk_container_add(GTK_CONTAINER(exp_box), row); } } else { parent = create_label(node->mode, node->text[0], node->search_text, node->actions[0]); } - gtk_container_add(GTK_CONTAINER(inner_box), parent); - gtk_widget_show_all(parent); + GtkWidget* child = gtk_flow_box_child_new(); + gtk_widget_set_name(child, "entry"); + + gtk_container_add(GTK_CONTAINER(child), parent); + gtk_container_add(GTK_CONTAINER(inner_box), child); + gtk_widget_show_all(child); if(GTK_IS_EXPANDER(parent)) { GtkWidget* box = gtk_bin_get_child(GTK_BIN(parent));