From f475dcfdb6dccabf0effde8d69816945c071fe7a Mon Sep 17 00:00:00 2001 From: jules Date: Wed, 11 Dec 2013 21:31:24 +0000 Subject: [PATCH] Cleaned up some line-drawing in BubbleComponent. --- modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp | 6 +++--- modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.cpp | 6 +++--- 2 files 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 8fdbcbda13..bf6ebe8ad4 100644 --- a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp +++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp @@ -819,17 +819,17 @@ int LookAndFeel_V2::getTreeViewIndentSize (TreeView&) //============================================================================== void LookAndFeel_V2::drawBubble (Graphics& g, BubbleComponent& comp, - const Point& tip, const Rectangle& body) + const Point& tip, const Rectangle& body) { Path p; - p.addBubble (body, body.getUnion (Rectangle (tip.x, tip.y, 1.0f, 1.0f)), + p.addBubble (body.reduced (0.5f), body.getUnion (Rectangle (tip.x, tip.y, 1.0f, 1.0f)), tip, 5.0f, jmin (15.0f, body.getWidth() * 0.2f, body.getHeight() * 0.2f)); g.setColour (comp.findColour (BubbleComponent::backgroundColourId)); g.fillPath (p); g.setColour (comp.findColour (BubbleComponent::outlineColourId)); - g.strokePath (p, PathStrokeType (1.33f)); + g.strokePath (p, PathStrokeType (1.0f)); } diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.cpp b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.cpp index ee85d683e7..200725283e 100644 --- a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.cpp +++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.cpp @@ -34,7 +34,7 @@ LookAndFeel_V3::LookAndFeel_V3() setColour (TabbedComponent::outlineColourId, Colour (0xff999999)); setColour (Slider::trackColourId, Colour (0xbbffffff)); setColour (Slider::thumbColourId, Colour (0xffddddff)); - + setColour (BubbleComponent::backgroundColourId, Colour (0xeeeeeedd)); setColour (ScrollBar::thumbColourId, Colour::greyLevel (0.8f).contrasting().withAlpha (0.13f)); } @@ -190,7 +190,6 @@ void LookAndFeel_V3::drawTabButton (TabBarButton& button, Graphics& g, bool isMo if (button.getToggleState()) { g.setColour (bkg); - g.fillRect (activeArea); } else { @@ -207,9 +206,10 @@ void LookAndFeel_V3::drawTabButton (TabBarButton& button, Graphics& g, bool isMo g.setGradientFill (ColourGradient (bkg.brighter (0.2f), (float) p1.x, (float) p1.y, bkg.darker (0.1f), (float) p2.x, (float) p2.y, false)); - g.fillRect (activeArea); } + g.fillRect (activeArea); + g.setColour (button.findColour (TabbedButtonBar::tabOutlineColourId)); Rectangle r (activeArea);