993c7c4bec
canvas: manually remove changes from 6f91dc0799
and implement same goal in a different way
...
The AudioClipEditor features a scroll bar that is a part of the canvas. Because scroll
groups are at the top level of a canvas, the scroll bar is necessary within a scroll
group, which causes it to get confused about the difference between its own
position within the canvas and that of the scroll group. This commit introduces
a per-Item flag, _scroll_translation, which is true by default. If false, the
item will not have coordinates translated to reflect scroll group position.
2022-01-20 09:45:47 -07:00
267229c03c
ArdourCanvas::Arc (i.e. Circle) should allow for child items to be drawn
2022-01-18 16:42:00 -06:00
b2bd748672
ruler: make ::set_metric() API consistent with constructor by using ptr
2021-12-24 15:34:18 -07:00
753d1c9754
rulers: change API to accept a pointer instead of a reference to a Metric
...
We need to be able to construct Metrics after the ruler is constructed
in order to deal with Triggers which are potentially short-lived. We
stored the reference as a pointer anyway, so it's not as much of a change
as it appears.
2021-12-24 14:17:23 -07:00
6f91dc0799
canvas: fix an issue with event coordinate translation by ScrollGroup
...
If there's a grabbed item (GtkCanvas only at present) then unless it belongs to the scroll
group used for scroll offset translation, the event coordinates should not be translated,
even if the mouse pointer moves into the scroll group.
2021-12-10 18:17:58 -07:00
08e50934c9
canvas: add scroll offset info to Item::dump()
2021-12-10 17:16:10 -07:00
972229a02f
Remove some spurious printouts
2021-12-08 13:39:38 -06:00
dc826c6521
ArdourCanvas Rectangle: allow subclasses access to _rect
2021-12-07 16:32:49 -06:00
7e80111d92
Canvas: Fix notification to parent of show/hide status
...
This was changed in fc9840f2a9
to hard code a "false" argument describing
whether or not the child bbox had changed. This causes the parent to not
recompute its own bounding box when a child is shown/hidden, which is
incorrect. We now force it to true, which may be overkill for some purposes,
but at worst will just force an unnecessary bbox re-computation and nothing
more.
2021-11-09 08:49:21 -07:00
0f0c5c7039
remove Kiwi constraint-based packing code from canvas library and users (library version)
2021-11-04 11:25:30 -06:00
211b3ea668
canvas text: generalize ::font_size_for_height() to handle different font families
2021-10-19 10:54:27 -06:00
ab22733fe4
canvas: continuously variable Canvas::Text height if packed inside a layout-sensitive container
2021-10-17 17:56:27 -06:00
a1699ff612
canvas: size_allocate() from GTK gives origin in parent coordinates.
...
Convert to canvas-relative origin when passing to root group for allocation
2021-10-03 19:47:18 -06:00
e670acbb0d
canvastable: fix logic error in ::compute_bounding_box()
...
Since the bbox is determined by ::compute(), do not unconditionally clear it here
2021-10-03 16:46:25 -06:00
747a49006c
canvastable: finish comment
2021-10-02 17:45:43 -06:00
a8cc0be45c
canvastable: change some variable names; don't add per-col/row spacing twice
2021-10-02 17:09:01 -06:00
df5699b03e
canvastable: fix comment to reflect split row/col homogeneity
2021-10-02 16:24:04 -06:00
8130d265fd
canvas table: separate out row & col homogeneity
2021-10-02 16:19:49 -06:00
590866f8c1
canvas table; move computation of bounding box
2021-10-02 16:19:49 -06:00
88443586ef
canvas table: clean up attach API; improve comments; move use of padding.right outside loop
2021-10-02 16:19:49 -06:00
cc09576ef5
canvas table: dramatic fixes/extensions of table packing algorithm
2021-10-01 18:38:18 -06:00
0e779fbec9
canvastable: if a cell is empty, still adjust horiz/vert coordinates so subsequent cells are aligned
2021-09-29 11:20:50 -06:00
378e4e7a03
canvastable: fix typo that led to mis-sized table (row/col mixup)
2021-09-29 11:20:50 -06:00
27ca49efd3
canvas: generic Item::_size_allocate() must adjust allocated space to parent-relative coords
2021-09-29 11:20:50 -06:00
d07436b15d
canvas: much more work on table layout
2021-09-23 11:48:29 -06:00
29f96ad13e
Fix cross-compile (undefined references for canvas-tests)
2021-09-19 23:38:44 +02:00
47f7958714
canvastable: remove unused vars; rename others
2021-09-17 14:36:09 -06:00
44b1cea54a
canvastable: minor optimization
2021-09-17 12:53:16 -06:00
59c8b99fee
canvastable: remove rows/cols members, reuse ::compute() for ::size_request()
2021-09-17 12:51:26 -06:00
98e0ad901a
canvas: significant design changes and implementation fixes for Table
2021-09-17 12:34:13 -06:00
999fe54ab8
canvas: a few variable cleanups in Table and more use of for (auto ..)
2021-09-14 22:39:59 -06:00
6aaba192a0
canvas: improve computation of Table bounding box
2021-09-14 21:39:24 -06:00
b3854c2e92
canvas: just use stack and size counter instead of std::vector<>
2021-09-14 21:22:56 -06:00
1c42c733f7
canvas: remove use of Table::Index from API of Table::attach()
2021-09-14 21:18:44 -06:00
c952c57a99
canvas: actually follow CSS conventions for 1/2/3/4 arguments in padding
2021-09-14 21:18:44 -06:00
473ef54614
canvas: fix initialization of FourDirections object
2021-09-14 18:49:41 -06:00
d6208eabd8
canvas: fix handling of expanding items in table layout
2021-09-14 18:42:59 -06:00
5def36f780
canvas: somewhat functional homogenous table layout
2021-09-14 18:29:39 -06:00
d71fcf1955
canvas: add Table debug bit
2021-09-14 18:29:39 -06:00
f05bb4afab
canvas: new type, to centralize CSS-style padding/spacing initialization (but only used by Table so far)
2021-09-14 18:29:39 -06:00
c5fcdc1119
canvas: more work on table layout, still incomplete
2021-09-14 18:29:39 -06:00
44b11802bf
canvas: initial (probably incorrect) implementation of Canvas::Table
2021-09-13 22:00:33 -06:00
d50693b97d
cnavas: add lots more debug traces to box, and an explanatory comment
2021-09-10 13:02:01 -06:00
107ff8466a
canvas: box should not try to reposition children for a zero-sized allocation
2021-09-10 13:01:26 -06:00
63a74d0911
Canvas: improve behavior of Widget::compute_bounding_box()
...
Firstly, ::compute_bounding_box() cannot allocate space, so do not try to do that here.
Secondly, if there is no allocation yet, use the CairoWidget's own size_request()
2021-09-10 12:59:29 -06:00
be461e95e1
canvas: remove debug output
2021-09-10 12:57:43 -06:00
300ca3124b
canvas; temporarily resurrect ConstraintPacker interactive tests
2021-09-10 12:15:24 -06:00
494bc8da14
canvas: add ::set_size_request_to_display_given_text() analogous to Gtkmm2ext utility
2021-09-10 12:15:24 -06:00
90322399fc
canvas: use fwd decl instead of header inclusion for CairoWidget
2021-09-10 12:15:24 -06:00
4bbfc60126
add 2 new canvas debug bits
2021-09-10 12:15:24 -06:00