revised UI color system when showing nodes
Olive now has a set of colors that categories can be "assigned" to. The timeline also shares the same colors as the NodeView. Colors can be configured per node (aka per clip).
This commit is contained in:
@@ -154,6 +154,29 @@ public:
|
||||
*/
|
||||
virtual void Retranslate();
|
||||
|
||||
/**
|
||||
* @brief Retrieve the color of this node
|
||||
*/
|
||||
Color color() const;
|
||||
|
||||
/**
|
||||
* @brief Same as color() but return a pretty gradient version
|
||||
*/
|
||||
QLinearGradient gradient_color(qreal top, qreal bottom) const;
|
||||
|
||||
/**
|
||||
* @brief Uses config and returns either color() for flat shading or gradient for gradient
|
||||
*/
|
||||
QBrush brush(qreal top, qreal bottom) const;
|
||||
|
||||
/**
|
||||
* @brief Sets the override color. Set to -1 for no override color.
|
||||
*/
|
||||
void SetOverrideColor(int index)
|
||||
{
|
||||
override_color_ = index;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Return a list of NodeParams
|
||||
*/
|
||||
@@ -485,6 +508,11 @@ private:
|
||||
*/
|
||||
QString label_;
|
||||
|
||||
/**
|
||||
* @brief -1 if the color should be based on the category, >=0 if the user has set a custom color
|
||||
*/
|
||||
int override_color_;
|
||||
|
||||
};
|
||||
|
||||
template<class T>
|
||||
|
||||
Reference in New Issue
Block a user