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

545 commits

Author SHA1 Message Date
reuk
28414a6af8
Global: Avoid floating-point equality checks where possible 2023-04-04 19:55:11 +01:00
Oliver James
9d909fc3fe Slider: LookAndFeel outline style 2023-04-04 10:06:40 +01:00
Anthony Nicholls
28c31b1f26 Slider: allow a sliders text-box to update when a colour changes in the slider 2023-03-31 13:15:27 +00:00
Anthony Nicholls
c7689793f2 Widgets: call repaint() in colourChanged() callbacks 2023-03-22 14:59:37 +00:00
Anthony Nicholls
ba50a35364 Widgets: stop calling repaint in lookAndFeelChanged()
- A repaint will always occur from a lookAndFeelChanged
2023-03-22 14:59:15 +00:00
Anthony Nicholls
cff722a4af GUI Basics: Refactor juce_gui_basics file structure
- Created a new detail namespace
- Moved shared module implementation details into the detail namespace
- Split dependencies so source files only rely on details in the detail namespace
- Removed all code from the juce_gui_basics.cpp file
2023-03-16 08:53:12 +00:00
reuk
628edb1e15
TableListBox: Refactor mouse handling to reuse ListBox mouse handling 2023-03-08 18:19:20 +00:00
reuk
629a3ca14b
ListBox: Allow ListBoxModel to control whether items may be dragged to other windows 2023-02-22 21:00:17 +00:00
reuk
9cfbccca8e
Accessibility: Make createAccessibilityHandler public to allow calls from derived classes 2023-02-09 17:54:18 +00:00
reuk
db90a31813
TreeView: Fix getAllVisibleItems() when only the final row of the tree fits in the viewport
Fixes #1118
2023-01-25 17:12:34 +00:00
reuk
16b8cbf2b7
TableHeaderComponent: Correctly render column headers when graphics context is clipped 2022-12-14 11:12:31 +00:00
reuk
da38c1ed2a
TextInputTarget: Improve IME support on Android 2022-12-07 13:12:02 +00:00
reuk
06798ab897
TextInputTarget: Add password keyboard type 2022-12-07 13:12:02 +00:00
reuk
28f2157912
Convert ignoreUnused to [[maybe_unused]] 2022-12-01 11:41:50 +00:00
reuk
31e68c66fa
TextEditor: Use NullCheckedInvocation 2022-11-02 11:38:41 +00:00
attila
2e0646abba TreeView: Fix restoring scroll position in restoreOpennessState
This commit fixes a regression introduced in 70968d46.
2022-10-05 15:46:09 +02:00
reuk
dc8bc918d2
TextEditor: Fix bug where text could be pasted twice from the popup menu
This bug was introduced in 140f8fedb1
2022-09-29 12:05:43 +01:00
attila
2e1809ec33 Fix key up behaviour in a multiline TextEditor
A regression was introduced in d564e4931. Before that commit you
could use key up to jump into position zero of a multiline TextEditor
if the cursor was somewhere in the first line. Since that commit the
keypress had no effect. This change restores the earlier behaviour.
2022-09-28 15:07:30 +02:00
attila
d564e49312 TextEditor: Change caret positioning when clicking before text and between lines
This commit fixes an issue when using large lineSpacing, where the caret
would jump to the end of the previous line when clicking between lines.
With the new behaviour the line spacing is considered to belong to the
previous line.

The commit also changes the behaviour observed when clicking in the
empty space before the first line. Until now the caret would jump into
the first character position. Now it behaves as if the space before the
first line would belong to the first line.
2022-09-15 12:30:40 +02:00
attila
6da1357fde Slider: Update PopupDisplay in updateText() 2022-09-13 15:20:57 +02:00
reuk
a1bb7aeead
ListBox: Avoid calling updateContent in contructor 2022-09-01 15:44:27 +01:00
reuk
b324a50e82
BailOutChecker: Add checks after callbacks in Slider and ComboBox
Co-authored-by: Roland Rabien <figbug@gmail.com>
2022-09-01 15:44:27 +01:00
reuk
5cf1a964fc
iOS: Add proper UITextInput implementation
This provides an improved user experience, allowing cursor movement
directly from the keyboard.
2022-07-29 18:54:50 +01:00
reuk
921d86e586
Accessibility: Improve table navigation, row/column index/header reporting 2022-07-29 18:54:50 +01:00
reuk
dd92f66387
Accessibility: Correctly report number of disclosed rows in TreeView on macOS 2022-07-29 18:54:10 +01:00
reuk
707767fa4c
Accessibility: Multiple table fixes
- Fixes an off-by-one error when navigating by rows, caused by treating
  the table header as a row. The table header now has the header
  accessibility role.
- Fixes a bug where reordering table columns would cause the table to
  become inaccessible.
- Fixes a bug where the screen reader would try to navigate hidden table
  columns.
- Fixes an issue where moving the VoiceOver cursor to a partially hidden
  cell would cause the focus to move to the table itself, rather than to
  the cell.
2022-07-29 18:54:09 +01:00
Tom Poole
4f884c8a54 TextEditor: Call repaint on clear 2022-07-11 13:18:59 +01:00
Tom Poole
2eee1c1bd9 Slider: Respect setNumDecimalPlaces after setRange 2022-07-11 13:18:59 +01:00
Tom Poole
975bdecae5 Remove some debug logging 2022-07-05 17:22:34 +01:00
Tom Poole
3ab2ef5924 DemoRunner: Fix a crash in MidiDemo 2022-07-05 15:24:33 +01:00
reuk
6265f86d33 Accessibility: Add missing accessibility handler in TreeView Item 2022-06-24 18:37:27 +01:00
reuk
53484db875
Accessibility: Avoid allowing TextEditor and Viewport internal components to be accessibility-focused
The TextHolderComponent and Viewport::componentHolder don't have any
accessible semantics, so they shouldn't be included in the accessible
component hierarchy.
2022-06-13 15:29:57 +01:00
reuk
1c10e0c79b
Android: Fix problems with accessible text navigation
Previously, when navigating in a text editor by words, the cursor would
get 'stuck' after moving a single word. This issue should now be
resolved.

Additionally, the cursor position was not updated properly when
adjusting a selection, and would instead be moved to the end of the
selected range. With this patch applied, the cursor should now be set to
the correct position when modifying selections. When extending a
selection backwards, the cursor will display at the beginning of the
selected range, rather than the end.

Finally, most Android apps announce the 'skipped' characters or words
whenever the cursor is moved, but this feature was broken in JUCE. This
patch enables this feature.
2022-06-13 15:29:57 +01:00
reuk
2b1745272e
Android: Fix a couple of accessibility-related crashes
These crashes could be seen in the DemoRunner when selecting items in
nested PopupMenu windows.
2022-06-13 15:29:56 +01:00
reuk
140f8fedb1
TextEditor: Add option to dismiss the virtual keyboard on touches outside
Previously, individual components had to ask the peer to hide and show
the keyboard, by calling textInputRequired() and
dismissPendingTextInput() respectively. When an onscreen keyboard (OSK)
was required, most Peer implementation would directly hide/show the OSK
inside these function. However, the iOS ComponentPeer implementation
instead listened to the application's global keyboard focus, and only
opened the OSK when the focused component was also a TextInputTarget
with active input.

The iOS scheme seems like a better design, as it enforces that the OSK
hiding and showing is synced with the keyboard focus of the application.
In the other implementations, it was possible for a Component to call
textInputRequired even when it didn't have the keyboard focus, putting
the application into an inconsistent state. The iOS scheme also makes
the TextInputTarget interface more useful, as it enforces that the OSK
will only display for components that implement TextInputTarget, and
return true from isTextInputActive().

This patch changes all Peer implementations to match the iOS
implementation, improving consistency. Each time the global keyboard
focus changes, refreshTextInputTarget is called automatically, and the
OSK is shown if the focused component is a TextInputTarget that returns
true from isTextInputActive, and hidden otherwise. Components can also
call refreshTextInputTarget manually. This should be done whenever the
component updates the return value of isTextInputActive(). Effectively,
the Peer is now responsible for keeping track of the focused
TextInputTarget, rather than allowing individual components to hide and
show the OSK at will.

Additionally, this patch adds an option to the TextEditor to
automatically dismiss the OSK when the mouse is clicked outside of the
editor. This should improve user experience on mobile platforms, where
touches on sibling components may cause a TextEditor to gain keyboard
focus and unnecessarily display the OSK.
2022-06-09 16:55:19 +01:00
attila
7c66dc8e15 Slider: Add keyboard control even without accessibility 2022-06-09 16:24:00 +02:00
Tom Poole
2ec861d99e Update licensing banners to JUCE 7 2022-05-16 17:55:48 +01:00
reuk
acefc92f88 TableListBox: Avoid calling virtual functions in constructor 2022-05-13 09:44:33 +01:00
reuk
81ae759298
TableHeaderComponent: Use high-resolution image when header is dragged 2022-05-04 20:04:14 +01:00
reuk
a1e72b70df
TableListBox: Fix spurious ListBox assertions 2022-04-28 11:05:39 +01:00
attila
627afffeb4 Android: Fix dismissing screen keyboard when interacting with TextEditor 2022-04-27 18:49:44 +02:00
reuk
e02561c958
ListBox: Add checks to ensure that the ListBoxModel remains valid 2022-04-25 17:03:29 +01:00
Tom Poole
dea3fe60e4 Update copyright banners 2022-04-04 12:36:32 +01:00
reuk
eb58b471c7
Toolbar: Add accessible name for custom popup menu item 2022-02-23 10:56:10 +00:00
reuk
6d404236e2
Toolbar: Fix missing-items button when LookAndFeel changes after construction of toolbar
Previously, setting a new look and feel would create a new missing-items
button, but would not add it to the toolbar or set the onClick callback.
2022-02-23 10:56:09 +00:00
Attila Szarvas
101a886821 MouseInputSource: Eliminate superfluous drag events caused by pressure change
The bug was triggered on Monterey where a pressure of 1 is reported
while a mouse button is being held down. This caused an extra drag
event being triggered between mouse down and up events, even if no
movement occurred.
2022-02-15 10:53:32 +00:00
reuk
4cf74dfff6 Viewport: Improve drag-to-scroll on devices that can accept simultaneous mouse and touch input
Some Windows 11 devices have both touch screens and mouse inputs, and
these can be used simultaneously.

The Viewport (and ListBox) now check the input source of each mouse
down. If the source is not a mouse, the viewport will always enter
drag-to-scroll mode, regardless of the result of isScrollOnDragEnabled.
2022-02-07 14:24:11 +00:00
reuk
b2f318a775
TreeView: Allow built-in mouse handling to be enabled/disabled for custom components 2022-01-28 16:09:59 +00:00
reuk
ef7c3c6947
TreeView: Support TooltipClient interface 2022-01-28 16:09:59 +00:00
Tom Poole
c072b1bc8e Fix some typos 2022-01-25 11:48:46 +00:00