Skip to content

Commit

Permalink
Theme/Graph/Key: update animator colors
Browse files Browse the repository at this point in the history
Ref: #163
  • Loading branch information
rodlie committed Jul 21, 2024
1 parent 6905599 commit c5a6848
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 9 deletions.
9 changes: 6 additions & 3 deletions src/app/GUI/keysview.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,13 @@
#include "smartPointers/ememory.h"
#include "framerange.h"
#include "conncontextobjlist.h"
#include "themesupport.h"

const QList<QColor> ANIMATOR_COLORS = {QColor(255, 0, 0) , QColor(0, 255, 255),
QColor(255, 255, 0), QColor(255, 0, 255),
QColor(0, 255, 0)};
const QList<QColor> ANIMATOR_COLORS = {ThemeSupport::getThemeColorRed(),
ThemeSupport::getThemeColorBlue(),
ThemeSupport::getThemeColorYellow(),
ThemeSupport::getThemeColorPink(),
ThemeSupport::getThemeColorGreen()};

class Key;
class QrealKey;
Expand Down
4 changes: 3 additions & 1 deletion src/core/Animators/qrealpoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,9 @@ void QrealPoint::draw(QPainter * const p, const QColor &paintColor) {
if(mHovered) gDrawCosmeticEllipse(p, center, mRadius + 1, mRadius + 1);
else gDrawCosmeticEllipse(p, center, mRadius, mRadius);

p->setBrush(paintColor);
//p->setBrush(paintColor);
p->setBrush(Qt::white);

if(!isSelected()) p->setBrush(paintColor.lighter());

gDrawCosmeticEllipse(p, center, mRadius - 1, mRadius - 1);
Expand Down
8 changes: 4 additions & 4 deletions src/core/Private/esettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,19 +258,19 @@ eSettings::eSettings(const int cpuThreads,
gSettings << std::make_shared<eColorSetting>(
fObjectKeyframeColor,
"objectKeyframeColor",
QColor(0, 125, 255));
ThemeSupport::getThemeColorBlue());
gSettings << std::make_shared<eColorSetting>(
fPropertyGroupKeyframeColor,
"propertyGroupKeyframeColor",
QColor(0, 255, 0));
ThemeSupport::getThemeColorGreen());
gSettings << std::make_shared<eColorSetting>(
fPropertyKeyframeColor,
"propertyKeyframeColor",
QColor(255, 0, 0));
ThemeSupport::getThemeColorRed());
gSettings << std::make_shared<eColorSetting>(
fSelectedKeyframeColor,
"selectedKeyframeColor",
QColor(255, 255, 0));
ThemeSupport::getThemeColorYellow());

/*gSettings << std::make_shared<eColorSetting>(
fVisibilityRangeColor,
Expand Down
32 changes: 31 additions & 1 deletion src/core/themesupport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,44 @@ const QColor ThemeSupport::getThemeRangeSelectedColor(int alpha)

const QColor ThemeSupport::getThemeFrameMarkerColor(int alpha)
{
return getQColor(255, 123, 0, alpha);
return getThemeColorOrange(alpha);
}

const QColor ThemeSupport::getThemeObjectColor(int alpha)
{
return getQColor(0, 102, 255, alpha);
}

const QColor ThemeSupport::getThemeColorRed(int alpha)
{
return getQColor(199, 67, 72, alpha);
}

const QColor ThemeSupport::getThemeColorBlue(int alpha)
{
return getQColor(73, 142, 209, alpha);
}

const QColor ThemeSupport::getThemeColorYellow(int alpha)
{
return getQColor(209, 183, 73, alpha);
}

const QColor ThemeSupport::getThemeColorPink(int alpha)
{
return getQColor(169, 73, 209, alpha);
}

const QColor ThemeSupport::getThemeColorGreen(int alpha)
{
return getQColor(73, 209, 132, alpha);
}

const QColor ThemeSupport::getThemeColorOrange(int alpha)
{
return getQColor(255, 123, 0, alpha);
}

const QPalette ThemeSupport::getDarkPalette(int alpha)
{
QPalette pal = QPalette();
Expand Down
6 changes: 6 additions & 0 deletions src/core/themesupport.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ class CORE_EXPORT ThemeSupport
static const QColor getThemeRangeSelectedColor(int alpha = 255);
static const QColor getThemeFrameMarkerColor(int alpha = 255);
static const QColor getThemeObjectColor(int alpha = 255);
static const QColor getThemeColorRed(int alpha = 255);
static const QColor getThemeColorBlue(int alpha = 255);
static const QColor getThemeColorYellow(int alpha = 255);
static const QColor getThemeColorPink(int alpha = 255);
static const QColor getThemeColorGreen(int alpha = 255);
static const QColor getThemeColorOrange(int alpha = 255);
static const QPalette getDarkPalette(int alpha = 255);
static const QPalette getDarkerPalette(int alpha = 255);
static const QPalette getNotSoDarkPalette(int alpha = 255);
Expand Down

0 comments on commit c5a6848

Please sign in to comment.