1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Minor clean-ups.

This commit is contained in:
jules 2013-04-03 14:44:19 +01:00
parent 71f2580f2b
commit 8f26cc79c9
5 changed files with 12 additions and 10 deletions

View file

@ -180,13 +180,19 @@ private:
//==============================================================================
Drawable* parsePath (const XmlElement& xml) const
{
const String dAttribute (xml.getStringAttribute ("d").trimStart());
String::CharPointerType d (dAttribute.getCharPointer());
Path path;
parsePathString (path, xml.getStringAttribute ("d"));
if (getStyleAttribute (&xml, "fill-rule").trim().equalsIgnoreCase ("evenodd"))
path.setUsingNonZeroWinding (false);
return parseShape (xml, path);
}
void parsePathString (Path& path, const String& pathString) const
{
String::CharPointerType d (pathString.getCharPointer().findEndOfWhitespace());
Point<float> subpathStart, last, last2, p1, p2, p3;
juce_wchar lastCommandChar = 0;
bool isRelative = true;
@ -402,8 +408,6 @@ private:
if (! carryOn)
break;
}
return parseShape (xml, path);
}
Drawable* parseRect (const XmlElement& xml) const

View file

@ -95,9 +95,7 @@ void DropShadower::setOwner (Component* componentToFollow)
jassert (componentToFollow != nullptr);
owner = componentToFollow;
jassert (owner != nullptr);
jassert (owner->isOpaque()); // doesn't work properly for semi-transparent comps!
updateParent();
owner->addComponentListener (this);

View file

@ -2961,7 +2961,7 @@ ModifierKeys ModifierKeys::getCurrentModifiersRealtime() noexcept
void Desktop::setKioskComponent (Component* kioskModeComponent, bool enableOrDisable, bool /* allowMenusAndBars */)
{
if (enableOrDisable)
kioskModeComponent->setBounds (Desktop::getInstance().getDisplays().getMainDisplay().totalArea);
kioskModeComponent->setBounds (getDisplays().getMainDisplay().totalArea);
}
//==============================================================================

View file

@ -635,8 +635,7 @@ public:
GetWindowRect (hwnd, &r);
Rectangle<int> bounds (rectangleFromRECT (r));
HWND parentH = GetParent (hwnd);
if (parentH != 0)
if (HWND parentH = GetParent (hwnd))
{
GetWindowRect (parentH, &r);
bounds.translate (-r.left, -r.top);

View file

@ -35,7 +35,8 @@
A window that displays a pop-up tooltip when the mouse hovers over another component.
To enable tooltips in your app, just create a single instance of a TooltipWindow
object.
object. Note that if you instantiate more than one instance of this class, you'll
end up with multiple tooltips being shown!
The TooltipWindow object will then stay invisible, waiting until the mouse
hovers for the specified length of time - it will then see if it's currently