Browse Source

Minor clean-ups.

tags/2021-05-28
jules 12 years ago
parent
commit
8f26cc79c9
5 changed files with 12 additions and 10 deletions
  1. +8
    -4
      modules/juce_gui_basics/drawables/juce_SVGParser.cpp
  2. +0
    -2
      modules/juce_gui_basics/misc/juce_DropShadower.cpp
  3. +1
    -1
      modules/juce_gui_basics/native/juce_linux_Windowing.cpp
  4. +1
    -2
      modules/juce_gui_basics/native/juce_win32_Windowing.cpp
  5. +2
    -1
      modules/juce_gui_basics/windows/juce_TooltipWindow.h

+ 8
- 4
modules/juce_gui_basics/drawables/juce_SVGParser.cpp 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


+ 0
- 2
modules/juce_gui_basics/misc/juce_DropShadower.cpp 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);


+ 1
- 1
modules/juce_gui_basics/native/juce_linux_Windowing.cpp 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);
}
//==============================================================================


+ 1
- 2
modules/juce_gui_basics/native/juce_win32_Windowing.cpp 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);


+ 2
- 1
modules/juce_gui_basics/windows/juce_TooltipWindow.h 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


Loading…
Cancel
Save