nodes: use different colors from config based on category

This commit is contained in:
itsmattkc
2020-05-05 23:24:00 +10:00
parent 74d252c5c0
commit 0628ddb901
6 changed files with 32 additions and 12 deletions
+5
View File
@@ -207,6 +207,11 @@ QColor Color::toQColor() const
return c;
}
float Color::GetRoughLuminance() const
{
return (2*red()+blue()+3*green())/6.0f;
}
const Color &Color::operator+=(const Color &rhs)
{
for (int i=0;i<kRGBAChannels;i++) {
+4
View File
@@ -86,6 +86,10 @@ public:
QColor toQColor() const;
// Suuuuper rough luminance value mostly used for UI (determining whether to overlay with black
// or white text)
float GetRoughLuminance() const;
// Assignment math operators
const Color& operator+=(const Color& rhs);
const Color& operator-=(const Color& rhs);