mirror of
https://github.com/polybar/polybar.git
synced 2024-11-18 13:55:11 -05:00
fix(builder): Don't truncate colors with same channels
The builder would convert bg and fg colors like #00000000 to #000 which would make it loose its alpha channel. Fixes #1183
This commit is contained in:
parent
758dbb85ed
commit
3408db3475
1 changed files with 0 additions and 4 deletions
|
@ -356,8 +356,6 @@ void builder::background(string color) {
|
|||
string bg{background_hex()};
|
||||
color = "#" + color.substr(color.length() - 2);
|
||||
color += bg.substr(bg.length() - (bg.length() < 6 ? 3 : 6));
|
||||
} else if (color.length() >= 7 && color == "#" + string(color.length() - 1, color[1])) {
|
||||
color = color.substr(0, 4);
|
||||
}
|
||||
|
||||
color = color_util::simplify_hex(color);
|
||||
|
@ -383,8 +381,6 @@ void builder::color(string color) {
|
|||
color = "#" + color.substr(color.length() - 2);
|
||||
color += fg.substr(fg.length() - (fg.length() < 6 ? 3 : 6));
|
||||
}
|
||||
} else if (color.length() >= 7 && color == "#" + string(color.length() - 1, color[1])) {
|
||||
color = color.substr(0, 4);
|
||||
}
|
||||
|
||||
color = color_util::simplify_hex(color);
|
||||
|
|
Loading…
Reference in a new issue