1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-09 23:34:20 +00:00
Commit graph

15593 commits

Author SHA1 Message Date
attila
35fe3ac714 Direct2D: Fix gradient fill when the brush is transformed with not just translation
The code contains a performance optimisation for cases where the world
transform is translation only. In this case instead of applying the
brush transformation first and then the world translation, the order is
reversed. The translation is applied first and then the brush
transformation.

Flipping the transformations however is only correct in the special case
when both transformations are translation only.
2025-08-19 16:51:15 +01:00
attila
bb5a9cbac9 Direct2D: Fix wrong brush transform calculation
This change is practically a no-op, because if the affected branch is
taken, then the world transform was not applied, so transform is a
unity matrix. But if transform was non-unity, then the wrong ordering
would cause an observable error.

Logically the brush transformation is nested inside the world
transformation so the right order is applying the brush transform first
followed by the world transform.
2025-08-19 16:51:15 +01:00
Oli
270063ac31 Projucer: (MSVC) Emit message on plugin install location and config error 2025-08-18 16:00:00 +01:00
Oli
cb698566e8 Projucer: (MSVC) Add missing Unity binary location property 2025-08-18 16:00:00 +01:00
reuk
b9a0dd4b56
CMake: Fix juce_vst3_helper target check 2025-08-14 17:08:25 +01:00
reuk
ccdc9d6779
AudioProcessor: Remove friendship with AudioProcessorParameter 2025-08-14 14:14:47 +01:00
reuk
da8150bb58
AudioProcessorParameter: Break dependency cycle with AudioProcessor 2025-08-14 14:14:47 +01:00
reuk
96ff7a0dcb
AudioProcessor: Move getDefaultNumParameterSteps() to AudioProcessorParameter 2025-08-14 14:14:47 +01:00
reuk
476f09f2c9
AudioProcessorParameter: Remove friendship with unrelated types 2025-08-14 14:14:47 +01:00
reuk
edd274f18e
AudioProcessorListener: Move impl to dedicated file 2025-08-14 14:14:47 +01:00
reuk
1623b63889
AudioProcessorParameter: Move impl to dedicated file 2025-08-14 14:14:47 +01:00
reuk
90b948dffd
AudioProcessor: Remove deprecated functions 2025-08-14 14:14:47 +01:00
reuk
5eba9a6434
OpenGL: Clear bound texture after rendering transparency layer
A change introduced in 00836d1e94 meant
that GL renderers could sometimes assert in
StateHelpers::ActiveTextures::bindTexture() when ending a transparency
layer.

Specifically, the issue was provoked by adding the ScopedTextureBinding
in the constructor of OpenGLFrameBuffer. This reset the bound texture
after creating a new transparency layer.

I think the previous implementation worked by accident, not by design.
It so happens that when rendering multiple transparency layers within
the same frame (i.e. calling begin/end several times in that order,
*not* nesting the calls), the same texture ID will generally get reused.

From the graphics context's (GC's) perspective, we create a texture with
ID "2", then call bindTexture() to bind it, and the GC remembers that
this ID is bound. We draw the frame, and the texture gets destroyed. The
call to glDeleteTextures() will cause the default texture, "0", to be
bound if the texture being destroyed is bound at the point of
destruction. So, after the texture is destroyed, the GC's stored binding
no longer reflects reality, since texture "0" is now bound.

The next time we create a texture, that texture also gets created with
ID "2". Previously, we would leave this texture bound after
construction, but now we re-bind the previously-bound texture, "0". This
causes the assertion in bindTexture() to fire when we next attempt to
bind texture "2", since the actual bound texture is "0".

The solution added in this patch will bind texture "0" when the
transparency layer image is destroyed, in order to keep the GC's view of
the GL context consistent with the real state.
2025-08-14 14:13:09 +01:00
reuk
2712f63628
Graphics: Use unique_ptr instead of raw pointers in RenderingHelpers 2025-08-14 14:13:09 +01:00
reuk
35d3fab960
AU Client: Improve AUChannelInfo reporting and add tests
The previous implementation could emit 'wildcard' channel layouts in too
many scenarios.

A wildcard channel count is -1 or -2, and indicates that any number of
channels is supported on the bus.

If the input and output layouts must match, then a layout of [-1, -1]
should be returned.

If any layout is valid in both directions, then a layout of [-1, -2]
should be returned.

In the case where we have a bus A and opposite bus B, we will now only
emit a wildcard count for bus A if every bus standard bus layout up to a
channel count of 16 can be applied successfully without changing the bus
count of B.
2025-08-14 14:13:09 +01:00
reuk
7e3aae3cb9
AU: Refactor getAUChannelInfo to make mismatch checking more concise 2025-08-14 14:13:09 +01:00
reuk
0fb62bd240
AU: Refactor getAUChannelInfo to reduce duplication 2025-08-14 14:13:09 +01:00
reuk
b5ea607dcc
AU Host: Avoid potential UB reads of MIDI data 2025-08-14 14:13:09 +01:00
reuk
aebba3c875
AAX Client: Manually declare compatibility with all channel layouts for MIDI FX
Previously, MIDI FX plugins would only load on mono tracks.

Now, we add a separate plugin description for each potential track
layout. This is the same approach used by the example MIDI FX from the
AAX SDK.
2025-08-14 13:09:51 +01:00
attila
fa0ed2801d Fix J8 vertical text placement regression in the software renderer 2025-08-13 17:28:30 +01:00
Oliver James
fa6fa9a61a
Linux: Implement support for extra mouse buttons 2025-08-13 15:38:21 +01:00
Oliver James
c01bf65d3f
MacOS: Implement support for extra mouse buttons 2025-08-13 15:38:18 +01:00
Oli
d390db8eef
Windows: Implement support for extra mouse buttons 2025-08-13 15:38:14 +01:00
Oli
df99869d23
ModifierKeys: Add support for back and forward mouse buttons 2025-08-13 15:38:10 +01:00
Oli
8741f900e7 TooltipWindow: Enable by-char breaking for the tooltip text 2025-08-13 14:20:20 +01:00
Oli
8dc4dcd56b TextLayout: Implement better line balancing algorithm
The previous implementation was unstable when 'by character' line
breaking was used on long lines of text.

Co-authored-by: Tom Poole <tom@juce.com>
2025-08-13 14:20:20 +01:00
Oliver James
7a30354ce9 TextLayout: Enforce character wrapping attribute 2025-08-13 14:20:20 +01:00
Anthony Nicholls
5b4fca7bd0 String: Fix a bug in calculating the number of significant digits for exact powers of 10 2025-08-13 13:11:36 +01:00
attila
b95ede49ff Fix calling FileListComponent::setSelectedFile after DirectoryContentsList::setDirectory
Prior to this fix calling setDirectory and then setSelectedFile from the
same call stack could cause setSelectedFile to have no effect. This was
because the directory change is asynchronously propagated from the
DirectoryContentsList. This was picked up by the FileListComponent as a
directory change after setSelectedFile, even though the directory change
happened before.
2025-08-13 12:45:41 +01:00
reuk
b272f968aa
NativeMessageBox (iOS): Delay lookup of focused peer
Before 2c5b1fbb6f, we only queried
currentlyFocusedPeer during runAsync(), instead of reading it
immediately. The behaviour after that commit prevented message boxes
from showing if showMessageBoxAsync() was called before any peer had
been created.
2025-07-30 11:22:09 +01:00
reuk
2cbcbc8882
iOS: Update Info.plist generation to include UIApplicationSceneManifest
This suppresses the "Info.plist contained no UIScene configuration
dictionary" warning, raised at runtime in the Xcode console.
2025-07-30 11:22:05 +01:00
attila
0c2d55c7dd Linux: Fix XEmbedComponent::setVisible
This also affects the WebBrowserComponent. Prior to this fix calling
setVisible (false) had no effect.
2025-07-30 11:18:39 +02:00
reuk
be8a5f72cc
Android: Add new ActivityLifecycleCallbacks base class 2025-07-29 15:04:15 +01:00
reuk
c34208b3b0
Android: Fix formatting in JuceInvocationHandler.java 2025-07-29 15:04:15 +01:00
reuk
1c2eb2d056
Android: Refactor lifecycle callbacks to reduce repetition in lifecycle listener registration 2025-07-29 15:04:15 +01:00
reuk
11752d061f
Android: Refactor to use inline statics 2025-07-28 13:41:52 +01:00
attila
242405323e ComboBox: Fix accessibility navigation when the PopupMenu has a parent component
With the PopupMenu creating its own window the focus would return to the
ComboBox after activating a menu item. Prior to this commit however the
focus was seemingly lost after menu item activation. With this change
the focus returns to the ComboBox in both cases.
2025-07-28 14:28:49 +02:00
attila
f97355b9f6 Direct2D: Fix seams between tiles for large bitmaps 2025-07-25 20:45:17 +02:00
attila
19906c9d2f Direct2DGraphicsContextTests: Ignore the image edges to allow for differences in anti-aliasing 2025-07-25 20:45:17 +02:00
attila
3f898f6fee Direct2D: Fix jitter when drawing bitmaps with non-unity scaling
Reverts ca3abbb96d.

Prior to this fix gradually changing the Component scale would lead to
the jittery movement of drawn bitmaps, as their position would be
snapped to an arbitrary integral representation.
2025-07-25 20:45:17 +02:00
attila
5bc44c301f Make Direct2DGraphicsContextTests acceptance criteria stricter 2025-07-25 20:45:17 +02:00
attila
b674a4c130 Tidying: Change misleading variable name 2025-07-25 20:45:17 +02:00
attila
8f30ba70cc Tidying 2025-07-25 20:42:41 +02:00
attila
79ded8c1f3 PopupMenu: Fix accessibility issue where ticked items couldn't be pressed
The issue became manifest in c51b331318.
In our implementation the toggle action takes precedence over the press
action, making the latter unreachable when the Item is in a checkable
state. Calling isTicked (true) turns the Item into a checkable object.
The onToggle implementation however didn't interact with the isTicked
state, and it didn't fire the press action either. This made the item
non-interactable with screen readers once it got into a ticked state.
2025-07-25 20:42:41 +02:00
Sudara
b1e19da5f5 Docs: Improve CMake API docs
* Add LV2 to FORMATS (thx @FigBug).
* Add more property defaults.
* Update examples to use lowest supported iOS CMAKE_OSX_DEPLOYMENT_TARGET.
* Formatting consistency and general cleanup.
2025-07-25 16:53:57 +02:00
reuk
f3840561b5
Projucer (MSVC): Add setting to control intrinsic functions optimisation flag 2025-07-22 15:47:40 +01:00
reuk
6212a4c81f
Android: Add an assertion to check that app style is only modified on the main thread 2025-07-22 15:24:52 +01:00
reuk
e627d0b66f
Desktop: Add a note about screen rotation to the docs for screen insets 2025-07-22 15:23:15 +01:00
reuk
1e1e5036fb
Android: Fix bug where system bars could incorrectly become opaque after adding/removing desktop components
This bug could be observed in the DemoRunner:
- Enable "button" navigation mode (as opposed to "gesture" mode) on the
  Android device.
- Remove the line enabling kiosk mode, build and install the DemoRunner.
- Run the app and navigate to the Settings pane. Open a menu, or the
  bluetooth MIDI dialog window, then close the popup window.
- Rotate the device.

Previously, the steps above could result in the system painting its own
backgrounds behind the system bars. With this patch in place, we reset
the requested system UI colours and transparency, which seems to
maintain the desired appearance.
2025-07-22 15:18:12 +01:00
reuk
896dd10845
Projucer: Add unit tests to check that icons can be created from raster or vector data 2025-07-22 12:40:36 +01:00