From f7e05cf31de484c6bcd19906757ce22649bb7c68 Mon Sep 17 00:00:00 2001 From: Timothy Schoen Date: Mon, 9 Dec 2024 21:49:43 +0100 Subject: [PATCH] Fix colour property detail --- Source/Components/PropertiesPanel.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Source/Components/PropertiesPanel.h b/Source/Components/PropertiesPanel.h index 001c081d3..80792824e 100644 --- a/Source/Components/PropertiesPanel.h +++ b/Source/Components/PropertiesPanel.h @@ -594,7 +594,6 @@ class PropertiesPanel : public Component { , public Value::Listener { struct SwatchComponent : public Component { - explicit SwatchComponent(Value const& colour) { colourValue.referTo(colour); @@ -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