From 15efc525e18535f258011e16372385711d39d94e Mon Sep 17 00:00:00 2001 From: Zhattis4 Date: Fri, 20 Jan 2023 09:58:21 -0800 Subject: [PATCH 1/2] table list box fix --- modules/juce_gui_basics/widgets/juce_TableListBox.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/juce_gui_basics/widgets/juce_TableListBox.cpp b/modules/juce_gui_basics/widgets/juce_TableListBox.cpp index 00cd8c79a73b..6b71ae4d767b 100644 --- a/modules/juce_gui_basics/widgets/juce_TableListBox.cpp +++ b/modules/juce_gui_basics/widgets/juce_TableListBox.cpp @@ -214,7 +214,10 @@ class TableListBox::RowComp : public Component, if (! (dragDescription.isVoid() || (dragDescription.isString() && dragDescription.toString().isEmpty()))) { isDragging = true; - owner.startDragAndDrop (e, rowsToDrag, dragDescription, true); + // MY CHANGE +// owner.startDragAndDrop (e, rowsToDrag, dragDescription, true); // OLD + owner.startDragAndDrop (e, rowsToDrag, dragDescription, false); // MY CHANGE! + // END OF MY CHANGE } } } From 4b71a8f8cc67d212a126932dc173f3722322d8ec Mon Sep 17 00:00:00 2001 From: Zhattis4 Date: Sun, 3 Sep 2023 17:05:24 -0700 Subject: [PATCH 2/2] fix warnings in juce with static_cast --- modules/juce_core/native/juce_mac_SystemStats.mm | 4 ++-- modules/juce_graphics/native/juce_mac_CoreGraphicsContext.mm | 4 ++-- .../juce_gui_basics/native/juce_mac_CGMetalLayerRenderer.h | 2 +- .../juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/juce_core/native/juce_mac_SystemStats.mm b/modules/juce_core/native/juce_mac_SystemStats.mm index 2b6939e0d1f8..fe9da4bf929d 100644 --- a/modules/juce_core/native/juce_mac_SystemStats.mm +++ b/modules/juce_core/native/juce_mac_SystemStats.mm @@ -303,7 +303,7 @@ static String getLocaleValue (CFStringRef key) } highResTimerFrequency = (timebase.denom * (uint64) 1000000000) / timebase.numer; - highResTimerToMillisecRatio = hiResCounterNumerator / (double) hiResCounterDenominator; + highResTimerToMillisecRatio = static_cast(hiResCounterNumerator) / (double) hiResCounterDenominator; } uint32 millisecondsSinceStartup() const noexcept @@ -313,7 +313,7 @@ uint32 millisecondsSinceStartup() const noexcept double getMillisecondCounterHiRes() const noexcept { - return mach_absolute_time() * highResTimerToMillisecRatio; + return static_cast(mach_absolute_time()) * highResTimerToMillisecRatio; } int64 highResTimerFrequency; diff --git a/modules/juce_graphics/native/juce_mac_CoreGraphicsContext.mm b/modules/juce_graphics/native/juce_mac_CoreGraphicsContext.mm index 417d16c7f46c..77987afd52db 100644 --- a/modules/juce_graphics/native/juce_mac_CoreGraphicsContext.mm +++ b/modules/juce_graphics/native/juce_mac_CoreGraphicsContext.mm @@ -320,7 +320,7 @@ static CGBitmapInfo getCGImageFlags (const Image::PixelFormat& format) auto image = detail::ImagePtr { CoreGraphicsPixelData::createImage (singleChannelImage, greyColourSpace.get()) }; flip(); - auto t = AffineTransform::verticalFlip (sourceImage.getHeight()).followedBy (transform); + auto t = AffineTransform::verticalFlip (static_cast(sourceImage.getHeight())).followedBy (transform); applyTransform (t); auto r = convertToCGRect (sourceImage.getBounds()); @@ -540,7 +540,7 @@ static CGBitmapInfo getCGImageFlags (const Image::PixelFormat& format) CGContextSetAlpha (context.get(), state->fillType.getOpacity()); flip(); - applyTransform (AffineTransform::verticalFlip (ih).followedBy (transform)); + applyTransform (AffineTransform::verticalFlip (static_cast(ih)).followedBy (transform)); auto imageRect = CGRectMake (0, 0, iw, ih); if (fillEntireClipAsTiles) diff --git a/modules/juce_gui_basics/native/juce_mac_CGMetalLayerRenderer.h b/modules/juce_gui_basics/native/juce_mac_CGMetalLayerRenderer.h index bfa8f0cb8ac7..24ecb8550ea3 100644 --- a/modules/juce_gui_basics/native/juce_mac_CGMetalLayerRenderer.h +++ b/modules/juce_gui_basics/native/juce_mac_CGMetalLayerRenderer.h @@ -341,7 +341,7 @@ class CoreGraphicsMetalLayerRenderer if (alignedSize > size) { - size = std::max (alignedSize, alignTo ((size_t) (size * growthFactor), pagesize)); + size = std::max (alignedSize, alignTo ((size_t) (static_cast(size) * growthFactor), pagesize)); allocation = std::make_unique (pagesize, size); } diff --git a/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm b/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm index 95321245ca99..132634612af2 100644 --- a/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm +++ b/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm @@ -977,8 +977,8 @@ void renderRect (CGContextRef cg, NSRect r, float displayScale) if (! clip.isEmpty()) { Image temp (component.isOpaque() ? Image::RGB : Image::ARGB, - roundToInt (clipW * displayScale), - roundToInt (clipH * displayScale), + roundToInt (static_cast(clipW) * displayScale), + roundToInt (static_cast(clipH) * displayScale), ! component.isOpaque()); {