Browse Source

Fix for win32 drag-and-drop.

tags/2021-05-28
Julian Storer 15 years ago
parent
commit
f97cf1aaa5
6 changed files with 1225 additions and 1227 deletions
  1. +1213
    -1213
      extras/browser plugins/wrapper/juce_NPAPI_GlueCode.cpp
  2. +5
    -6
      juce_amalgamated.cpp
  3. +1
    -1
      juce_amalgamated.h
  4. +4
    -5
      src/gui/components/lookandfeel/juce_OldSchoolLookAndFeel.cpp
  5. +1
    -1
      src/gui/components/lookandfeel/juce_OldSchoolLookAndFeel.h
  6. +1
    -1
      src/native/windows/juce_win32_Windowing.cpp

+ 1213
- 1213
extras/browser plugins/wrapper/juce_NPAPI_GlueCode.cpp
File diff suppressed because it is too large
View File


+ 5
- 6
juce_amalgamated.cpp View File

@@ -67137,7 +67137,7 @@ void OldSchoolLookAndFeel::drawButtonBackground (Graphics& g,


void OldSchoolLookAndFeel::drawTickBox (Graphics& g, void OldSchoolLookAndFeel::drawTickBox (Graphics& g,
Component& /*component*/, Component& /*component*/,
int x, int y, int w, int h,
float x, float y, float w, float h,
const bool ticked, const bool ticked,
const bool isEnabled, const bool isEnabled,
const bool /*isMouseOverButton*/, const bool /*isMouseOverButton*/,
@@ -67149,8 +67149,7 @@ void OldSchoolLookAndFeel::drawTickBox (Graphics& g,
g.setColour (isEnabled ? Colours::blue.withAlpha (isButtonDown ? 0.3f : 0.1f) g.setColour (isEnabled ? Colours::blue.withAlpha (isButtonDown ? 0.3f : 0.1f)
: Colours::lightgrey.withAlpha (0.1f)); : Colours::lightgrey.withAlpha (0.1f));


AffineTransform trans (AffineTransform::scale (w / 9.0f, h / 9.0f)
.translated ((float) x, (float) y));
AffineTransform trans (AffineTransform::scale (w / 9.0f, h / 9.0f).translated (x, y));


g.fillPath (box, trans); g.fillPath (box, trans);


@@ -67182,8 +67181,8 @@ void OldSchoolLookAndFeel::drawToggleButton (Graphics& g,


const int tickWidth = jmin (20, button.getHeight() - 4); const int tickWidth = jmin (20, button.getHeight() - 4);


drawTickBox (g, button, 4, (button.getHeight() - tickWidth) / 2,
tickWidth, tickWidth,
drawTickBox (g, button, 4.0f, (button.getHeight() - tickWidth) * 0.5f,
(float) tickWidth, (float) tickWidth,
button.getToggleState(), button.getToggleState(),
button.isEnabled(), button.isEnabled(),
isMouseOverButton, isMouseOverButton,
@@ -217258,7 +217257,7 @@ public:


HRESULT __stdcall GetData (FORMATETC __RPC_FAR* pFormatEtc, STGMEDIUM __RPC_FAR* pMedium) HRESULT __stdcall GetData (FORMATETC __RPC_FAR* pFormatEtc, STGMEDIUM __RPC_FAR* pMedium)
{ {
if (pFormatEtc->tymed == format->tymed
if ((pFormatEtc->tymed & format->tymed) != 0
&& pFormatEtc->cfFormat == format->cfFormat && pFormatEtc->cfFormat == format->cfFormat
&& pFormatEtc->dwAspect == format->dwAspect) && pFormatEtc->dwAspect == format->dwAspect)
{ {


+ 1
- 1
juce_amalgamated.h View File

@@ -25320,7 +25320,7 @@ public:


virtual void drawTickBox (Graphics& g, virtual void drawTickBox (Graphics& g,
Component& component, Component& component,
int x, int y, int w, int h,
float x, float y, float w, float h,
const bool ticked, const bool ticked,
const bool isEnabled, const bool isEnabled,
const bool isMouseOverButton, const bool isMouseOverButton,


+ 4
- 5
src/gui/components/lookandfeel/juce_OldSchoolLookAndFeel.cpp View File

@@ -110,7 +110,7 @@ void OldSchoolLookAndFeel::drawButtonBackground (Graphics& g,
void OldSchoolLookAndFeel::drawTickBox (Graphics& g, void OldSchoolLookAndFeel::drawTickBox (Graphics& g,
Component& /*component*/, Component& /*component*/,
int x, int y, int w, int h,
float x, float y, float w, float h,
const bool ticked, const bool ticked,
const bool isEnabled, const bool isEnabled,
const bool /*isMouseOverButton*/, const bool /*isMouseOverButton*/,
@@ -122,8 +122,7 @@ void OldSchoolLookAndFeel::drawTickBox (Graphics& g,
g.setColour (isEnabled ? Colours::blue.withAlpha (isButtonDown ? 0.3f : 0.1f) g.setColour (isEnabled ? Colours::blue.withAlpha (isButtonDown ? 0.3f : 0.1f)
: Colours::lightgrey.withAlpha (0.1f)); : Colours::lightgrey.withAlpha (0.1f));
AffineTransform trans (AffineTransform::scale (w / 9.0f, h / 9.0f)
.translated ((float) x, (float) y));
AffineTransform trans (AffineTransform::scale (w / 9.0f, h / 9.0f).translated (x, y));
g.fillPath (box, trans); g.fillPath (box, trans);
@@ -155,8 +154,8 @@ void OldSchoolLookAndFeel::drawToggleButton (Graphics& g,
const int tickWidth = jmin (20, button.getHeight() - 4); const int tickWidth = jmin (20, button.getHeight() - 4);
drawTickBox (g, button, 4, (button.getHeight() - tickWidth) / 2,
tickWidth, tickWidth,
drawTickBox (g, button, 4.0f, (button.getHeight() - tickWidth) * 0.5f,
(float) tickWidth, (float) tickWidth,
button.getToggleState(), button.getToggleState(),
button.isEnabled(), button.isEnabled(),
isMouseOverButton, isMouseOverButton,


+ 1
- 1
src/gui/components/lookandfeel/juce_OldSchoolLookAndFeel.h View File

@@ -61,7 +61,7 @@ public:
virtual void drawTickBox (Graphics& g, virtual void drawTickBox (Graphics& g,
Component& component, Component& component,
int x, int y, int w, int h,
float x, float y, float w, float h,
const bool ticked, const bool ticked,
const bool isEnabled, const bool isEnabled,
const bool isMouseOverButton, const bool isMouseOverButton,


+ 1
- 1
src/native/windows/juce_win32_Windowing.cpp View File

@@ -2960,7 +2960,7 @@ public:
HRESULT __stdcall GetData (FORMATETC __RPC_FAR* pFormatEtc, STGMEDIUM __RPC_FAR* pMedium) HRESULT __stdcall GetData (FORMATETC __RPC_FAR* pFormatEtc, STGMEDIUM __RPC_FAR* pMedium)
{ {
if (pFormatEtc->tymed == format->tymed
if ((pFormatEtc->tymed & format->tymed) != 0
&& pFormatEtc->cfFormat == format->cfFormat && pFormatEtc->cfFormat == format->cfFormat
&& pFormatEtc->dwAspect == format->dwAspect) && pFormatEtc->dwAspect == format->dwAspect)
{ {


Loading…
Cancel
Save