| @@ -180,13 +180,19 @@ private: | |||||
| //============================================================================== | //============================================================================== | ||||
| Drawable* parsePath (const XmlElement& xml) const | Drawable* parsePath (const XmlElement& xml) const | ||||
| { | { | ||||
| const String dAttribute (xml.getStringAttribute ("d").trimStart()); | |||||
| String::CharPointerType d (dAttribute.getCharPointer()); | |||||
| Path path; | Path path; | ||||
| parsePathString (path, xml.getStringAttribute ("d")); | |||||
| if (getStyleAttribute (&xml, "fill-rule").trim().equalsIgnoreCase ("evenodd")) | if (getStyleAttribute (&xml, "fill-rule").trim().equalsIgnoreCase ("evenodd")) | ||||
| path.setUsingNonZeroWinding (false); | 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; | Point<float> subpathStart, last, last2, p1, p2, p3; | ||||
| juce_wchar lastCommandChar = 0; | juce_wchar lastCommandChar = 0; | ||||
| bool isRelative = true; | bool isRelative = true; | ||||
| @@ -402,8 +408,6 @@ private: | |||||
| if (! carryOn) | if (! carryOn) | ||||
| break; | break; | ||||
| } | } | ||||
| return parseShape (xml, path); | |||||
| } | } | ||||
| Drawable* parseRect (const XmlElement& xml) const | Drawable* parseRect (const XmlElement& xml) const | ||||
| @@ -95,9 +95,7 @@ void DropShadower::setOwner (Component* componentToFollow) | |||||
| jassert (componentToFollow != nullptr); | jassert (componentToFollow != nullptr); | ||||
| owner = componentToFollow; | owner = componentToFollow; | ||||
| jassert (owner != nullptr); | jassert (owner != nullptr); | ||||
| jassert (owner->isOpaque()); // doesn't work properly for semi-transparent comps! | |||||
| updateParent(); | updateParent(); | ||||
| owner->addComponentListener (this); | owner->addComponentListener (this); | ||||
| @@ -2961,7 +2961,7 @@ ModifierKeys ModifierKeys::getCurrentModifiersRealtime() noexcept | |||||
| void Desktop::setKioskComponent (Component* kioskModeComponent, bool enableOrDisable, bool /* allowMenusAndBars */) | void Desktop::setKioskComponent (Component* kioskModeComponent, bool enableOrDisable, bool /* allowMenusAndBars */) | ||||
| { | { | ||||
| if (enableOrDisable) | if (enableOrDisable) | ||||
| kioskModeComponent->setBounds (Desktop::getInstance().getDisplays().getMainDisplay().totalArea); | |||||
| kioskModeComponent->setBounds (getDisplays().getMainDisplay().totalArea); | |||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| @@ -635,8 +635,7 @@ public: | |||||
| GetWindowRect (hwnd, &r); | GetWindowRect (hwnd, &r); | ||||
| Rectangle<int> bounds (rectangleFromRECT (r)); | Rectangle<int> bounds (rectangleFromRECT (r)); | ||||
| HWND parentH = GetParent (hwnd); | |||||
| if (parentH != 0) | |||||
| if (HWND parentH = GetParent (hwnd)) | |||||
| { | { | ||||
| GetWindowRect (parentH, &r); | GetWindowRect (parentH, &r); | ||||
| bounds.translate (-r.left, -r.top); | bounds.translate (-r.left, -r.top); | ||||
| @@ -35,7 +35,8 @@ | |||||
| A window that displays a pop-up tooltip when the mouse hovers over another component. | 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 | 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 | 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 | hovers for the specified length of time - it will then see if it's currently | ||||