diff --git a/include/textbox.h b/include/textbox.h index 735f3dcb..440c96b0 100644 --- a/include/textbox.h +++ b/include/textbox.h @@ -34,8 +34,6 @@ typedef enum { NORMAL, HIGHLIGHT, - ACTIVE_HIGHLIGHT, - ACTIVE } TextBoxFontType; textbox* textbox_create ( Window parent, diff --git a/source/rofi.c b/source/rofi.c index f073c454..6eb22170 100644 --- a/source/rofi.c +++ b/source/rofi.c @@ -803,13 +803,6 @@ void menu_draw ( textbox **boxes, else{ char *text = filtered[i + offset]; TextBoxFontType tbft = ( i + offset ) == selected ? HIGHLIGHT : NORMAL; - // Check for active - if ( text[0] == '*' ) { - // Skip the '*' - text++; - // Use the active version of font. - tbft = ( tbft == HIGHLIGHT ) ? ACTIVE_HIGHLIGHT : ACTIVE; - } textbox_font ( boxes[i], tbft ); textbox_text ( boxes[i], text ); } @@ -1626,11 +1619,11 @@ SwitcherMode run_switcher_window ( char **input, void *data ) } #ifdef HAVE_I3_IPC_H if ( config_i3_mode ) { - sprintf ( pattern, "%%s%%-%ds %%s", MAX ( 5, classfield ) ); + sprintf ( pattern, "%%-%ds %%s", MAX ( 5, classfield ) ); } else{ #endif - sprintf ( pattern, "%%s%%-%ds %%-%ds %%s", desktops < 10 ? 1 : 2, MAX ( 5, classfield ) ); + sprintf ( pattern, "%%-%ds %%-%ds %%s", desktops < 10 ? 1 : 2, MAX ( 5, classfield ) ); #ifdef HAVE_I3_IPC_H } #endif @@ -1662,11 +1655,11 @@ SwitcherMode run_switcher_window ( char **input, void *data ) sprintf ( desktop, "%d", (int) wmdesktop + 1 ); } - sprintf ( line, pattern, ( c->active ) ? "*" : "", desktop, c->class, c->title ); + sprintf ( line, pattern, desktop, c->class, c->title ); #ifdef HAVE_I3_IPC_H } else{ - sprintf ( line, pattern, ( c->active ) ? "*" : "", c->class, c->title ); + sprintf ( line, pattern, c->class, c->title ); } #endif diff --git a/source/textbox.c b/source/textbox.c index 8cb840f0..20afc606 100644 --- a/source/textbox.c +++ b/source/textbox.c @@ -107,31 +107,18 @@ textbox* textbox_create ( Window parent, // set an Xft font by name void textbox_font ( textbox *tb, TextBoxFontType tbft ) { - PangoFontDescription *pfd = pango_font_description_from_string ( config.menu_font ); switch ( tbft ) { case HIGHLIGHT: tb->color_bg = color_hlbg; tb->color_fg = color_hlfg; break; - case ACTIVE: - pango_font_description_set_style ( pfd, PANGO_STYLE_ITALIC ); - tb->color_bg = color_bg; - tb->color_fg = color_fg; - break; - case ACTIVE_HIGHLIGHT: - pango_font_description_set_style ( pfd, PANGO_STYLE_ITALIC ); - tb->color_bg = color_hlbg; - tb->color_fg = color_hlfg; - break; case NORMAL: default: tb->color_bg = color_bg; tb->color_fg = color_fg; break; } - pango_layout_set_font_description ( tb->layout, pfd ); - pango_font_description_free ( pfd ); } // outer code may need line height, width, etc