From 82e9d474161768634c2d8cf6fc2302ab5fb23a06 Mon Sep 17 00:00:00 2001 From: jules Date: Wed, 9 Aug 2017 10:40:11 +0100 Subject: [PATCH] Tweaked a LookAndFeel_V2 method to avoid a subtle rectangle rendering glitch --- .../lookandfeel/juce_LookAndFeel_V2.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp index 5802d5808b..58dc722090 100644 --- a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp +++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp @@ -828,22 +828,22 @@ void LookAndFeel_V2::drawTreeviewPlusMinusBox (Graphics& g, const Rectangle boxArea ((float) x, (float) y, (float) boxSize, (float) boxSize); g.setColour (Colour (0xe5ffffff)); - g.fillRect (x, y, w, h); + g.fillRect (boxArea); g.setColour (Colour (0x80000000)); - g.drawRect (x, y, w, h); + g.drawRect (boxArea); const float size = boxSize / 2 + 1.0f; const float centre = (float) (boxSize / 2); - g.fillRect (x + (w - size) * 0.5f, y + centre, size, 1.0f); + g.fillRect (x + (boxSize - size) * 0.5f, y + centre, size, 1.0f); if (! isOpen) - g.fillRect (x + centre, y + (h - size) * 0.5f, 1.0f, size); + g.fillRect (x + centre, y + (boxSize - size) * 0.5f, 1.0f, size); } bool LookAndFeel_V2::areLinesDrawnForTreeView (TreeView&)