From ccbe16f7df1c864dc789350771fe0128614661d7 Mon Sep 17 00:00:00 2001 From: jules Date: Fri, 10 Nov 2017 17:39:27 +0000 Subject: [PATCH] Fix for side-panel close button shape rendering --- .../lookandfeel/juce_LookAndFeel_V2.cpp | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp index af22085e56..ab48376e51 100644 --- a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp +++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp @@ -2791,25 +2791,18 @@ Font LookAndFeel_V2::getSidePanelTitleFont (SidePanel&) Justification LookAndFeel_V2::getSidePanelTitleJustification (SidePanel& panel) { return panel.isPanelOnLeft() ? Justification::centredRight - : Justification::centredLeft; + : Justification::centredLeft; } Path LookAndFeel_V2::getSidePanelDismissButtonShape (SidePanel& panel) { Path p; + const float size = 10.0f; if (panel.isPanelOnLeft()) - { - p.startNewSubPath (10, 0); - p.lineTo (0, 5); - p.lineTo (10, 10); - } + p.addTriangle (size, 0.0f, 0.0f, size * 0.5f, size, size); else - { - p.startNewSubPath (0, 10); - p.lineTo (10, 5); - p.lineTo (0, 0); - } + p.addTriangle (0.0f, 0.0f, size, size * 0.5f, 0.0f, size); return p; }