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

14356 commits

Author SHA1 Message Date
reuk
d69dee0f5b
Font: Return correct result from getStringWidth after setting size in points
Previously, code such as the following would return a smaller string
width for larger tracking values:

    juce::Font f { juce::FontOptions{}.withPointHeight (16.0f) };
    const auto g = f.withExtraKerningFactor (1.0f);

    const auto a = f.getStringWidth ("foobar");
    const auto b = g.getStringWidth ("foobar");

With this change applied, the width 'b' is greater than the width 'a',
as expected.
2024-06-11 11:34:04 +01:00
reuk
e8b38b8922
Revert "Windows: Use new window hit-testing API to implement Windows window-management features like Aero Snap"
This reverts commit adc63cecb1.

Reverting this commit is only a temporary measure to facilitate a stable
release of JUCE 8. Further work on this feature will continue on
develop, and will likely be included in a future release of JUCE 8.
2024-06-11 11:34:04 +01:00
reuk
9c192940e0
VST3 Client: Avoid returning kResultNotImplemented from setComponentState
The base implementation of this function does nothing, and returns 'not
implemented'. It is more correct to return 'ok', to indicate that
setting the component state succeeded.
2024-06-11 11:34:04 +01:00
reuk
a42a498f5e
VST3: Add support for new wide/Atmos speaker layouts 2024-06-11 11:34:04 +01:00
reuk
34e454e3f1
AudioChannelSet: Fix formatting 2024-06-11 11:34:04 +01:00
reuk
57c308b685
AudioChannelSet: Add new ITU variants of 9.0.4, 9.1.4, 9.0.6, and 9.1.6 2024-06-11 11:34:04 +01:00
reuk
40b6ab9114
Resave all projects 2024-06-11 11:34:04 +01:00
reuk
632bdafab7
VST3 Client: Update moduleinfotool to write compatibility info from plugin
Reintegrates changes from 06a2089872
2024-06-11 11:34:03 +01:00
reuk
ebae624d52
VST3: Update SDK to 3.7.11 2024-06-11 11:34:03 +01:00
attila
17611f74ca Minor code cleanup 2024-06-10 17:51:26 +02:00
attila
c2b461026b Fix shaping for text that uses a single CR for line breaking 2024-06-10 17:51:26 +02:00
Anthony Nicholls
c4d5ffa7ab ListenerList: Add a thread safe ListenerList type 2024-06-07 20:25:39 +01:00
Anthony Nicholls
0dfff1454c ListenerList: Optimise empty listener list 2024-06-07 20:25:39 +01:00
Anthony Nicholls
315167a91a ValueTree: Optimise when listeners don't remove themselves 2024-06-07 20:25:39 +01:00
Oliver James
a469daf5be Resave all projects 2024-06-07 09:23:23 +01:00
Oliver James
3988d492ac Core: Move __DATE__ and __TIME__ into a dedicated TU 2024-06-07 09:23:23 +01:00
attila
57d1ad9ca6 Suppress GCC warnings related to the anonymous namespace used around choc::javascript
The warnings are emitted by GCC on Linux, since the commit
dbd3b4f34b.
2024-06-06 13:48:51 +02:00
attila
2540c807d8 WebViewPluginDemo: Implement AudioProcessorEditor::getControlParameterIndex 2024-06-06 13:48:51 +02:00
attila
3339843f66 Resave all projects 2024-06-06 13:48:51 +02:00
attila
abdf9a6b75 Add WebView related helper classes for implementing AudioProcessorEditor::getControlParameterIndex 2024-06-06 13:48:51 +02:00
attila
d61e516bbc Add the parameterIndex property to all WebView related parameter ParameterAttachments
This affects the WebSliderParameterAttachment,
WebToggleButtonParameterAttachment, and WebComboBoxParameterAttachment
classes.
2024-06-06 13:48:51 +02:00
attila
0d8b05e8ee WebBrowserComponent: Enable click-through behaviour for WkWebView, add option to disable it
The default is enabled to behave similarly to NSViewComponentPeer. The
behaviour for the old Apple WebView is unchanged.
2024-06-06 13:48:51 +02:00
attila
4d2986ea59 Add new WebBrowserComponent option for file access control on Apple platforms
If allowAccessToEnclosingDirectory is set to true, it is now possible
for the WkWebView implementation to access sibling files relative to a
file specified with the file:// scheme.

This allows an iOS app to load an HTML file in the documents directory,
and that HTML file can reference and load image files inside the HTML
file's parent directory.
2024-06-06 13:48:51 +02:00
attila
b9cb7d4fe3 Make WebView2 installation instructions more robust 2024-06-06 13:48:51 +02:00
Oliver James
2cdb78e3e5 Resave all projects 2024-06-04 10:19:58 +01:00
Oliver James
7306fe1789 Projucer: Remove user login and license check code 2024-06-04 10:15:38 +01:00
Anthony Nicholls
fcaaf38c58 DemoRunner: Prevent infinite recursion in the AnimationEasing demo 2024-06-03 12:33:20 +01:00
reuk
f764026626
ResizableWindow: Disable resizing border for desktop windows 2024-05-31 11:43:30 +01:00
reuk
659de5842f
Direct2D: Fix flickery resizing when using an internal resizer
Resizing using window manager functionality (e.g. clicking and dragging
in the non-client area) will send WM_SIZING to the window, which in turn
will enable continuous repainting in the D2D renderer until the resize
operation ends.

Continuous repainting is required in order for the window to display
correctly during the resize. Without continuous repainting, some frames
may not be completely painted, and may display with black areas,
producing a flickery effect.

When a resize is controlled entirely by the client, e.g. using the
corner resizer in the AudioPluginDemo standalone, WM_SIZING is never
posted. Instead, we assume that if the window has captured the cursor
during a setBounds call then it is probably resizing. We enable
continuous repainting in this case, and stop repainting once the window
releases the mouse.

An alternative appropach would be to add some kind of start/stop resize
API to ComponentPeer. I'm currently reluctant to do that because the
ComponentPeer API is already so large.
2024-05-31 11:43:30 +01:00
reuk
adc63cecb1
Windows: Use new window hit-testing API to implement Windows window-management features like Aero Snap 2024-05-31 11:43:30 +01:00
reuk
bb47c6c99a
ComponentPeer: Fix typo in name of internal windowRepaintedExplicitly enum 2024-05-31 11:43:30 +01:00
reuk
edd5745d7f
DocumentWindow: Implement window hit-testing API 2024-05-31 11:43:30 +01:00
reuk
9a91ae2ab6
Component: Add API for window-control hit-testing 2024-05-31 11:43:30 +01:00
reuk
8a09ac37cb
ResizableWindow: Always set resizable flag, regardless of whether the window has a title bar 2024-05-31 11:43:29 +01:00
reuk
4201b76d15
ResizableWindow: Add const to virtual members 2024-05-31 11:43:29 +01:00
reuk
e12a1a75ac
ResizableWindow: Always recreate desktop window when updating resizability
Windows without titlebars may now be resizable, and therefore must be
recreated if resizing is enabled/disabled.
2024-05-31 11:43:29 +01:00
reuk
66a29f9762
GlyphArrangement: Avoid divide-by-zero in addFittedText 2024-05-31 11:43:29 +01:00
Matt Gonzalez
00c958ff3e
DirectWrite: Rework custom font collection loader
Removes redundant memory copies and sorts out issues with ownership of the font data
2024-05-31 11:43:29 +01:00
reuk
a59904af64
UUID: Add size() getter to facilitate safer access to bytes 2024-05-31 11:43:29 +01:00
reuk
d7788100d5
ModalComponentManager: Remove friendship with Component
This change makes it slightly easier to audit invariants of
ModalComponentManager, as we can now be certain that only member
functions of ModalComponentManager can access its data members.
2024-05-31 11:43:28 +01:00
Anthony Nicholls
24f3a91a35 Timer: Add a leak detector 2024-05-30 18:33:03 +01:00
Anthony Nicholls
98acf79859 Timer: Prevent assertion from the Shutdown detector 2024-05-30 18:33:03 +01:00
Anthony Nicholls
9b44fa750b Timer: Stop the timer thread on shutdown to prevent a potential hang on windows
This commit reverts commit: 9e9da250 as it introduced a regression.
On windows when exit is called on a dll it forcibly kills any threads
still running before destroying any static objects. This means if a
Timer object is static the timer thread will be killed. Later when the
static object is destroyed it will wait for the thread to exit, which
because the OS forcibly killed it will never come true.
2024-05-30 18:33:03 +01:00
Oliver James
212d4631fc Resave all Projects 2024-05-30 12:24:20 +01:00
attila
51955453ef Remove TextLayout::createNativeLayout() 2024-05-30 12:21:35 +01:00
Oliver James
38f299a054 TextLayout: Respect the ReadingDirection parameter of AttributedString 2024-05-30 12:21:35 +01:00
Oliver James
03e79f8f12 TextLayout: Use new shaping engine
By utilising ShapedText in the TextLayout implementation.
2024-05-29 15:11:57 +02:00
attila
30daa356ca ShapedText::Detail: Add getSimpleShapedText() 2024-05-29 15:11:57 +02:00
attila
d794fac44c SimpleShapedText: Fix line break behaviour with text trailing whitespaces
This fixes an issue with the text wrapping logic for text chunks ending
in a whitespace.

When trying to fit a text chunk, the logic works with two values: width
with trailing whitespace, and width without trailing whitespace.

When the trailingWhitespacesShouldFit option is false, the logic
checks if "withoutTrailingWhitespace" can still fit inside the remaining
width.

Prior to this fix, it then decremented the remaining width with
"withoutTrailingWhitespace", but it should have used
"withTrailingWhitespace" for the decrement operation, always, regardless
of the value of the withTrailingWhitespacesShouldFit option.

This mistake only caused an observable issue when multiple fonts were
used for the shaping operation, and a different font would be used
immediately after a whitespace falling at the end of a line.
2024-05-29 15:11:57 +02:00
attila
aee65c147e JustifiedText: Fix line spacing for multi-font text
Prior to this change, the spacing between line N and line N + 1 would be
lineHeight (N).

This resulted in incorrect spacing when using multiple fonts in a text.

This commit uses the correct spacing, which is
maxDescent (N) + maxAscent (N + 1). This is also the same rule that was
used by TextLayout prior to JUCE 8, and the rule that CoreText's
AttributedString features are using as a general rule.

Note: lineHeight (N) = maxAscent (N) + maxDescent (N).
2024-05-29 15:11:57 +02:00