Commit graph

40987 commits

Author SHA1 Message Date
Robin Gareus
ccf3addf5a
Add spacer widget to maintain size with GUI scaling
This is intended for the (Mixbus) Group Bar
2025-06-10 21:18:35 +02:00
Ben Loftis
41fc50898e
Allow themeing of icon colors so they can be less severe
Note: this breaks some themes, notably light ones.
2025-06-10 21:18:35 +02:00
Ben Loftis
d9176fd862
Button-sizing Tweak:TransportIcon alternative to ExpandToSquare 2025-06-10 21:18:32 +02:00
Paul Davis
5208fdce2c the continuing saga of MIDI note line geometry and the scroomer 2025-06-10 12:28:33 -06:00
Paul Davis
f240898201 for find-and-display-stripable, ignore case and do inline completion & selection 2025-06-10 12:28:33 -06:00
Paul Davis
742f654fa4 StringCompletion: allow case-folded matching 2025-06-10 12:28:33 -06:00
Robin Gareus
877f603d92
Make execstack optional, and check clang's variant with space
see also ec5b06e63d
and https://discourse.ardour.org/t/fyi-ardour-9-doesnt-build-on-linux-using-clang/111896
2025-06-10 16:13:44 +02:00
Robin Gareus
949585f746
Fix comment-editor editing, allow to insert text
Previously any edit jumped to the end of the text.
2025-06-10 00:49:47 +02:00
Paul Davis
eefe584070 another round of fixing for note-to-y and y-to-note and note line setup 2025-06-09 09:29:52 -06:00
Paul Davis
658e8ad6bd put find-n-display in top level track menu 2025-06-08 09:41:44 -06:00
Paul Davis
5ad9c5a73b use match-anywhere for find-and-display-track 2025-06-08 09:14:33 -06:00
Paul Davis
4eb9285659 allow StringCompletion to match anywhere 2025-06-08 09:14:33 -06:00
John Emmas
23c7d564e2 The new class 'StringCompletion' needs to be visible outside of gtkmm2ext 2025-06-08 11:51:43 +01:00
Paul Davis
ac922f1683 remove cruft from initial addition of find-and-display 2025-06-07 23:04:06 -06:00
Paul Davis
4a827ef7ee remove new functions that are not actually used 2025-06-07 23:03:30 -06:00
Paul Davis
4867ed49da add find-and-display-stripable, bound to Primary-Tertiary-l by default 2025-06-07 21:10:30 -06:00
Paul Davis
3ac59dc837 some helper APIs to find things in a Session 2025-06-07 21:10:30 -06:00
Paul Davis
dbe7288dc4 new Gtkmm2ext helper class for string completions on a text entry 2025-06-07 21:10:30 -06:00
Robin Gareus
0803cac946
Fix optimized builds 2025-06-07 01:53:33 +02:00
Robin Gareus
f31df0a1d1
Announce and add last duplicated regions to the region-map
This fixes a potential issue of region being retained
at session close (no DropReferences signal).
2025-06-06 23:51:31 +02:00
Paul Davis
9aa049dae5 announce the region created by dragging in a MIDI time axis view 2025-06-06 10:23:06 -06:00
Paul Davis
cc435bcd0f make connection/emission debugging of PBD::Signal more useful/informative 2025-06-06 09:07:45 -06:00
Paul Davis
5e83fc95b4 Pianoroll: drop region reference when session goes away 2025-06-04 21:41:01 -06:00
Paul Davis
08f77136b9 small class rearrangement for ViewBackground and derived classes related to geometry management 2025-06-04 20:43:18 -06:00
Paul Davis
80a34fc3ec stop crash from adding a note in a region also shown in an invisible pianoroll
if the height of the pianoroll has not been set, we can't do the math
for the note range display.
2025-06-04 20:41:29 -06:00
Paul Davis
baa855d3a0 fix an error with piano roll header display for a new track 2025-06-04 20:41:03 -06:00
Paul Davis
5aabe18063 sort-of NO-OP - use nullptr in Editor initialization expressions 2025-06-04 16:59:45 -06:00
Paul Davis
134907b9b1 fixups for pianoroll header/midi view background key/note positions 2025-06-04 14:11:40 -06:00
Paul Davis
03bd3da740 fix initialization order 2025-06-04 14:11:40 -06:00
Robin Gareus
f40b64b0d5
Properly handle incomplete audio read
DiskReader::[do]refill() returns either 0, or -1 on error.
2025-06-04 17:58:51 +02:00
Paul Davis
06593d1a79 pianoroll note labelling: pixel pushing, crash prevent, theme utilization for fonts 2025-06-03 23:17:53 -06:00
Paul Davis
774658e01c remove debug output 2025-06-03 17:11:45 -06:00
Paul Davis
88f35a9c09 fix thinko when drawing lines in a LineSet
self represents the bounding box of each drawn line, but not
the coordinate(s) where to draw it
2025-06-03 17:10:07 -06:00
Paul Davis
959e360dd0 fix LineSet arithmetic (again!) and reduce redundancy
The logic for "is-integral" was backwards, and the code in both
branches of the conditional was identical
2025-06-03 17:09:29 -06:00
Paul Davis
024dedc446 pianoroll: clarify and resolve some issues caused by confusion over what type the _view member has 2025-06-03 12:14:21 -06:00
Paul Davis
e23fdd5b8c horrific hack to deal with pianoroll header (widget) single pixel misalignment currently not understood 2025-06-03 11:34:21 -06:00
Paul Davis
362672ac34 single pixel line, in themed "black" color, to divide B/C and E/F on piano roll header 2025-06-03 11:33:48 -06:00
Paul Davis
68c4fbe65a for the dark colored theme (the default) make pianoroll dividing lines less bright 2025-06-02 19:54:11 -06:00
Paul Davis
48dde40b4f share piano roll header across both GTK widget and Canvas item implementations
This also uses the new API exposed by MidiViewBackground so that the header simply re-uses
the same exact position & height values computed by the background for its note lines.

PianoRollHeaderBase is the base class with the shared implementation.

PianoRollHeader is the GTK widget derived class.

ArdourCanvas::PianoRollHeader is the canvas item derived class.

Both PianoRollHeader implementations have to implement various methods that gloss
over the differences between drawing and event handling in a GTK widget context
or in a canvas item context
2025-06-02 19:53:34 -06:00
Paul Davis
6b348d7643 some missing double -> int conversions for a Pianoroll background 2025-06-02 19:49:57 -06:00
Paul Davis
16d912c440 sort of no-op: fix canvas debug names of several items in a Pianoroll 2025-06-02 19:49:12 -06:00
Paul Davis
bbc9089264 extend MidiViewBackground API
1. provide access to an EditingContext for use in piano roll headers
2. provide pre-computed note positions and heights for use in
   piano roll headers
2025-06-02 19:47:44 -06:00
Paul Davis
96a88b9dc2 NO-OP: whitespace in function call syntax 2025-06-02 19:46:55 -06:00
Paul Davis
1f18a4defc change MidiViewBackground implementation
1. use a RectSet instead of a LineSet to draw note lines. Cairo provides
different coordinate -> pixel coloration rules for rectangles than for lines,
and it makes more sense in this case to use rectangles rather than fat lines.

2. change ::draw_note_lines() to ::setup_note_lines() since the method
doesn't actually draw anything.
2025-06-02 19:46:25 -06:00
Paul Davis
1ed9876446 Change various positions and dimensions to integer from double
This includes note heights, note positions, contents height
for streamviews, positions of tracks. It makes zero sense to think of these as
having potentially fractional positions.

In addition, fractional note heights and positions lead to numerous
errors drawing MIDI stuff at the pixel level.
2025-06-02 19:28:10 -06:00
Paul Davis
ae913acacf simplify cairo pixel alignment in Canvas::LineSet
1. do the math when we add a new coord, not at every render call
2. correctly decide whether to force an odd-width line on an integer
   coordinate to a half pixel, or an even-width line on a non-integer
   coordinate to a whole pixel.
2025-06-02 19:19:30 -06:00
Paul Davis
705fe2b52d compile RectSet code 2025-06-02 19:16:11 -06:00
Paul Davis
a47a443079 add a canvas item debug name to midi view background's note lines 2025-06-02 18:32:00 -06:00
Paul Davis
6a67a6bcc4 new canvas item: RectSet
a collection of rectangles, conceptually similar to LineSet

this avoids keeping around N different Canvas::Rectangles and instead
collapses a related set of them down to a single item
2025-06-02 18:30:40 -06:00
Paul Davis
10015f570e NOOP: alignment changes 2025-06-02 18:29:36 -06:00