diff options
| author | vaxerski <vaxry@vaxry.net> | 2023-01-05 19:25:45 +0100 |
|---|---|---|
| committer | vaxerski <vaxry@vaxry.net> | 2023-01-05 19:25:45 +0100 |
| commit | 96198dae55b1429449504e49065a10763b288431 (patch) | |
| tree | ee18d707952df6fcbd4f9295e138d1571b64267b /src/config/ConfigDataValues.hpp | |
| parent | 0e3547e0f6b4016aa308292a86c43cd47dd206fd (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/ConfigDataValues.hpp')
| -rw-r--r-- | src/config/ConfigDataValues.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/config/ConfigDataValues.hpp b/src/config/ConfigDataValues.hpp index 27965556..c7f7fff8 100644 --- a/src/config/ConfigDataValues.hpp +++ b/src/config/ConfigDataValues.hpp @@ -17,7 +17,7 @@ interface ICustomConfigValueData { class CGradientValueData : public ICustomConfigValueData { public: CGradientValueData(CColor col) { - m_vColors.push_back(col * (1.f / 255.f)); + m_vColors.push_back(col); }; virtual ~CGradientValueData(){}; @@ -27,7 +27,7 @@ class CGradientValueData : public ICustomConfigValueData { void reset(CColor col) { m_vColors.clear(); - m_vColors.emplace_back(col * (1.f / 255.f)); + m_vColors.emplace_back(col); m_fAngle = 0; } |
