Browse Source

Removed some compiler warnings, fix for OSX file chooser modality.

tags/2021-05-28
jules 13 years ago
parent
commit
4253bacb6a
3 changed files with 8 additions and 4 deletions
  1. +3
    -3
      modules/juce_gui_basics/misc/juce_BubbleComponent.cpp
  2. +1
    -1
      modules/juce_gui_basics/misc/juce_BubbleComponent.h
  3. +4
    -0
      modules/juce_gui_basics/native/juce_mac_FileChooser.mm

+ 3
- 3
modules/juce_gui_basics/misc/juce_BubbleComponent.cpp View File

@@ -39,7 +39,7 @@ BubbleComponent::~BubbleComponent()
//==============================================================================
void BubbleComponent::paint (Graphics& g)
{
getLookAndFeel().drawBubble (g, arrowTip.x, arrowTip.y,
getLookAndFeel().drawBubble (g, (float) arrowTip.x, (float) arrowTip.y,
(float) content.getX(), (float) content.getY(),
(float) content.getWidth(), (float) content.getHeight());
@@ -109,7 +109,7 @@ void BubbleComponent::setPosition (const Rectangle<int>& rectangleToPointTo)
if (jmax (spaceAbove, spaceBelow) >= jmax (spaceLeft, spaceRight))
{
targetX = rectangleToPointTo.getCentre().x;
arrowTip.x = totalW * 0.5f;
arrowTip.x = totalW / 2;
if (spaceAbove >= spaceBelow)
{
@@ -127,7 +127,7 @@ void BubbleComponent::setPosition (const Rectangle<int>& rectangleToPointTo)
else
{
targetY = rectangleToPointTo.getCentre().y;
arrowTip.y = totalH * 0.5f;
arrowTip.y = totalH / 2;
if (spaceLeft > spaceRight)
{


+ 1
- 1
modules/juce_gui_basics/misc/juce_BubbleComponent.h View File

@@ -144,7 +144,7 @@ public:
private:
Rectangle<int> content;
Point<float> arrowTip;
Point<int> arrowTip;
int allowablePlacements;
DropShadowEffect shadow;


+ 4
- 0
modules/juce_gui_basics/native/juce_mac_FileChooser.mm View File

@@ -119,6 +119,9 @@ public:
action: nil keyEquivalent: nsEmptyString()];
[[NSApp mainMenu] setSubmenu: menu forItem: item];
[menu release];
// use a dummy modal component so that apps can tell that something is currently modal.
dummyModalComponent.enterModalState();
}
~TemporaryMainMenuWithStandardCommands()
@@ -129,6 +132,7 @@ public:
private:
MenuBarModel* oldMenu;
ScopedPointer<PopupMenu> oldAppleMenu;
Component dummyModalComponent;
};
//==============================================================================


Loading…
Cancel
Save