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

Remove Active mode. IT causes problems with matching and has limited use.

This commit is contained in:
QC 2014-08-03 17:21:42 +02:00
parent 8ba11b2fe3
commit 9bbb79a888
3 changed files with 4 additions and 26 deletions

View file

@ -34,8 +34,6 @@ typedef enum
{
NORMAL,
HIGHLIGHT,
ACTIVE_HIGHLIGHT,
ACTIVE
} TextBoxFontType;
textbox* textbox_create ( Window parent,

View file

@ -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

View file

@ -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