Skip to content

Commit

Permalink
Fix colour property detail
Browse files Browse the repository at this point in the history
  • Loading branch information
timothyschoen committed Dec 9, 2024
1 parent 7d132e7 commit f7e05cf
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Source/Components/PropertiesPanel.h
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,6 @@ class PropertiesPanel : public Component {
, public Value::Listener {

struct SwatchComponent : public Component {

explicit SwatchComponent(Value const& colour)
{
colourValue.referTo(colour);
Expand All @@ -605,9 +604,9 @@ class PropertiesPanel : public Component {
auto colour = Colour::fromString(colourValue.toString());

g.setColour(isMouseOver() ? colour.brighter(0.4f) : colour);
g.fillRoundedRectangle(getLocalBounds().toFloat(), Corners::defaultCornerRadius);
g.setColour(colour.darker(0.2f));
g.drawRoundedRectangle(getLocalBounds().toFloat(), Corners::defaultCornerRadius, 0.8f);
g.fillRoundedRectangle(getLocalBounds().toFloat().reduced(0.5f), Corners::defaultCornerRadius);
g.setColour(colour.darker(0.15f));
g.drawRoundedRectangle(getLocalBounds().toFloat().reduced(0.5f), Corners::defaultCornerRadius, 0.8f);
}

void mouseEnter(MouseEvent const& e) override
Expand Down

0 comments on commit f7e05cf

Please sign in to comment.