summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2017-05-16 21:55:52 +0200
committerDave Davenport <qball@gmpclient.org>2017-05-16 21:55:52 +0200
commit30fb8c514ed6eaf223ab6c79929a5745d7280b99 (patch)
treec530c4aa8786f46a7b7c8db16ba71fb5c06013b4
parent494550d38d572801ba3924611b09c7ca2b20610a (diff)
Change ARGB to RGBA, fix in theme converter
-rw-r--r--doc/default_theme.rasi14
-rw-r--r--doc/old-theme-convert-input.theme169
-rw-r--r--doc/old-theme-convert-output.rasi50
-rw-r--r--include/default-theme.h12
-rw-r--r--lexer/theme-lexer.l61
-rw-r--r--source/rofi.c19
-rw-r--r--source/theme.c42
-rw-r--r--test/theme-parser-test.c30
-rw-r--r--themes/Adapta-Nokto.rasi48
-rw-r--r--themes/Arc.rasi34
-rw-r--r--themes/DarkBlue.rasi36
-rw-r--r--themes/Indego.rasi48
-rw-r--r--themes/Monokai.rasi48
-rw-r--r--themes/Paper.rasi48
-rw-r--r--themes/android_notification.rasi46
-rw-r--r--themes/arthur.rasi2
-rw-r--r--themes/blue.rasi32
-rw-r--r--themes/c64.rasi46
-rw-r--r--themes/glue_pro_blue.rasi38
-rw-r--r--themes/gruvbox-dark-hard.rasi48
-rw-r--r--themes/gruvbox-dark-soft.rasi48
-rw-r--r--themes/gruvbox-dark.rasi48
-rw-r--r--themes/gruvbox-light-hard.rasi48
-rw-r--r--themes/gruvbox-light-soft.rasi48
-rw-r--r--themes/gruvbox-light.rasi48
-rw-r--r--themes/lb.rasi38
-rw-r--r--themes/paper-float.rasi46
-rw-r--r--themes/purple.rasi46
-rw-r--r--themes/sidebar.rasi2
-rw-r--r--themes/solarized.rasi48
-rw-r--r--themes/solarized_alternate.rasi46
31 files changed, 627 insertions, 710 deletions
diff --git a/doc/default_theme.rasi b/doc/default_theme.rasi
index 4f17f684..31ebf297 100644
--- a/doc/default_theme.rasi
+++ b/doc/default_theme.rasi
@@ -1,22 +1,22 @@
* {
- foreground: #FF002B36;
+ foreground: rgba ( 0, 43, 54, 255 );
selected-normal-foreground: @lightbg;
normal-foreground: @foreground;
- red: #FFDC322F;
+ red: rgba ( 220, 50, 47, 255 );
alternate-normal-background: @lightbg;
- blue: #FF268BD2;
+ blue: rgba ( 38, 139, 210, 255 );
selected-urgent-foreground: @background;
urgent-foreground: @red;
alternate-urgent-background: @lightbg;
active-foreground: @blue;
- lightbg: #FFEEE8D5;
+ lightbg: rgba ( 238, 232, 213, 255 );
selected-active-foreground: @background;
alternate-normal-foreground: @foreground;
alternate-active-background: @lightbg;
bordercolor: @foreground;
- background: #FFFDF6E3;
+ background: rgba ( 253, 246, 227, 255 );
normal-background: @background;
- lightfg: #FF586875;
+ lightfg: rgba ( 88, 104, 117, 255 );
selected-normal-background: @lightfg;
separatorcolor: @foreground;
spacing: 2;
@@ -30,7 +30,7 @@
#window {
border: 1;
foreground: @foreground;
- background: #00000000;
+ background: rgba ( 0, 0, 0, 0 );
padding: 5;
}
#window.box {
diff --git a/doc/old-theme-convert-input.theme b/doc/old-theme-convert-input.theme
index a3f19d73..eb4d2d4d 100644
--- a/doc/old-theme-convert-input.theme
+++ b/doc/old-theme-convert-input.theme
@@ -1,154 +1,15 @@
-background: rgba(0,0,0,0.0);
-foreground: rgba(1,1,1,1);
-font: "Ubuntu Mono 15";
-padding: 0;
-spacing: 0em;
-
-#window.mainbox.inputbar.box {
- padding: 5px 30px 5px 30px;
-
-}
-#window.mainbox.inputbar {
- background: #88003300;
- foreground: #FFFFFF;
- padding: 0px;
- end: false;
-}
-#mainbox.inputbar.entry {
- padding: 0px;
- border: 0px;
-}
-#mainbox.inputbar.prompt {
- padding: 0px;
-}
-#mainbox.inputbar.case-indicator
-{
- padding: 0px;
- border: 0px;
- end: true;
-}
-
-#window.mainbox.listview {
- fixed-height: true;
- border: 1px 1px 1px 1px;
- spacing: 0px;
- reverse: false;
-}
-#window.mainbox.listview.element {
- border: 1px;
- background: #22000000;
- padding: 5px;
-}
-#window.mainbox.inputbar.entry normal.normal {
- background: #00000000;
- foreground: #FFFFFF;
- padding: 0px;
-}
-#window.mainbox.inputbar.prompt normal.normal {
- background: #00000000;
- foreground: #FFFFFF;
- padding: 0px;
-}
-#window.mainbox.inputbar.case-indicator normal.normal {
- background: #00000000;
- foreground: #FFFFFF;
- padding: 0px;
-}
-
-#window.mainbox.inputbar.separator {
- background: #FF0000;
- foreground: #FFFFFF;
- padding: 0px;
- end: false;
-}
-
-#window.mainbox.box {
- foreground: #ffffff;
- background: #aaFFFFFF;
- border: 2px dash 2px dash 0px 2px dash;
-}
-#window.mainbox {
- background: #00000000;
- padding: 0px;
- border: 0px;
- foreground: #ffffff;
-}
-
-#window.mainbox.listview.element normal.normal {
- foreground: #002b36;
-}
-#window.mainbox.listview.element selected.normal {
- foreground: #ffffff;
- background: #770000f5;
-}
-#window.mainbox.listview.element alternate.normal {
- foreground: #002b36;
-}
-#window.mainbox.listview.element normal.urgent {
- foreground: #473f00;
-}
-#window.mainbox.listview.element selected.urgent {
- background: #aa673f00;
- foreground: #ffffff;
-}
-#window.mainbox.listview.element alternate.urgent {
- foreground: #473f00;
-}
-#window.mainbox.listview.element normal.active {
- foreground: #005f87;
-}
-#window.mainbox.listview.element selected.active {
- background: #aa008fa7;
- foreground: #FFFFFF;
-}
-#window.mainbox.listview.element alternate.active {
- foreground: #005f87;
-}
-/**
- * Override the sidebar button
- * Change color of text on selected.
- */
-#sidebar.button normal {
- foreground: #444444;
-}
-#sidebar.button selected {
- foreground: #4271ae;
-}
-
-#window.mainbox.listview {
- scrollbar: true;
- scrollbar-width: 5px;
- padding: 30px 30px 5px 30px;
- spacing: 0em;
- dynamic: true;
- border: 0px;
- fixed-height: true;
- border: 2px 0px 0px 0px;
-}
-#window.mainbox.listview.scrollbar {
- border: 1px 1px 1px 0px;
- foreground: #000000;
- background: #88003300;
- padding: 2px;
-}
-#window.mainbox.listview.scrollbar handle {
- foreground: #d75f00;
- padding: 2px;
-}
-
-#window {
- border: 4px 4px 0px 4px;
- padding: 5% 5% 0% 5%;
- border-width: 2;
- transparency: "real";
- background: #aa000000;
- foreground: #aaaaaa;
-}
-#window.message.textbox {
- foreground: #000000;
- border: 1px;
- padding: 10px;
-}
-#window.message {
- end: false;
-}
+! ------------------------------------------------------------------------------
+! ROFI Color theme
+! User: qball
+! Copyright: Dave Davenport
+! ------------------------------------------------------------------------------
+! "Color scheme for normal row" Set from: File
+rofi.color-normal: argb:00000000, #dbdfbc, argb:00000000, #dbdfbc, #02143f
+! "Color scheme for urgent row" Set from: File
+rofi.color-urgent: argb:00000000, #ff81ff, argb:00000000, #ff817f, #02143f
+! "Color scheme for active row" Set from: File
+rofi.color-active: argb:00000000, #8ac4ff, argb:00000000, #8ac4ff, #02143f
+! "Color scheme window" Set from: File
+rofi.color-window: argb:dd000021, #dbdfbc, #dbdfbc
+! "Separator style (none, dash, solid)" Set from: XResources
+rofi.separator-style: solid
diff --git a/doc/old-theme-convert-output.rasi b/doc/old-theme-convert-output.rasi
index 4f17f684..d65afc01 100644
--- a/doc/old-theme-convert-output.rasi
+++ b/doc/old-theme-convert-output.rasi
@@ -1,36 +1,36 @@
* {
- foreground: #FF002B36;
- selected-normal-foreground: @lightbg;
+ foreground: rgba ( 219, 223, 188, 100 % );
+ selected-normal-foreground: rgba ( 2, 20, 63, 100 % );
normal-foreground: @foreground;
- red: #FFDC322F;
- alternate-normal-background: @lightbg;
- blue: #FF268BD2;
- selected-urgent-foreground: @background;
- urgent-foreground: @red;
- alternate-urgent-background: @lightbg;
- active-foreground: @blue;
- lightbg: #FFEEE8D5;
- selected-active-foreground: @background;
+ red: rgba ( 220, 50, 47, 100 % );
+ alternate-normal-background: rgba ( 0, 0, 0, 0 % );
+ blue: rgba ( 38, 139, 210, 100 % );
+ selected-urgent-foreground: rgba ( 2, 20, 63, 100 % );
+ urgent-foreground: rgba ( 255, 129, 255, 100 % );
+ alternate-urgent-background: rgba ( 0, 0, 0, 0 % );
+ active-foreground: rgba ( 138, 196, 255, 100 % );
+ lightbg: rgba ( 238, 232, 213, 100 % );
+ selected-active-foreground: rgba ( 2, 20, 63, 100 % );
alternate-normal-foreground: @foreground;
- alternate-active-background: @lightbg;
- bordercolor: @foreground;
- background: #FFFDF6E3;
- normal-background: @background;
- lightfg: #FF586875;
- selected-normal-background: @lightfg;
- separatorcolor: @foreground;
+ alternate-active-background: rgba ( 0, 0, 0, 0 % );
+ bordercolor: rgba ( 219, 223, 188, 100 % );
+ background: rgba ( 0, 0, 33, 87 % );
+ normal-background: rgba ( 0, 0, 0, 0 % );
+ lightfg: rgba ( 88, 104, 117, 100 % );
+ selected-normal-background: rgba ( 219, 223, 188, 100 % );
+ separatorcolor: rgba ( 219, 223, 188, 100 % );
spacing: 2;
- urgent-background: @background;
- alternate-urgent-foreground: @red;
- selected-urgent-background: @red;
- alternate-active-foreground: @blue;
- selected-active-background: @blue;
- active-background: @background;
+ urgent-background: rgba ( 0, 0, 0, 0 % );
+ alternate-urgent-foreground: @urgent-foreground;
+ selected-urgent-background: rgba ( 255, 129, 127, 100 % );
+ alternate-active-foreground: @active-foreground;
+ selected-active-background: rgba ( 138, 196, 255, 100 % );
+ active-background: rgba ( 0, 0, 0, 0 % );
}
#window {
border: 1;
foreground: @foreground;
- background: #00000000;
+ background: rgba ( 0, 0, 0, 0 % );
padding: 5;
}
#window.box {
diff --git a/include/default-theme.h b/include/default-theme.h
index 516459e1..3ad0dcbd 100644
--- a/include/default-theme.h
+++ b/include/default-theme.h
@@ -31,14 +31,14 @@
const char *default_theme =
"* {"
" spacing: 2;"
- " background: #FFFDF6E3;"
- " foreground: #FF002B36;"
+ " background: #FDF6E3FF;"
+ " foreground: #002B36FF;"
" bordercolor: @foreground;"
" separatorcolor: @foreground;"
- " red: #FFDC322F;"
- " blue: #FF268BD2;"
- " lightbg: #FFEEE8D5;"
- " lightfg: #FF586875;"
+ " red: #DC322FFF;"
+ " blue: #268BD2FF;"
+ " lightbg: #EEE8D5FF;"
+ " lightfg: #586875FF;"
" normal-foreground: @foreground;"
" normal-background: @background;"
" urgent-foreground: @red;"
diff --git a/lexer/theme-lexer.l b/lexer/theme-lexer.l
index 72d569c7..36fbccab 100644
--- a/lexer/theme-lexer.l
+++ b/lexer/theme-lexer.l
@@ -37,6 +37,7 @@
#include <gio/gio.h>
#include <helper.h>
#include <math.h>
+#include <ctype.h>
#include "rofi.h"
#include "theme.h"
@@ -84,6 +85,21 @@ GQueue *queue = NULL;
ParseObject *current = NULL;
static char * rofi_theme_parse_prepare_file ( const char *file, const char *parent_file );
+
+
+static double rofi_theme_parse_convert_hex ( char high, char low)
+{
+ uint8_t retv = 0;
+
+ int t = toupper(high);
+ t = ( t > '9')? (t-'A'+10):(t-'0');
+ retv = t<<4;
+ t = toupper ( low );
+ t = ( t > '9')? (t-'A'+10):(t-'0');
+ retv +=t;
+ return retv/255.0;
+}
+
%}
%{
@@ -388,39 +404,38 @@ if ( queue == NULL ){
* Other schemes are done at yacc level.
*/
<PROPERTIES>#{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;
+ yylval->colorval.red = rofi_theme_parse_convert_hex(yytext[1],yytext[2]);
+ yylval->colorval.green = rofi_theme_parse_convert_hex(yytext[3],yytext[4]);
+ yylval->colorval.blue = rofi_theme_parse_convert_hex(yytext[5],yytext[6]);
+ yylval->colorval.alpha = rofi_theme_parse_convert_hex(yytext[7],yytext[8]);
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);
yylval->colorval.alpha = 1.0;
- yylval->colorval.red = val.r/255.0;
- yylval->colorval.green = val.g/255.0;
- yylval->colorval.blue = val.b/255.0;
+ yylval->colorval.red = rofi_theme_parse_convert_hex(yytext[1],yytext[2]);
+ yylval->colorval.green = rofi_theme_parse_convert_hex(yytext[3],yytext[4]);
+ yylval->colorval.blue = rofi_theme_parse_convert_hex(yytext[5],yytext[6]);
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/15.0;
- yylval->colorval.green = val.g/15.0;
- yylval->colorval.blue = val.b/15.0;
+ yylval->colorval.red = rofi_theme_parse_convert_hex(yytext[1],yytext[1]);
+ yylval->colorval.green = rofi_theme_parse_convert_hex(yytext[2],yytext[2]);
+ yylval->colorval.blue = rofi_theme_parse_convert_hex(yytext[3],yytext[3]);
+ return T_COLOR;
+}
+<PROPERTIES>#{HEX}{4} {
+ yylval->colorval.alpha = rofi_theme_parse_convert_hex(yytext[4],yytext[4]);
+ yylval->colorval.red = rofi_theme_parse_convert_hex(yytext[1],yytext[1]);
+ yylval->colorval.green = rofi_theme_parse_convert_hex(yytext[2],yytext[2]);
+ yylval->colorval.blue = rofi_theme_parse_convert_hex(yytext[3],yytext[3]);
return T_COLOR;
}
-<PROPERTIES>argb:{HEX}{1,8} {
- union { unsigned int val; struct { unsigned char b,g,r,a;};} val;
- val.val = (unsigned int)strtoull ( &yytext[5], 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;
+<PROPERTIES>argb:{HEX}{8} {
+ yylval->colorval.alpha = rofi_theme_parse_convert_hex(yytext[5],yytext[6]);
+ yylval->colorval.red = rofi_theme_parse_convert_hex(yytext[7],yytext[8]);
+ yylval->colorval.green = rofi_theme_parse_convert_hex(yytext[9],yytext[10]);
+ yylval->colorval.blue = rofi_theme_parse_convert_hex(yytext[11],yytext[12]);
return T_COLOR;
}
/* Color schemes */
diff --git a/source/rofi.c b/source/rofi.c
index 4ca2460e..e802f0ed 100644
--- a/source/rofi.c
+++ b/source/rofi.c
@@ -1148,17 +1148,16 @@ int main ( int argc, char *argv[] )
// Load in config from X resources.
config_parse_xresource_options ( xcb );
config_parse_xresource_options_file ( config_path );
-
- find_arg_str ( "-theme", &( config.theme ) );
- if ( config.theme ) {
- TICK_N ( "Parse theme" );
- if ( rofi_theme_parse_file ( config.theme ) ) {
- // TODO: instantiate fallback theme.?
- rofi_theme_free ( rofi_theme );
- rofi_theme = NULL;
- }
- TICK_N ( "Parsed theme" );
+ }
+ find_arg_str ( "-theme", &( config.theme ) );
+ if ( config.theme ) {
+ TICK_N ( "Parse theme" );
+ if ( rofi_theme_parse_file ( config.theme ) ) {
+ // TODO: instantiate fallback theme.?
+ rofi_theme_free ( rofi_theme );
+ rofi_theme = NULL;
}
+ TICK_N ( "Parsed theme" );
}
// Parse command line for settings, independent of other -no-config.
config_parse_cmd_options ( );
diff --git a/source/theme.c b/source/theme.c
index 985d62c2..03f3e859 100644
--- a/source/theme.c
+++ b/source/theme.c
@@ -173,11 +173,11 @@ static void rofi_theme_print_property_index ( size_t pnl, int depth, Property *p
printf ( "italic " );
}
if ( p->value.highlight.style & HL_COLOR ) {
- printf ( "#%02X%02X%02X%02X",
- (unsigned char) ( p->value.highlight.color.alpha * 255.0 ),
- (unsigned char) ( p->value.highlight.color.red * 255.0 ),
- (unsigned char) ( p->value.highlight.color.green * 255.0 ),
- (unsigned char) ( p->value.highlight.color.blue * 255.0 ) );
+ printf ( "rgba ( %.0f, %.0f, %.0f, %.0f %% )",
+ ( p->value.highlight.color.red * 255.0 ),
+ ( p->value.highlight.color.green * 255.0 ),
+ ( p->value.highlight.color.blue * 255.0 ),
+ ( p->value.highlight.color.alpha * 100.0 ) );
}
printf ( ";" );
break;
@@ -197,11 +197,11 @@ static void rofi_theme_print_property_index ( size_t pnl, int depth, Property *p
printf ( "%s;", p->value.b ? "true" : "false" );
break;
case P_COLOR:
- printf ( "#%02X%02X%02X%02X;",
- (unsigned char) ( p->value.color.alpha * 255.0 ),
- (unsigned char) ( p->value.color.red * 255.0 ),
- (unsigned char) ( p->value.color.green * 255.0 ),
- (unsigned char) ( p->value.color.blue * 255.0 ) );
+ printf ( "rgba ( %.0f, %.0f, %.0f, %.0f %% );",
+ ( p->value.color.red * 255.0 ),
+ ( p->value.color.green * 255.0 ),
+ ( p->value.color.blue * 255.0 ),
+ ( p->value.color.alpha * 100.0 ) );
break;
case P_PADDING:
if ( distance_compare ( p->value.padding.top, p->value.padding.bottom ) &&
@@ -635,6 +635,20 @@ gboolean rofi_theme_is_empty ( void )
#ifdef THEME_CONVERTER
+static char * rofi_theme_convert_color ( char *col )
+{
+ char *r = g_strstrip ( col );
+ if ( *r == '#' && strlen ( r ) == 9 ) {
+ char t1 = r[7];
+ char t2 = r[8];
+ r[7] = r[1];
+ r[8] = r[2];
+ r[1] = t1;
+ r[2] = t2;
+ }
+
+ return r;
+}
void rofi_theme_convert_old ( void )
{
if ( config.color_window ) {
@@ -645,7 +659,7 @@ void rofi_theme_convert_old ( void )
"* { separatorcolor: %s; }"
};
for ( int i = 0; retv && retv[i] && i < 3; i++ ) {
- char *str = g_strdup_printf ( conf[i], retv[i] );
+ char *str = g_strdup_printf ( conf[i], rofi_theme_convert_color ( retv[i] ) );
rofi_theme_parse_string ( str );
g_free ( str );
}
@@ -661,7 +675,7 @@ void rofi_theme_convert_old ( void )
"* { selected-normal-foreground: %s; }"
};
for ( int i = 0; retv && retv[i]; i++ ) {
- char *str = g_strdup_printf ( conf[i], retv[i] );
+ char *str = g_strdup_printf ( conf[i], rofi_theme_convert_color ( retv[i] ) );
rofi_theme_parse_string ( str );
g_free ( str );
}
@@ -677,7 +691,7 @@ void rofi_theme_convert_old ( void )
"* { selected-urgent-foreground: %s; }"
};
for ( int i = 0; retv && retv[i]; i++ ) {
- char *str = g_strdup_printf ( conf[i], retv[i] );
+ char *str = g_strdup_printf ( conf[i], rofi_theme_convert_color ( retv[i] ) );
rofi_theme_parse_string ( str );
g_free ( str );
}
@@ -693,7 +707,7 @@ void rofi_theme_convert_old ( void )
"* { selected-active-foreground: %s; }"
};
for ( int i = 0; retv && retv[i]; i++ ) {
- char *str = g_strdup_printf ( conf[i], retv[i] );
+ char *str = g_strdup_printf ( conf[i], rofi_theme_convert_color ( retv[i] ) );
rofi_theme_parse_string ( str );
g_free ( str );
}
diff --git a/test/theme-parser-test.c b/test/theme-parser-test.c
index ba9538db..fc95f5f0 100644
--- a/test/theme-parser-test.c
+++ b/test/theme-parser-test.c
@@ -457,12 +457,39 @@ START_TEST ( test_properties_color_h6 )
}
END_TEST
+START_TEST ( test_properties_color_h4 )
+{
+ widget wid;
+ wid.name = "blaat";
+ wid.state = NULL;
+ rofi_theme_parse_string ( "* { red: #F003; green: #0F02; blue: #00F1; }");
+ ThemeWidget *twid = rofi_theme_find_widget ( wid.name, wid.state, FALSE );
+ Property *p = rofi_theme_find_property ( twid, P_COLOR, "red", FALSE );
+ ck_assert_ptr_nonnull ( p );
+ ck_assert_double_eq ( p->value.color.alpha , 0.2 );
+ ck_assert_double_eq ( p->value.color.red , 1 );
+ ck_assert_double_eq ( p->value.color.green , 0 );
+ ck_assert_double_eq ( p->value.color.blue , 0 );
+ p = rofi_theme_find_property ( twid, P_COLOR, "green", FALSE );
+ ck_assert_ptr_nonnull ( p );
+ ck_assert_double_eq ( p->value.color.alpha , 1/7.5 );
+ ck_assert_double_eq ( p->value.color.red , 0 );
+ ck_assert_double_eq ( p->value.color.green , 1 );
+ ck_assert_double_eq ( p->value.color.blue , 0 );
+ p = rofi_theme_find_property ( twid, P_COLOR, "blue", FALSE );
+ ck_assert_ptr_nonnull ( p );
+ ck_assert_double_eq ( p->value.color.alpha , 1/15.0 );
+ ck_assert_double_eq ( p->value.color.red , 0 );
+ ck_assert_double_eq ( p->value.color.green , 0 );
+ ck_assert_double_eq ( p->value.color.blue , 1 );
+}
+END_TEST
START_TEST ( test_properties_color_h8 )
{
widget wid;
wid.name = "blaat";
wid.state = NULL;
- rofi_theme_parse_string ( "* { red: #33FF0000; green: #2200FF00; blue: #110000FF; }");
+ rofi_theme_parse_string ( "* { red: #FF000033; green: #00FF0022; blue: #0000FF11; }");
ThemeWidget *twid = rofi_theme_find_widget ( wid.name, wid.state, FALSE );
Property *p = rofi_theme_find_property ( twid, P_COLOR, "red", FALSE );
ck_assert_ptr_nonnull ( p );
@@ -997,6 +1024,7 @@ static Suite * theme_parser_suite (void)
TCase *tc_prop_color = tcase_create("PropertiesColor");
tcase_add_checked_fixture(tc_prop_color, theme_parser_setup, theme_parser_teardown);
tcase_add_test ( tc_prop_color, test_properties_color_h3);
+ tcase_add_test ( tc_prop_color, test_properties_color_h4);
tcase_add_test ( tc_prop_color, test_properties_color_h6);
tcase_add_test ( tc_prop_color, test_properties_color_h8);
tcase_add_test ( tc_prop_color, test_properties_color_rgb);
diff --git a/themes/Adapta-Nokto.rasi b/themes/Adapta-Nokto.rasi
index 8dd4bc38..0738fb5d 100644
--- a/themes/Adapta-Nokto.rasi
+++ b/themes/Adapta-Nokto.rasi
@@ -10,9 +10,9 @@
}
#window {
border: 2;
- foreground: #FFC3C6C8;
+ foreground: #C3C6C8FF;
padding: 5;
- background: #FF3A4C54;
+ background: #3A4C54FF;
}
#window.mainbox {
border: 0;
@@ -23,8 +23,8 @@
padding: 2px 0px 0px ;
}
#window.mainbox.message.normal {
- foreground: #FFFAFBFC;
- background: #FF455A64;
+ foreground: #FAFBFCFF;
+ background: #455A64FF;
}
#window.mainbox.listview {
fixed-height: 1;
@@ -36,40 +36,40 @@
border: 0;
}
#window.mainbox.listview.element.normal.normal {
- foreground: #FFFAFBFC;
- background: #FF455A64;
+ foreground: #FAFBFCFF;
+ background: #455A64FF;
}
#window.mainbox.listview.element.normal.urgent {
- foreground: #FFFF5252;
- background: #FF455A64;
+ foreground: #FF5252FF;
+ background: #455A64FF;
}
#window.mainbox.listview.element.normal.active {
- foreground: #FF00BCD4;
- background: #FF455A64;
+ foreground: #00BCD4FF;
+ background: #455A64FF;
}
#window.mainbox.listview.element.selected.normal {
- foreground: #FFFAFBFC;
- background: #FF00BCD4;
+ foreground: #FAFBFCFF;
+ background: #00BCD4FF;
}
#window.mainbox.listview.element.selected.urgent {
- foreground: #FFFDF6E3;
- background: #FFFF5252;
+ foreground: #FDF6E3FF;
+ background: #FF5252FF;
}
#window.mainbox.listview.element.selected.active {
- foreground: #FFFDF6E3;
- background: #FF009688;
+ foreground: #FDF6E3FF;
+ background: #009688FF;
}
#window.mainbox.listview.element.alternate.normal {
- foreground: #FFFAFBFC;
- background: #FF455A64;
+ foreground: #FAFBFCFF;
+ background: #455A64FF;
}
#window.mainbox.listview.element.alternate.urgent {
- foreground: #FFFF5252;
- background: #FF455A64;
+ foreground: #FF5252FF;
+ background: #455A64FF;
}
#window.mainbox.listview.element.alternate.active {
- foreground: #FF00BCD4;
- background: #FF455A64;
+ foreground: #00BCD4FF;
+ background: #455A64FF;
}
#window.mainbox.listview.scrollbar {
border: 0;
@@ -84,6 +84,6 @@
#window.mainbox.inputbar.box {
}
#window.mainbox.inputbar.normal {
- foreground: #FFFAFBFC;
- background: #FF455A64;
+ foreground: #FAFBFCFF;
+ background: #455A64FF;
}
diff --git a/themes/Arc.rasi b/themes/Arc.rasi
index b58be36b..dfdbd476 100644
--- a/themes/Arc.rasi
+++ b/themes/Arc.rasi
@@ -10,7 +10,7 @@
}
#window {
border: 2;
- foreground: #FFF5F5F5;
+ foreground: #F5F5F5FF;
padding: 5;
background: #FFFFFFFF;
}
@@ -23,7 +23,7 @@
padding: 2px 0px 0px ;
}
#window.mainbox.message.normal {
- foreground: #FF525D76;
+ foreground: #525D76FF;
background: #FFFFFFFF;
}
#window.mainbox.listview {
@@ -36,40 +36,40 @@
border: 0;
}
#window.mainbox.listview.element.normal.normal {
- foreground: #FF525D76;
+ foreground: #525D76FF;
background: #FFFFFFFF;
}
#window.mainbox.listview.element.normal.urgent {
- foreground: #FFDC322F;
+ foreground: #DC322FFF;
background: #FFFFFFFF;
}
#window.mainbox.listview.element.normal.active {
- foreground: #FFC2CAD0;
+ foreground: #C2CAD0FF;
background: #FFFFFFFF;
}
#window.mainbox.listview.element.selected.normal {
foreground: #FFFFFFFF;
- background: #FF5294E2;
+ background: #5294E2FF;
}
#window.mainbox.listview.element.selected.urgent {
- foreground: #FFDC322F;
- background: #FF5294E2;
+ foreground: #DC322FFF;
+ background: #5294E2FF;
}
#window.mainbox.listview.element.selected.active {
- foreground: #FFC2CAD0;
- background: #FF5294E2;
+ foreground: #C2CAD0FF;
+ background: #5294E2FF;
}
#window.mainbox.listview.element.alternate.normal {
- foreground: #FF525D76;
- background: #FFF5F5F5;
+ foreground: #525D76FF;
+ background: #F5F5F5FF;
}
#window.mainbox.listview.element.alternate.urgent {
- foreground: #FFDC322F;
- background: #FFF5F5F5;
+ foreground: #DC322FFF;
+ background: #F5F5F5