mirror of
https://github.com/hyprwm/hyprlock.git
synced 2025-02-03 16:29:48 +01:00
core: fix parsing grad with decimal rgb(a) colors (#595)
* Revert "config: use removeEmpty for the gradient varlist (#565)"
This reverts commit 578246b996
.
* config: ignore empty grad components
This commit is contained in:
parent
f2c153c09b
commit
8a9f05fa1f
1 changed files with 4 additions and 1 deletions
|
@ -78,7 +78,7 @@ static Hyprlang::CParseResult configHandleGradientSet(const char* VALUE, void**
|
|||
|
||||
const auto DATA = reinterpret_cast<CGradientValueData*>(*data);
|
||||
|
||||
CVarList varlist(V, 0, ' ', true);
|
||||
CVarList varlist(V, 0, ' ');
|
||||
DATA->m_vColors.clear();
|
||||
DATA->m_bIsFallback = false;
|
||||
|
||||
|
@ -103,6 +103,9 @@ static Hyprlang::CParseResult configHandleGradientSet(const char* VALUE, void**
|
|||
break;
|
||||
}
|
||||
|
||||
if (var.empty())
|
||||
continue;
|
||||
|
||||
try {
|
||||
DATA->m_vColors.push_back(CColor(configStringToInt(var)));
|
||||
} catch (std::exception& e) {
|
||||
|
|
Loading…
Reference in a new issue