Commit Graph

368 Commits

Author SHA1 Message Date
8ead1439d8
Fix ruler/canvas separator
The track-header (gtk) is packed with 1px box spacing. This
is added at the top of each box (best seen by looking at the
group-tab vs track-header alignment in the editor).

However the actual track separator line on the canvas is at the
bottom of each track, aligning with the top of the next track
or automation-lane.

The first track however lacks a separator at the top, which
needs to be provided by the ruler. Once the canvas is scrolled
this ruler/canvas separator overlaps with the bottom separator of
each TAV.

Using ruler Rectangle::set_outline had various issues.
The outline extends outside the rectangle. It bled into the
video-timeline instead of the canvas' top y-axis pixel.

Also the separator was above the video-timeline, not above the
canvas. Hence a dedicated separator Line is preferable.
It also provides a consistent separator if no rulers are visible.
2022-07-06 20:50:06 +02:00
Mads Kiilerich
cb4e10683d
gtkmm: use size_request() function instead of deprecated Gtk::Widget::size_request(&) 2022-04-08 21:11:07 +02:00
Mads Kiilerich
7f649efd42
gtkmm: use set_can_focus() instead of deprecated Gtk::Widget::set_flags(CAN_FOCUS) 2022-04-08 21:11:06 +02:00
Mads Kiilerich
a86aa31747
gtkmm: use get_visible() instead of deprecated Gtk::Widget::is_visible() 2022-04-08 20:20:10 +02:00
1999a3aae8 explicitly discard the return value from ::process_redisplay_track_views() 2022-04-05 20:52:10 -06:00
9ad82787a1 Instrument Selector: use a 3-way Disposition to disambiguate the uses of this widget 2022-02-04 21:33:12 -06:00
5cebd64924
Fix fit tracks
The track-height change needs to be applied so that
vertical_adjustment max range is set correctly.
Otherwise vertical_adjustment.set_value() may fail
or scroll to the wrong position.

In 5b3eacd421 `redisplay_track_views()` was moved from
EditorRoutes to Editor. The call was delegated to the idle
thread, potentially collecting multiple calls before performing
the update.

This resulted in "Fit selection" to set the y-offset before the
height-change was applied.
2022-01-27 19:57:58 +01:00
luz paz
364f2f0788 Fix typos in gtk2_ardour/ directory
Found via `codespell -q 3 -S *.po,./share/patchfiles,./libs -L ba,buss,busses,doubleclick,hsi,ontop,ro,seh,siz,sur,te,trough,ue`
2022-01-26 12:35:38 -05:00
d50e854b05 Rulers: restore theme-ing of ruler bars (reverts much of 60cb) 2022-01-21 11:30:14 -06:00
60cbe57a6e Marker Rulers: changes to match mini-timeline aesthetic
Highlight ruler lanes when you enter, instead of showing many lines
2022-01-20 18:59:21 -06:00
b51621a1ae
Fix assert() when using DnD to import MIDI files
When importing a multi-track MIDI files with identical track-names,
Ardour would create the same file for each track. Effectively
overwriting an existing file.

The following MIDI file would create the same file twice
in `interchange/`, once for each MTrk.

```
MFile 1 2 240
MTrk
0 Meta SeqName "Foo Bar"
0 TimeSig 4/4 24 8
0 Tempo 666667
0 Meta TrkEnd
TrkEnd
MTrk
0 Meta TrkName "Foo Bar"
0 On ch=10 n=36 v=95
...
```
2022-01-19 19:22:51 +01:00
0204ea1f24
Unify Region Drag/Drop
Identify Regions using PDB::ID. This allows dragging regions
from almost anywhere to anywhere, without special cases.
2022-01-19 17:13:51 +01:00
056189c76c
Clean up DnD, use MIME-types
This is in preparation for allowing to drag trigger-regions
or trigger-slots. Those will not use a static singleton
PublicEditor API.

Additionally this constrains Ardour-internal drags to Ardour
(via Gtk::TARGET_SAME_APP).
2022-01-10 21:29:29 +01:00
b1f73d25bf actual GUI interaction for cue marker ruler 2022-01-04 15:23:51 -07:00
77d83540b1 copy-n-paste addition of cue marker ruler (based on cd marker ruler) 2022-01-04 15:23:51 -07:00
4720a45868
Make convert_drop_to_paths() reusable 2021-12-13 22:50:13 +01:00
3c03e4951e
Use updated temporal API 2/2 2021-12-11 15:51:31 +01:00
44e67c3566 small API change to provide (debug) name to canvas cursor items 2021-08-13 12:51:36 -06:00
52d41fa4e1 fix timeline type usage on macOS 2021-08-13 12:51:35 -06:00
4f1ad4ed0d start adding new BBT marker support 2021-08-13 12:51:34 -06:00
cce695d33a changes required by fixing ambiguities in timepos_t/timecnt_t API (GUI edition) 2021-08-13 12:51:31 -06:00
eec4addcd5 GUI side cleanup forced by explicit BBT_Offset (double) 2021-08-13 12:51:30 -06:00
7433bc27e0 intermediate, unfinished snapshot of ongoing timeline types work on GTK GUI 2021-08-13 12:51:29 -06:00
2b066293fb
Set playlist ID when importing to new tracks
This amends 730a0954 and b27bb586.
This also restores the original API for do_import()
and do_embed() as used by Lua scripts.

Note that this uses distinct IDs when importing both audio
and MIDI in the same DnD request.
2021-07-08 05:28:10 +02:00
730a0954d7
Playlist UI Tweaks: assign a pgroup_id on Import (gtk part) 2021-07-03 19:06:04 +02:00
1685843082 global marker objects do not need a canvas height, so remove member and API to manage it
They extend (down) from an origin to COORD_MAX. The height is irrelevant
2021-05-14 18:37:50 -06:00
3e47057609 import process now allows optional import of MIDI markers/cues 2021-05-07 14:58:16 -06:00
efd0d65acb when window size technically, just the window containing the editor canvas, or the canvas itself) changes, recompute BBT ruler stuff 2021-02-20 17:41:32 -07:00
aecd84e7fd
Update session extents calculation
* Expose API via Public Editor
* Skip hidden tracks in calculation
* Use a single call to query playlist extents.
  This way the playlist read-lock is needed at most once per track
  which speeds up calculation.
2021-01-08 18:39:57 +01:00
4769c387f3
Expose EditorCursor via public editor API
This is in preparation to subscribe to playhead cursor position
changes in the recorder-UI.

This change also clean up the API, replacing a public variable
with a const access method and follows #12 of
https://ardour.org/styleguide.html
2021-01-08 18:39:56 +01:00
e85ae7f9a6
Verbose cursor audio region peak display
https://discourse.ardour.org/t/is-it-possible-to-view-audio-levels-in-db-by-moving-cursor-over-a-waveform/105199
2020-12-30 13:42:42 +01:00
b9674115b7 when re-entering the track canvas in internal edit mode, ensure that kbd focus is set 2020-04-17 11:34:34 -06:00
701605129e
Drag/Drop import region to where it was dropped
Previously only drag/drop to existing tracks used the target
time-position and files imported as new tracks using the drop-zone
were placed at 00:00:00:00.
2020-04-14 17:58:28 +02:00
a8f9ba4a5e
Preview video frame when dragging 2019-11-09 06:00:01 +01:00
a701882e66
Add convenience methods to test for active drags 2019-11-09 05:59:55 +01:00
57e1b3219f
Fix cursor icon over region-bar (use trim) 2019-09-26 19:44:22 +02:00
4050ca5633
Update GPL boilerplate and (C)
Copyright-holder and year information is extracted from git log.

git history begins in 2005. So (C) from 1998..2005 is lost. Also some
(C) assignment of commits where the committer didn't use --author.
2019-08-03 15:53:15 +02:00
0b699ac9f7 (Source List) merge fixes 2019-08-01 12:11:31 -05:00
b409c58ee6 (Source List) Fix drag-n-drop. 2019-08-01 12:11:31 -05:00
Jean-Marie Favreau
1846476127
Fix a bug for drag and drop from nautilus/dolphin (more spectific format first in the
list of possible inputs)
2019-05-13 15:44:11 +02:00
31815b5f26
NO-OP: whitespace
This fixes mostly <tab> after <space> and similar <tab> not used
for indenting as well as some related code alignment issues.
2019-04-13 17:57:46 +02:00
245d48dbd0
NO-OP: Clarify function name 2018-11-28 15:16:25 +01:00
f150f6c074
Use central method to check for engine where required
These are generally places where tracks/busses are created or port
connections change.
2018-11-28 00:01:50 +01:00
ceac42cc03 NO-OP: whitespace
- remove trailing whitespace
- remove space after opening brackets and before closing brackets
- add space around operators
- do not use '//' for multi-line comments, do not use "//" on line-start
  to comment-out code breaking indenting (-Wmisleading-indent)
- do add a single space after comment-start /*{SPACE}... or //{SPACE}...
- reserve duplicate whitespace "  " for alignment, remove other duplicate
  whitespace
- use established "TODO" and "XXX" (highlighted keywords)
- remove equal-sign series "====" (those indicate merge conflicts)
2018-02-24 13:55:20 +01:00
dc61256466 new_grid: Rewrite of Snap and Grid. (squashed commit)
Separate Snap from Grid.  Lots of naming changes.
Multiple simultaneous snap options allowed. Grid is one of the possible Snap options.
Grid uses the same data as the rulers.  Replace complicated tempo_lines with simple grid_lines.
The Grid is zoom-scale-sensitive along with the rulers.  If you are zoomed out, grid becomes coarser.
2018-02-09 09:59:39 -06:00
c6eab71435 new_snap: Snapped Cursor ( squashed commit )
Snapped Cursor is a line that follows the edit point, and indicates where the operation will occur.
This replaces and extends the line that appears with the Cut tool.
New associated preferences:  snap_threshold and show_snap_cursor.
2018-02-09 08:21:45 -06:00
30b087ab3d globally change all use of "frame" to refer to audio into "sample".
Generated by tools/f2s. Some hand-editing will be required in a few places to fix up comments related to timecode
and video in order to keep the legible
2017-09-18 12:39:17 -04:00
631629b8e7 Editor zoom: add zoom_to_extents() 2017-08-26 23:06:29 -05:00
1c145ccfc3 Editor zooming: Config preference to define how much zooming will be easily allowed beyond the session_ui_extents() 2017-08-26 22:44:58 -05:00
49765f8897 Editor zooming:
Add config setting for playhead-scroll-speed.
Default to 100% for now, but for new users we might later default it to something slower.
If you want to scroll quickly, it is preferred to zoom out first, then scroll.
2017-08-26 22:44:58 -05:00