summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2017-10-19 07:48:48 +0200
committerDave Davenport <qball@gmpclient.org>2017-10-19 07:48:48 +0200
commitfcaf8d81045d46ddfb7cb41cdb62b5c428ac930e (patch)
tree65a949a7031e1bb9d6326dec1dcd82c2ebb8f41c /source
parent65dfa23e2a9706e28427b04fdd8da105a94fec1d (diff)
Fix color conversion from old ARGB to RGBA (new)
Fixes: #693
Diffstat (limited to 'source')
-rw-r--r--source/theme.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/source/theme.c b/source/theme.c
index 277a1d5c..ba9dffe8 100644
--- a/source/theme.c
+++ b/source/theme.c
@@ -764,12 +764,16 @@ 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;
+ char a1 = r[1];
+ char a2 = r[2];
+ r[1] = r[3];
+ r[2] = r[4];
+ r[3] = r[5];
+ r[4] = r[6];
+ r[5] = r[7];
+ r[6] = r[8];
+ r[7] = a1;
+ r[8] = a2;
}
return r;