summaryrefslogtreecommitdiff
path: root/src/config/ConfigManager.cpp
diff options
context:
space:
mode:
authorvaxerski <vaxry@vaxry.net>2023-01-05 19:25:45 +0100
committervaxerski <vaxry@vaxry.net>2023-01-05 19:25:45 +0100
commit96198dae55b1429449504e49065a10763b288431 (patch)
treeee18d707952df6fcbd4f9295e138d1571b64267b /src/config/ConfigManager.cpp
parent0e3547e0f6b4016aa308292a86c43cd47dd206fd (diff)
Normalize color storage
Colors are now normalized to 0 - 1 values instead of 0 - 255 causes calculations to be simpler and generally cleans up the codebase.
Diffstat (limited to 'src/config/ConfigManager.cpp')
-rw-r--r--src/config/ConfigManager.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp
index b59d1160..d86d7c89 100644
--- a/src/config/ConfigManager.cpp
+++ b/src/config/ConfigManager.cpp
@@ -387,7 +387,7 @@ void CConfigManager::configSetValueSafe(const std::string& COMMAND, const std::s
}
try {
- data->m_vColors.push_back(CColor(configStringToInt(var)) * (1.f / 255.f));
+ data->m_vColors.push_back(CColor(configStringToInt(var)));
} catch (std::exception& e) {
Debug::log(WARN, "Error reading value of %s", COMMAND.c_str());
parseError = "Error setting value <" + VALUE + "> for field <" + COMMAND + ">. " + e.what();
@@ -1247,10 +1247,10 @@ void CConfigManager::loadConfigLoadVars() {
// parseError will be displayed next frame
if (parseError != "")
- g_pHyprError->queueCreate(parseError + "\nHyprland may not work correctly.", CColor(255, 50, 50, 255));
+ g_pHyprError->queueCreate(parseError + "\nHyprland may not work correctly.", CColor(1.0, 50.0 / 255.0, 50.0 / 255.0, 1.0));
else if (configValues["autogenerated"].intValue == 1)
g_pHyprError->queueCreate("Warning: You're using an autogenerated config! (config file: " + CONFIGPATH + " )\nSUPER+Q -> kitty\nSUPER+M -> exit Hyprland",
- CColor(255, 255, 70, 255));
+ CColor(1.0, 1.0, 70.0 / 255.0, 1.0));
else
g_pHyprError->destroy();