Commit Graph

6667 Commits

Author SHA1 Message Date
Paul Licameli
e36070e671 Small fix to envelope operations in Equalization user interface 2017-05-07 11:12:07 -04:00
Paul Licameli
7ad910c0a6 Simplify envelope binary search and uses of it 2017-05-07 11:00:55 -04:00
Paul Licameli
30e67bcb8e some reindentation 2017-05-07 11:00:55 -04:00
Paul Licameli
26c4d65bd4 Public Envelope methods all take & return ABSOLUTE time values...
... rather than some of them being relative to the Envelope's offset.

In case of the envelopes used in TimeTrack or Equalization, offset was
always zero, so this doesn't matter, except to make the contract of the
Envelope class more explicit and sensible in isolation.

In case of InsertSpace at least, this does fix an obscure bug, which could
only happen when you have a clip, with an envelope, that starts before zero,
and you select a region overlapping that clip and some other clip, with a void
between, and you use the Join command.

Aren't you relieved that's fixed now?
2017-05-07 11:00:55 -04:00
Paul Licameli
9c683a4f19 Rename some member functions of Envelope 2017-05-07 11:00:55 -04:00
Paul Licameli
4be19128c0 Better constructors for Envelope 2017-05-07 11:00:55 -04:00
Paul Licameli
3ba1ebc5c0 Remove unused members of Envelope 2017-05-07 11:00:54 -04:00
James Crook
f0bdfc10b5 Move record-new-track option
It's now in recording-prefs rather than track-behavior-prefs, and to make room latency options (which are related to device) ar enow in device-prefs.  Naming of new tracks has also been made slightly more compact.
2017-05-07 13:22:04 +01:00
James Crook
6a33e8303a Bug 1641 - Follow up. NUMPAD_ENTER, Backspace, Delete
3 Keys that were already illegal now added back with a space before them.
This should fix these keys in 1641 too.
2017-05-07 11:17:18 +01:00
James Crook
6e65596b47 Bug 1641 - Panel navigation accelerators don't appear in the menus
This attempted fix applies the 'space' trick to make accelerators invalid, so "Left" is added as " Left" into the menus, and appears normal but does not act as an accelerator.  This is now only done for the problematic accelerators rather than for all accelerators.  It's believed that doing it for all accelerators caused the problem.

In debug builds users will see messages like the one below in the console:

"Unrecognized accel key ' right', accel string ignored."

This fix additionally adds 0..9 to the specially handled accelerators.  This should address:
Bug 1260 - Cant type "1" in the Project Rate text box

The fix has been developed and tested on Window only.  Theoretically the space might cause problems on Mac and if it does the 'space' trick could be applied just on Windows and Linux, since Mac did not seem to have the problem reported in 1260.
2017-05-07 10:59:50 +01:00
James Crook
6491aed13c Fix build failure from absent gettext 2017-05-04 22:18:51 +01:00
James Crook
c0f835b67b Add border around theme Images. Do fixups.
Adding an orange border around the images in a theme makes it much easier to cut and paste in the correct position.  I've also expanded the internal images and fixed up a few image details - the pins/bobbins on darker themes, and the light blue rather than dark blue for negative times.
2017-05-04 21:41:18 +01:00
James Crook
ef62bd70df Bug 1637 - Keyboard interaction with many controls in toolbars broken
This progresses this bug.  Specifically on Windows, Left and Right arrows and Enter (non keypad version) should now no longer be a problem.  The fix is to not show these shortcuts in menus, because otherwise the menus will catch the events.  Unfortunately attempts to show these specific shortcuts in the menus bring back the bug.

Steps to reproduce for 1637 will need to be updated.
2017-05-04 17:14:44 +01:00
James Crook
e7f95e2be0 A small step towards HiDPI
The image cache that users work with should now have 'pixels' that are 4x4.   This will in time allow us to have large or small versions of all buttons, and also means we have hi resolution images for HiDPI screens.  The actual cost of the extra size should be small, as compression will see lots of repetition.

The main point of doing this now is so that new contributed themes can be HiDPI from the start.
2017-05-04 16:56:32 +01:00
James Crook
a2ba221554 Bug 1640 - Reset Toolbars reduces Selection Toolbar to a stub 2017-05-04 16:49:02 +01:00
James Crook
78135d25fd Use blue for negative Numbers
The time ruler previously used blue for negative numbers, when scrolling left of zero was enabled.  This was broken by adding the dark-theme code.  Fixed now, and with a new configurable colour for it which defaults to blue if non provided.
2017-05-03 16:11:05 +01:00
James Crook
a53e3010f8 Tooltips for unmodified Play and Record. 2017-05-03 09:34:30 +01:00
Paul Licameli
d4726c26ca Revert "Enable EXPERIMENTAL_MIDI_OUT for all platforms..."
This reverts commit c07caade9f.
2017-05-02 09:00:14 -04:00
Paul Licameli
f51e4d81c1 Some MIDI editing and display enhancements, not dependent on playback 2017-05-02 00:41:37 -04:00
Pokechu22
77db2e7113 Transpose notes even when channel isn't visible
As mentioned by PRL
(https://sourceforge.net/p/audacity/mailman/message/35763043/),
WarpAndTransposeNotes didn't transpose, but _did_ wrap, notes that were on
channels that were hidden.  This behavior is inconsistent with all other
operations, and thus has been changed to always transform and wrap
regardless of visibility.
2017-05-02 00:37:32 -04:00
Pokechu22
3de3e7cd4d Add call to MakeParentModifyState for note track controls 2017-05-02 00:37:32 -04:00
Pokechu22
1daf22c638 Fix Fit to Height not resizing note tracks 2017-05-02 00:37:32 -04:00
Pokechu22
298bb3fde8 NoteTrack: Implement Silence and InsertSilence
Additionally, fix the UI portions of these, and fix Trim for note tracks
(the code already existed, but due to flags would not work).  As PRL
requested, this is gated only behind USE_MIDI.
2017-05-02 00:37:31 -04:00
Pokechu22
e707f6a263 Use static_cast instead of c-style casts for the velocity sliders 2017-05-02 00:37:31 -04:00
Pokechu22
8db7e65505 Get rid of SetStyle for sliders
It's no longer used, and the new set up for MixerTrackCluster makes them
unable to change the type of the slider (so it should also no longer need
to be used).
2017-05-02 00:37:31 -04:00
Pokechu22
a76ad22c91 Fix midi channel toggling
This reintroduces the buttons to toggle display of individual midi
channels, and cleans up the code behind that feature.

This functionality has actually been present in production versions of
audacity for a while, at least for clicking.  However, the buttons
themselves were not drawn, making it exteremly painful (but possible) to
use.

As requested by PRL, this is always enabled if USE_MIDI is defined.
2017-05-02 00:37:31 -04:00
Paul Licameli
c07caade9f Enable EXPERIMENTAL_MIDI_OUT for all platforms...
... at least during the development cycle.  This may be reverted if the
enhancement remains unready.
2017-05-02 00:37:30 -04:00
James Crook
7c9c74de94 Remove logging left in by mistake. 2017-05-01 23:09:42 +01:00
Paul Licameli
b9b5e0ca09 Fix mac build 2017-05-01 17:47:56 -04:00
James Crook
43ff84ba48 Preserve toolbar size when theming.
Particularly relevant for resizable toolbars which may be bigger or smaller than their standard initial size.
2017-05-01 22:28:16 +01:00
James Crook
cd69bf074f Add shortcut hint to shift-record tooltip. 2017-05-01 20:00:04 +01:00
James Crook
57b200884e Bug 1639 - Left and Right arrow keys don't work in docked toolbars, if bound to some action.
This fix works by detecting whether the focus window is the TrackPanel, in which case all keys are handled normally.  If it isn't the TrackPanel, then the problematic keys do not get sent to our own CommandHandler and proceed on to wxWidgets.

A problem that then follows is that the menu accelerators (which normally don't get a look in) may then convert the event to a menu event and stop it going any further.So it does not get to the focus window.

The fix/workaround for that is to NOT provide accelerators for up, down, left and right arrow in the menus.  I'd much rather be able to turn off those accelerators completely, yet still show them to users as hints.
2017-05-01 19:04:49 +01:00
Steve Daulton
ae24cab8fe Remove 'TODO's for completed documentation 2017-05-01 18:51:35 +01:00
James Crook
9d501f69d6 Add preference for Record being to new track. 2017-05-01 12:04:27 +01:00
James Crook
623d0f29bf Bug 1639 - Revert fix.
The fix was regarded as a workaround, and too draconian.  The problem is that Left and Right shortcuts are being captured (somehow) by our CommandManager when navigating in docked toolbars.  A full and proper fix rather than not binding these shortcuts would apply them to the toolbar in preference to the CommandManager, and so fix bug 1637, which Bug 1639 has now been marked as a duplicate of.
2017-05-01 10:26:49 +01:00
Paul Licameli
8bfe4cc685 Fix more cases of Wave and Note track editing wrongly throwing 2017-05-01 04:48:14 -04:00
David Bailes
baf46c1f85 Update to Select Previous/Next clip commands
Previously, these two commands used the clips in the focused track. They now have similar to the Tracks->Pan->Left/Right/Center commands. That is if any audio tracks are selected, the clips in these tracks are used, otherwise the clips in all audio tracks are used.
2017-05-01 09:20:44 +01:00
David Bailes
ce1d067f84 Update to Clip Boundary commands
This update affects the four commands:
Cursor to Previous clip boundary
Cursor to Next clip boundary
Select previous clip boundary to cursor
Select cursor to next clip boundary

Previously these commands all used the clips in the focused track. This update changes this so that their behaviour is the same as the Tracks->Pan->Left/Right/Center commands. That is, if any audio tracks are selected, all the clips in these tracks are used, else the clips in all audio tracks are used.
2017-05-01 08:58:46 +01:00
James Crook
0b942d04b7 Move scrub ruler line down 1px
..and update the comment.
2017-04-30 18:09:19 +01:00
James Crook
5e28e3fe6d Line to mark off scrub ruler.
Provides a clear boundary between scrub ruler and quick select ruler, even if the theme colours have been warped to be very similar.
Thanks to Gale for spotting this problem on Mac.
2017-04-30 17:22:20 +01:00
James Crook
5088881a69 Bug 1639 - Left and Right arrow keys no longer work in docked toolbars
I've bound the commands that use Left and Right keys to use Ctrl-Left and Ctrl-Right instead.  I did not find a simple fix that allowed docked toolbars to get 'furst dibs' and take left and right keys if they wanted them.
2017-04-30 16:32:48 +01:00
Paul Licameli
5dd6a3558b Use #ifdef not #if in two places 2017-04-29 15:53:55 -04:00
Paul Licameli
05badc29e5 simplify some conditional compilation 2017-04-29 15:53:47 -04:00
Paul Licameli
b2b9708b29 Fix possible assertion violations for cut, paste, trim 2017-04-29 15:41:18 -04:00
James Crook
615a5058a7 Include Experimental.h
Needed for EXPERIMENTAL_SCROLLING_LIMITS
2017-04-29 12:35:01 +01:00
Paul Licameli
a3b9dbd341 Remove unused variable 2017-04-29 06:24:34 -04:00
James Crook
74ac96e009 Only move Nyquist prompt to nyquist IF EXPERIMENTAL_DA 2017-04-28 18:10:32 +01:00
James Crook
6102c774ee Bug 1630 - Accessibility of the length/end radio buttons
For Light and Classic themes that use black text, we'll use the length/end buttons because Windows uses black for text.
For Dark and HiContrast themes that use a light colour for text, we'll use the length/end buttons IF the OS is set to use the exact same colour for text.
That for example happens if we use Microsoft's HiContrast2 and our HiContrast theme.

If the OS and theme text colour differ, then if we set blend theme colours option, which is the default, we might still use the OS colour for text in Audacity.  That will happen if the OS colour has decent contrast to our theme's background colour.   Decent is defined as more than 250 difference in RGB values.  If we use the OS colour for text, then we get the proper length/end buttons.

Note that this adds a new feature to the theme blending, in that the text colour will often adapt.  Useful when using custom text colours with HiContrast2.  When the text colour adapts, we will continue to get proper length/end buttons.

Advice to users is to match OS and Audacity themes, and use the blend option.  When themes don't match, it may be desirable to disable blending.
2017-04-28 15:49:02 +01:00
James Crook
47c6ac3233 Theme the spectrogram. 2017-04-27 21:40:16 +01:00
James Crook
ff3ed65d83 Draw TimeTrack Background in unselected colour.
Using blank colour is incorrect here.
I also removed an unused pen and brush.
2017-04-27 21:40:16 +01:00