fix: Plot lines being invisible

This commit is contained in:
WerWolv
2023-02-17 10:02:43 +01:00
parent 35437c0300
commit e48761b5c0
4 changed files with 33 additions and 27 deletions

View File

@@ -31,6 +31,9 @@ namespace hex::api {
}
std::optional<ImColor> ThemeManager::parseColorString(const std::string &colorString) {
if (colorString == "auto")
return ImVec4(0, 0, 0, -1);
if (colorString.length() != 9 || colorString[0] != '#')
return std::nullopt;
@@ -48,6 +51,9 @@ namespace hex::api {
return std::nullopt;
}
if (color == 0x00000000)
return ImVec4(0, 0, 0, -1);
return ImColor(hex::changeEndianess(color, std::endian::big));
}