Commit Graph

909 Commits

Author SHA1 Message Date
freddii
2593a84d56 Fix some spelling mistakes. 2021-01-12 09:55:31 +00:00
James Crook
44b191ff42 Bug 2622 - Track name overlay is opaque
Somewhere along the line the 'rect' passed in to DrawTrackName()changed
from being for the track area to being for the name area.  Accordingly
the track rect now has to be explicitly accessed from the track to get
its height, from which the transparency is then derived.
2021-01-06 15:57:54 +00:00
Leland Lucius
528d04c8f0 Bug 2526 - Mac: multi-projects inhibit label text creation
Reverting previous fix as fix for bug #2531 seems to have resolved
it better.
2020-09-24 13:44:35 -05:00
Paul Licameli
80cf77eb19 std::once_flag should be static 2020-09-05 11:59:46 -04:00
Paul Licameli
d66ffaa4ce Bug2526: Switching projects should not disable label editing 2020-09-04 11:28:04 -04:00
Paul Licameli
047fa18afd Remove unused TrackPanel::MakeParentModifyState 2020-07-11 05:11:09 -04:00
David Bailes
25c1a0b280 Bug 2422 - Append Recording always scrolls vertically to bottom track
Fix:
Move the scrolling to ProjectAudioManager::DoRecord(), where it's known whether the recording is appending to existing tracks or not.
2020-07-07 16:32:33 +01:00
Leland Lucius
cbf1bb558e AUP3: Removes OD code related to project file handling
This removes all of the OnDemand code embedded throughout
    the main codebase. Individual files related specifically
    to OD have been left in place, but removed from the build.
2020-07-01 01:14:05 -05:00
David Bailes
cc1c395b33 Bug 2477 - visibility of newly added focused track
Problem: Newly added track which is set as the focus can be only partially visible or invisible.

If TrackPanel::OnEnsureVisible is called after a new track has been added, then in that function the line:
mListener->TP_ScrollUpDown(height);
can lead to incorrect results, as the vertical scrollbars have not yet been updated to take into account the additional track.

Fix:
Update the scrollbars in TrackPanel::OnTrackListResizing().
2020-06-15 14:45:15 +01:00
Paul Licameli
fa4d35296e AllThemeResources.h has a .cpp & doesnt include Theme.h...
... (it used to, via MacroMagic)

This splits a cycle of 8 into 6 + 1 + 1
2020-05-28 05:50:24 -04:00
Paul Licameli
ae9aca8177 Implement member functions of classes in corresponding .cpp files...
... in four cases; not in some other .cpp file.

This is another move that causes the generated graph to reflect dependencies
correctly.

This fixes other large, hidden cycles that involved PrefsDialog.cpp: there was
link dependency on that when PrefsPanel.h was used for the base class.  No
longer.

Also cycles involving TrackPanel.cpp, which contained the default
implementations for TrackPanelCell and related abstract base classes.
2020-05-28 05:50:22 -04:00
Leland Lucius
999872c21d Bug 2411 - Mac: Crash on docking/undocking Audacity with un-docked toolbar(s) 2020-05-02 21:03:23 -05:00
Yuri Chornoivan
d1ada5f08c Fix minor typos 2020-04-11 10:06:24 +01:00
Paul Licameli
0f3f13502c Fix hot zones of sub-view cursors...
which got broken at 876cd92ed3

And remove duplicate function
2020-01-17 16:04:45 -05:00
Paul Licameli
468d48b8dd Bug2245 residual: better color choice for sub-view separator...
... so it can be seen also in High Contrast theme
2020-01-15 12:58:06 -05:00
Paul Licameli
bd95b910bb Bug2245: Draw a line separating split views 2020-01-14 19:26:56 -05:00
Paul Licameli
15d7d4271d Eliminate GetActiveProject from src/ondemand 2020-01-07 16:16:18 -05:00
Paul Licameli
7dbca958a6 CellularPanel passes AudacityProject* to DoContextMenu() of cell 2020-01-01 21:57:39 -05:00
Paul Licameli
75b3ad7c61 Fix Linux build 2019-12-29 15:56:34 -05:00
Paul Licameli
cacdcf8ad5 Fix Linux build 2019-12-29 15:41:37 -05:00
Paul Licameli
c882564994 Move drawing of TrackName from the subview to VRulersAndChannels...
... And thus do it only once per channel (i.e. once per set of sub-views)
2019-12-29 15:31:03 -05:00
Paul Licameli
4b2f78fd0d One more level of hierarchy in the TrackPanel area sudivision...
... Encompassing all subviews, with their rulers, for one channel.

Correct the comments about the subdivision.
2019-12-29 15:07:55 -05:00
Paul Licameli
7c70d78430 Pass TrackPanelDrawingContext into TrackPanelDrawable::DrawingArea() 2019-12-28 13:36:46 -05:00
Paul Licameli
49cab86fc1 TranslatableString for tooltips and status bar messages 2019-12-20 21:54:49 -05:00
Paul Licameli
681950fc61 TranslatableString for names, labels, tooltips of wxPanelWrapper...
... and Grabber too
2019-12-16 10:58:05 -05:00
David Bailes
14b53e6736 Bug 2251 - Windows: NVDA sometimes reads the name of the track twice
Problem:
Currently calling Track::EnsureVisible() also sets the track as focus.
In Audacity 2.3.3 the timing of the code to set the focus was changed. Rather than a direct call, an event is queued, and then the focus is set. This has changed the timing of the focus event which is sent with respect to other focus and name change events. In particular in the case of toggling the selectness of the focused track, this moved the focus event to be after the name change event.
These changes only had an effect on NVDA - Jaws and Narrator were unaffected.

The introduction of this bug has highlighted an existing problem.
1. There are a small number of existing cases where a track needs to be visible, but where it is already the focus, and so setting the focus is unnecessary. For example, pressing Enter to toggle whether a track is selected.
2. Some of the Audacity code which calls EnsureVisible() is written with the assumption that EnsureVisible() doesn't set the focus, and so there are unnecessary focus events. Whilst other code which calls EnsureVisible() assumes that it also sets the focus. Confusion.

The Fix:
Remove the setting of focus from within Track::EnsureVisible(), and so remove the unnecessary focus events.
Calls to set the focus were added before calls to EnsureVisible where the code was relying on EnsureVisible to set the focus. In TrackPanel::ProcessUIHandleResult, and TrackPanel::OnMouseEvent, I wasn't sure if the focus needed to be set, so called it anyway to ensure that the behaviour did not change.

So I would like to remove the setting of focus from within Track::EnsureVisible(), and add explicit calls to set the focus where necessary.
I think this would make the code clearer, remove unnecessary calls to set the focus, and make it easier to keep NVDA happy.
2019-11-26 14:43:25 +00:00
Paul Licameli
af9959dc98 Rewrite WaveTrackView::GetSubViews to cache last computed heights 2019-11-23 15:02:09 -05:00
David Bailes
185d555fc6 Bug2239: Windows, accessibility problem when TrackPanel regains focus
Problem:
When the TrackPanel regains focus, screen readers do not read the track name.
Introduced by the commit: acfd2b70

Fix:
Change TrackPanel::SetFocusedCell() so that it actually sets the focus, rather than just getting it :)

Note: this also fixes bug 2238
2019-11-13 16:49:02 +00:00
Paul Licameli
0bdb09eefb TrackPanel was not using NoteTrack 2019-07-22 15:45:56 -04:00
Paul Licameli
33f3d4b82d Heavyweight version of SelectedRegion stored in ViewInfo emits events 2019-07-17 12:43:39 -04:00
Paul Licameli
54493f34a5 Correct vertical ruler width recalculation for multiple sub-views...
... though not more than one is yet shown
2019-07-11 10:33:58 -04:00
Paul Licameli
db16150366 Break cycle: TrackPanelResizerCell, TrackPanelResizeHandle, TrackView 2019-07-09 14:55:31 -04:00
Paul Licameli
c7b888b903 WaveTrackView now delegates to the proper sub-view...
... by a redefined area subdivision policy in TrackPanel

So the SpectrumView, WaveformView, and associated ruler and handle classes
find real use, while WaveTrackView is really used only for its height and to
supply the delegate, and WaveTrackVRulerControls and WaveTrackVZoomHandle
are not used

There is also some anticipation of multiple track views
2019-07-08 10:27:43 -04:00
Paul Licameli
3dc4216dcc Rewrite bff30b6 delaying the effect...
... otherwise some stack overflows might happen in Refresh of TrackPanel or
AdornedRulerPanel
2019-07-08 09:39:48 -04:00
Paul Licameli
bff30b6ae9 Eliminate idle event handler of CellularPanel...
... achieving the intent of b7386c2db1 by other
means
2019-07-07 13:48:27 -04:00
David Bailes
dc88fe84d9 TrackPanel: fix when it is set as keyboard handler.
Problem:
Currently KeyboardCapture::Capture(this) is called in TrackPanel::OnTrackFocusChange().
So the keyboard handler is not automatically set when the track panel becomes the focus.
Example of a symptom:
A project contains a label track, and is the focus, and type to create a label is enabled.
Move to focus to another window, and then back to the Audacity window.
Type a character. A label is not created.

Fix:
Move the call KeyboardCapture::Capture(this) to TrackPanel::SetFocusedCell(), so that it gets called when the TrackPanel becomes the focus.
2019-07-05 15:18:16 +01:00
Paul Licameli
eb4eba6325 AdornedRulerPanel updates its play region in idle time...
... Eliminating TP_DisplaySelection and making ProjectWindow independent of
AdornedRulerPanel
2019-07-03 23:38:33 -04:00
Paul Licameli
acfd2b7010 TrackFocus is a new attached object...
... removing the need to use TrackPanel to get and set the focused track

ProjectAudioManager loses its direct dependency on TrackPanel
2019-07-03 19:10:21 -04:00
Paul Licameli
13c2e4de0f Move members from ControlToolBar into class ProjectAudioManager...
... and ControlToolBar is included in fewer places
2019-07-03 16:52:16 -04:00
Paul Licameli
1e4812f470 GetProjectPanel analogous to GetProjectFrame breaks dependencies...
... in places that need the TrackPanel but only to invoke common wxWindow
methods on it.

This eliminates direct use of TrackPanel by Scrubbing and ProjectWindow
2019-07-03 13:53:07 -04:00
Paul Licameli
52ff705b0d ScrollIntoView out of TrackPanel, into ProjectWindow 2019-07-03 13:32:32 -04:00
Paul Licameli
e2362bc25a Move project status string management to new attached object class 2019-07-02 21:01:34 -04:00
Paul Licameli
abe69ddd35 Remove some unnecessary calls to FixScrollbars...
... because RedrawProject or HandleResize invokes it
2019-07-02 08:06:24 -04:00
Paul Licameli
30715e4fe2 Pass AudacityProject as context into TrackPanelCell key handlers...
... as was done for mouse events.

This eliminates some need for GetActiveProject(), which is good, and prepares
for the fix for bug 2141
2019-06-28 13:18:07 -04:00
Paul Licameli
af791d3d0b Redo previous commit's fix...
... the bug was introduced at e581fa60d9

I think it is better to make TrackPanel::OnTrackMenu crash-proof when
called with the default argument
2019-06-28 10:50:51 -04:00
Paul Licameli
38f3ee95c0 TrackInfo doesn't need TrackPanel to push preference changes to it...
... This frees six more files from cycles, leaving that no-longer biggest s.c.c.
at just seven files now!
2019-06-27 00:10:56 -04:00
Paul Licameli
9585f32be5 Remove TrackArtist::leftOffset 2019-06-27 00:10:55 -04:00
Paul Licameli
b05acc32da Move drawing code for track names 2019-06-27 00:10:53 -04:00
Paul Licameli
dc216d669b Move drawing code for snap guidelines 2019-06-26 23:39:42 -04:00
Paul Licameli
e6dae33038 Move drawing code for focus border 2019-06-26 23:39:42 -04:00