mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-11 13:50:48 -05:00
Support old argb:{HEX}{8} format.
This commit is contained in:
parent
38035568f3
commit
fcba4b8d34
1 changed files with 9 additions and 0 deletions
|
@ -93,6 +93,15 @@ YY_LLOC_START
|
|||
yylval->colorval.blue = val.b/255.0;
|
||||
return T_COLOR;
|
||||
}
|
||||
<PROPERTIES>argb:{HEX}{8} {
|
||||
union { unsigned int val; struct { unsigned char b,g,r,a;};} val;
|
||||
val.val = (unsigned int)strtoull ( &yytext[1], NULL, 16);
|
||||
yylval->colorval.alpha = val.a/255.0;
|
||||
yylval->colorval.red = val.r/255.0;
|
||||
yylval->colorval.green = val.g/255.0;
|
||||
yylval->colorval.blue = val.b/255.0;
|
||||
return T_COLOR;
|
||||
}
|
||||
<PROPERTIES>#{HEX}{6} {
|
||||
union { unsigned int val; struct { unsigned char b,g,r,a;};} val;
|
||||
val.val = (unsigned int)g_ascii_strtoull ( &yytext[1], NULL, 16);
|
||||
|
|
Loading…
Reference in a new issue