| @@ -567,7 +567,7 @@ IntrojucerLookAndFeel::IntrojucerLookAndFeel() | |||||
| Rectangle<int> IntrojucerLookAndFeel::getPropertyComponentContentPosition (PropertyComponent& component) | Rectangle<int> IntrojucerLookAndFeel::getPropertyComponentContentPosition (PropertyComponent& component) | ||||
| { | { | ||||
| if (component.findParentComponentOfClass<AppearanceEditor::EditorPanel>() != nullptr) | if (component.findParentComponentOfClass<AppearanceEditor::EditorPanel>() != nullptr) | ||||
| return component.getLocalBounds().reduced (1, 1).removeFromRight (component.getWidth() / 2); | |||||
| return component.getLocalBounds().reduced (1).removeFromRight (component.getWidth() / 2); | |||||
| return LookAndFeel::getPropertyComponentContentPosition (component); | return LookAndFeel::getPropertyComponentContentPosition (component); | ||||
| } | } | ||||
| @@ -280,7 +280,7 @@ public: | |||||
| const Colour colour (getColour()); | const Colour colour (getColour()); | ||||
| g.fillAll (Colours::grey); | g.fillAll (Colours::grey); | ||||
| g.fillCheckerBoard (getLocalBounds().reduced (2, 2), | |||||
| g.fillCheckerBoard (getLocalBounds().reduced (2), | |||||
| 10, 10, | 10, 10, | ||||
| Colour (0xffdddddd).overlaidWith (colour), | Colour (0xffdddddd).overlaidWith (colour), | ||||
| Colour (0xffffffff).overlaidWith (colour)); | Colour (0xffffffff).overlaidWith (colour)); | ||||
| @@ -94,7 +94,7 @@ public: | |||||
| if (thumbnail.getTotalLength() > 0) | if (thumbnail.getTotalLength() > 0) | ||||
| { | { | ||||
| thumbnail.drawChannels (g, getLocalBounds().reduced (2, 2), | |||||
| thumbnail.drawChannels (g, getLocalBounds().reduced (2), | |||||
| startTime, endTime, 1.0f); | startTime, endTime, 1.0f); | ||||
| } | } | ||||
| else | else | ||||
| @@ -940,7 +940,7 @@ public: | |||||
| g.setColour (Colours::green); | g.setColour (Colours::green); | ||||
| g.fillPath (p, RectanglePlacement (RectanglePlacement::centred) | g.fillPath (p, RectanglePlacement (RectanglePlacement::centred) | ||||
| .getTransformToFit (p.getBounds(), getLocalBounds().reduced (2, 2).toFloat())); | |||||
| .getTransformToFit (p.getBounds(), getLocalBounds().reduced (2).toFloat())); | |||||
| } | } | ||||
| void mouseDown (const MouseEvent&) | void mouseDown (const MouseEvent&) | ||||
| @@ -319,6 +319,16 @@ public: | |||||
| return Rectangle (pos.x - deltaX, pos.y - deltaY, nw, nh); | return Rectangle (pos.x - deltaX, pos.y - deltaY, nw, nh); | ||||
| } | } | ||||
| /** Returns a rectangle that is larger than this one by a given amount. | |||||
| Effectively, the rectangle returned is (x - delta, y - delta, w + delta * 2, h + delta * 2). | |||||
| @see expand, reduce, reduced | |||||
| */ | |||||
| Rectangle expanded (const ValueType delta) const noexcept | |||||
| { | |||||
| return expanded (delta, delta); | |||||
| } | |||||
| /** Shrinks the rectangle by a given amount. | /** Shrinks the rectangle by a given amount. | ||||
| Effectively, its new size is (x + deltaX, y + deltaY, w - deltaX * 2, h - deltaY * 2). | Effectively, its new size is (x + deltaX, y + deltaY, w - deltaX * 2, h - deltaY * 2). | ||||
| @@ -341,6 +351,16 @@ public: | |||||
| return expanded (-deltaX, -deltaY); | return expanded (-deltaX, -deltaY); | ||||
| } | } | ||||
| /** Returns a rectangle that is smaller than this one by a given amount. | |||||
| Effectively, the rectangle returned is (x + delta, y + delta, w - delta * 2, h - delta * 2). | |||||
| @see reduce, expand, expanded | |||||
| */ | |||||
| Rectangle reduced (const ValueType delta) const noexcept | |||||
| { | |||||
| return reduced (delta, delta); | |||||
| } | |||||
| /** Removes a strip from the top of this rectangle, reducing this rectangle | /** Removes a strip from the top of this rectangle, reducing this rectangle | ||||
| by the specified amount and returning the section that was removed. | by the specified amount and returning the section that was removed. | ||||