From 34725afaa8f5cc022947c122feadcaac62eecb59 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Sat, 6 Feb 2021 15:30:59 +0100 Subject: [PATCH] Clip: try out some solution to enforce a fixed extension ..now this more or less works and indeed crops the button widget used here for a proof-of concept; however the label within that button emits a lot of layout warnings on each event handling and drawing routine, indicating that we violated its fundamental assumptions. Not sure how to proceed from here; also not sure if this actually becomes turns into a relevant issue in practice, since maybe in most cases we'll rather increase the size, and all we really have to do is handle the Clip's textual label properly. A clip smaller than some drop-down icon should probably not be rendered explicitly, just as overview --- src/stage/timeline/clip-widget.cpp | 16 +- .../session/dummy-session-connection.cpp | 2 +- wiki/thinkPad.ichthyo.mm | 319 +++++++++++++++--- 3 files changed, 285 insertions(+), 52 deletions(-) diff --git a/src/stage/timeline/clip-widget.cpp b/src/stage/timeline/clip-widget.cpp index 6c0cd42ba..8b314ce0d 100644 --- a/src/stage/timeline/clip-widget.cpp +++ b/src/stage/timeline/clip-widget.cpp @@ -339,7 +339,7 @@ namespace timeline { { int hSize = getCanvas().translateTimeToPixels (getLen()); set_size_request (hSize, -1); - queue_resize(); +// queue_resize(); } /** @todo preliminary / draft of a clip widget, just using a Gtk::Button. @@ -348,8 +348,18 @@ namespace timeline { Gtk::SizeRequestMode get_request_mode_vfunc() const override { - return Gtk::SizeRequestMode::SIZE_REQUEST_CONSTANT_SIZE; -// return Gtk::SizeRequestMode::SIZE_REQUEST_HEIGHT_FOR_WIDTH; + return Gtk::SizeRequestMode::SIZE_REQUEST_HEIGHT_FOR_WIDTH; + } + + /** + * the default implementation would ask the embedded child widgets; + * however we just force the given size confinement onto them + * @todo 1/21 this kindof works, but produces lots of layout warings + */ + void + get_preferred_width_vfunc(int& minimum_width, int& natural_width) const override + { + minimum_width = natural_width = getCanvas().translateTimeToPixels (getLen()); } diff --git a/src/steam/mobject/session/dummy-session-connection.cpp b/src/steam/mobject/session/dummy-session-connection.cpp index 265449b5b..ef222a503 100644 --- a/src/steam/mobject/session/dummy-session-connection.cpp +++ b/src/steam/mobject/session/dummy-session-connection.cpp @@ -182,7 +182,7 @@ namespace session { , emu (clip1) , mut (clip2) , ins (makeName(clip2)) - , ins (defineTiming(Time{FSecs{5}}, Duration{FSecs{1,2}})) + , ins (defineTiming(Time{FSecs{5}}, Duration{FSecs{2}})) , emu (clip2) , emu (forkRoot) , emu (timeline) diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index f06e8e659..38b03f299 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -91,7 +91,7 @@ - + @@ -402,7 +402,7 @@ - + @@ -930,7 +930,7 @@ - + @@ -1605,7 +1605,7 @@ - + @@ -1626,8 +1626,8 @@ - - + + @@ -4242,7 +4242,7 @@ - + @@ -6504,7 +6504,7 @@ - + @@ -6746,7 +6746,7 @@ - + @@ -6907,7 +6907,7 @@ - + @@ -7193,7 +7193,7 @@ - + @@ -12619,7 +12619,7 @@ - + @@ -16696,7 +16696,7 @@ - + @@ -16727,7 +16727,7 @@ - + @@ -16828,7 +16828,7 @@ - + @@ -17011,7 +17011,7 @@ - + @@ -17678,7 +17678,7 @@ - + @@ -17802,14 +17802,22 @@ - + + + + + + + + + @@ -18175,7 +18183,7 @@ - + @@ -21892,7 +21900,7 @@ - + @@ -23666,7 +23674,7 @@ - + @@ -25361,7 +25369,7 @@ - + @@ -25832,7 +25840,7 @@ - + @@ -28861,7 +28869,7 @@ - + @@ -29604,7 +29612,7 @@ - + @@ -29628,11 +29636,199 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ das ist eine Flag in der privaten Widget-Struktur. Keine Ahnung was das bedeutet.
Und übrigens: sichtbar muß das Widget auch noch sein... +

+ + +
+ +
+ + + + + + + + + + + + + + + +

+ also stellt eigentlich grade nicht die versprochene Logik bereit +

+ + +
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ danach noch die adjust_baseline_allocation +

+ + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ also entweder in horizontaler, oder in vertikaler Richtung +

+ + +
+ + + + +
+
+ + + +
+ + + + + + + + + @@ -29704,6 +29900,16 @@ + + + + + + + + + +
@@ -29719,6 +29925,19 @@ + + + + + + +

+ Das EventBoxWidget muß dazu natürlich erst einmal gebaut werden; dieses ist nämlich im Grunde genommen genau die Abstraktion eines abridged clip... +

+ +
+ +
@@ -29754,7 +29973,7 @@ - + @@ -30112,12 +30331,12 @@ - + - + @@ -30236,7 +30455,7 @@ - + @@ -30313,7 +30532,7 @@ - + @@ -30600,7 +30819,7 @@ - + @@ -31204,9 +31423,9 @@ - - - + + + @@ -31229,7 +31448,7 @@ - + @@ -31453,7 +31672,7 @@ - + @@ -31681,7 +31900,7 @@ - + @@ -31808,7 +32027,7 @@ - + @@ -34720,7 +34939,7 @@ - + @@ -35416,13 +35635,13 @@ - + - + @@ -35897,7 +36116,7 @@

- + @@ -36105,7 +36324,7 @@ - + @@ -36118,7 +36337,7 @@ - + @@ -37318,7 +37537,7 @@ - + @@ -39012,7 +39231,7 @@ - + @@ -47787,7 +48006,7 @@ - + @@ -51270,7 +51489,7 @@ - + @@ -53662,6 +53881,10 @@ + + + +