mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
[Textbox] Allow theme to force markup enabled on textbox.
rofi -theme-str 'prompt { markup: true; }' -show drun -display-drun '<i>d</i>ru<b>n</b>' fixes: #1220
This commit is contained in:
parent
af6752c35d
commit
9313d7a8a0
1 changed files with 7 additions and 2 deletions
|
@ -183,10 +183,15 @@ textbox* textbox_create ( widget *parent, WidgetType type, const char *name, Tex
|
|||
|
||||
textbox_initialize_font ( tb );
|
||||
|
||||
if ( ( flags & TB_WRAP ) == TB_WRAP ) {
|
||||
if ( ( tb->flags & TB_WRAP ) == TB_WRAP ) {
|
||||
pango_layout_set_wrap ( tb->layout, PANGO_WRAP_WORD_CHAR );
|
||||
}
|
||||
|
||||
// Allow overriding of markup.
|
||||
if ( rofi_theme_get_boolean ( WIDGET ( tb ), "markup", FALSE) ) {
|
||||
tb->flags |= TB_MARKUP;
|
||||
}
|
||||
|
||||
const char *txt = rofi_theme_get_string ( WIDGET ( tb ), "str", text );
|
||||
if ( txt == NULL || ( *txt ) == '\0' ) {
|
||||
txt = rofi_theme_get_string ( WIDGET ( tb ), "content", text );
|
||||
|
@ -203,7 +208,7 @@ textbox* textbox_create ( widget *parent, WidgetType type, const char *name, Tex
|
|||
|
||||
tb->blink_timeout = 0;
|
||||
tb->blink = 1;
|
||||
if ( ( flags & TB_EDITABLE ) == TB_EDITABLE ) {
|
||||
if ( ( tb->flags & TB_EDITABLE ) == TB_EDITABLE ) {
|
||||
if ( rofi_theme_get_boolean ( WIDGET ( tb ), "blink", TRUE ) ) {
|
||||
tb->blink_timeout = g_timeout_add ( 1200, textbox_blink, tb );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue