Browse Source

Added a default constructor for RectanglePlacement.

tags/2021-05-28
jules 11 years ago
parent
commit
a90c0635bc
2 changed files with 4 additions and 3 deletions
  1. +3
    -0
      modules/juce_graphics/placement/juce_RectanglePlacement.h
  2. +1
    -3
      modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp

+ 3
- 0
modules/juce_graphics/placement/juce_RectanglePlacement.h View File

@@ -41,6 +41,9 @@ public:
/** Creates a RectanglePlacement object using a combination of flags from the Flags enum. */
inline RectanglePlacement (int placementFlags) noexcept : flags (placementFlags) {}
/** Creates a default RectanglePlacement object, which is equivalent to using the 'centred' flag. */
inline RectanglePlacement() noexcept : flags (centred) {}
/** Creates a copy of another RectanglePlacement object. */
RectanglePlacement (const RectanglePlacement& other) noexcept;


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

@@ -2229,9 +2229,7 @@ void LookAndFeel_V2::drawTableHeaderColumn (Graphics& g, const String& columnNam
1.0f, 0.0f);
g.setColour (Colour (0x99000000));
g.fillPath (sortArrow, RectanglePlacement (RectanglePlacement::centred)
.getTransformToFit (sortArrow.getBounds(),
area.removeFromRight (height / 2).reduced (2).toFloat()));
g.fillPath (sortArrow, sortArrow.getTransformToScaleToFit (area.removeFromRight (height / 2).reduced (2).toFloat(), true));
}
g.setColour (Colours::black);


Loading…
Cancel
Save