Browse Source

Cleaned up some line-drawing in BubbleComponent.

tags/2021-05-28
jules 12 years ago
parent
commit
f475dcfdb6
2 changed files with 6 additions and 6 deletions
  1. +3
    -3
      modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp
  2. +3
    -3
      modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.cpp

+ 3
- 3
modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp View File

@@ -819,17 +819,17 @@ int LookAndFeel_V2::getTreeViewIndentSize (TreeView&)
//==============================================================================
void LookAndFeel_V2::drawBubble (Graphics& g, BubbleComponent& comp,
const Point<float>& tip, const Rectangle<float>& body)
const Point<float>& tip, const Rectangle<float>& body)
{
Path p;
p.addBubble (body, body.getUnion (Rectangle<float> (tip.x, tip.y, 1.0f, 1.0f)),
p.addBubble (body.reduced (0.5f), body.getUnion (Rectangle<float> (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));
}


+ 3
- 3
modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.cpp View File

@@ -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<int> r (activeArea);


Loading…
Cancel
Save