mirror of
https://github.com/lbonn/rofi
synced 2024-11-15 00:27:36 +00:00
Fix some conversion compatibility
This commit is contained in:
parent
a754815d14
commit
ed647dc4c1
2 changed files with 15 additions and 2 deletions
|
@ -7,6 +7,7 @@ const char *default_theme =
|
|||
" background: #FFFDF6E3;"
|
||||
" foreground: #FF002B36;"
|
||||
" bordercolor: @foreground;"
|
||||
" separatorcolor: @foreground;"
|
||||
" red: #FFDC322F;"
|
||||
" blue: #FF268BD2;"
|
||||
" lightbg: #FFEEE8D5;"
|
||||
|
@ -33,10 +34,11 @@ const char *default_theme =
|
|||
"#window {"
|
||||
" border: 1;"
|
||||
" foreground: @foreground;"
|
||||
" background: #00000000;"
|
||||
" padding: 5;"
|
||||
" background: @background;"
|
||||
"}"
|
||||
"#window.box {"
|
||||
" background: @background;"
|
||||
" foreground: @bordercolor;"
|
||||
"}"
|
||||
"#window.mainbox {"
|
||||
|
@ -46,6 +48,7 @@ const char *default_theme =
|
|||
"#window.mainbox.message.box {"
|
||||
" border: 1px dash 0px 0px ;"
|
||||
" padding: 2px 0px 0px ;"
|
||||
" foreground: @separatorcolor;"
|
||||
"}"
|
||||
"#window.mainbox.message.normal {"
|
||||
" foreground: @foreground;"
|
||||
|
@ -106,9 +109,10 @@ const char *default_theme =
|
|||
" spacing: 0;"
|
||||
"}"
|
||||
"#window.mainbox.inputbar.box {"
|
||||
" border: 0px 0px 0px 0px;"
|
||||
" "
|
||||
"}"
|
||||
"#window.mainbox.inputbar.normal {"
|
||||
" foreground: @foreground;"
|
||||
" background: @background;"
|
||||
"}";
|
||||
#endif
|
||||
|
|
|
@ -392,6 +392,15 @@ if ( queue == NULL ){
|
|||
yylval->colorval.blue = val.b/255.0;
|
||||
return T_COLOR;
|
||||
}
|
||||
<PROPERTIES>#{HEX}{3} {
|
||||
union { uint16_t val; struct { unsigned char b:4,g:4,r:4,a :4;};} val;
|
||||
val.val = (uint16_t )g_ascii_strtoull ( &yytext[1], NULL, 16);
|
||||
yylval->colorval.alpha = 1.0;
|
||||
yylval->colorval.red = val.r/16.0;
|
||||
yylval->colorval.green = val.g/16.0;
|
||||
yylval->colorval.blue = val.b/16.0;
|
||||
return T_COLOR;
|
||||
}
|
||||
<PROPERTIES>rgba\({NUMBER}{1,3},{NUMBER}{1,3},{NUMBER}{1,3},[01](\.{NUMBER}+)?\) {
|
||||
char *endptr = &yytext[5];
|
||||
yylval->colorval.red = g_ascii_strtoull ( endptr, &endptr, 10);
|
||||
|
|
Loading…
Reference in a new issue