From 33f299e45f798f0dbdd7e43512faee9809b4b6c9 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Sat, 29 Feb 2020 00:24:22 +0100 Subject: [PATCH] Relative-Hook: observe CSS padding and margin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit and voilĂ : now the placeholder buttons appear nicely within the content area of each track --- src/stage/timeline/body-canvas-widget.cpp | 3 ++ src/stage/timeline/track-body.cpp | 4 +- src/stage/timeline/track-body.hpp | 1 + wiki/thinkPad.ichthyo.mm | 59 +++++++++++++++++------ 4 files changed, 50 insertions(+), 17 deletions(-) diff --git a/src/stage/timeline/body-canvas-widget.cpp b/src/stage/timeline/body-canvas-widget.cpp index 3d4edb177..c972772ef 100644 --- a/src/stage/timeline/body-canvas-widget.cpp +++ b/src/stage/timeline/body-canvas-widget.cpp @@ -117,6 +117,9 @@ namespace timeline { + styleBody->get_padding().get_top() + styleBody->get_padding().get_bottom() ; + TrackBody::decoration.trackPad = styleBody->get_margin().get_top() + + styleBody->get_padding().get_top() + ; TrackBody::decoration.topMar = styleBody->get_margin().get_top(); TrackBody::decoration.botMar = styleBody->get_margin().get_bottom(); diff --git a/src/stage/timeline/track-body.cpp b/src/stage/timeline/track-body.cpp index 1aff643c3..6b1d051d2 100644 --- a/src/stage/timeline/track-body.cpp +++ b/src/stage/timeline/track-body.cpp @@ -228,8 +228,8 @@ namespace timeline { // which thus needs to use adjusted coordinates for widgets. line = 0; } - // mark offset of the content area relative to this track's top - this->contentOffset_ = line; + // mark offset of the actual content area relative to this track's top + this->contentOffset_ = line + decoration.trackPad; // allocate space for the track content line += this->contentHeight_ + decoration.content; diff --git a/src/stage/timeline/track-body.hpp b/src/stage/timeline/track-body.hpp index 0c8a249af..e80a7c81b 100644 --- a/src/stage/timeline/track-body.hpp +++ b/src/stage/timeline/track-body.hpp @@ -73,6 +73,7 @@ namespace timeline { uint ruler = 0; uint topMar = 0; uint botMar = 0; + uint trackPad = 0; using Borders = std::array; Borders borders{0,0,0,0,0,0}; ///< width of up to 6 levels of combined upward slope borders (defined in CSS) diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index 0736e161a..af0fea1e3 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -16721,7 +16721,7 @@ - + @@ -20880,9 +20880,9 @@ - + - + @@ -21057,6 +21057,22 @@ + + + + + + + + +

+ wenn man die mark "test"-Nachricht an eine Timeline schickt, die vorher per Population "reingeschossen" wurde, ohne sie jemals im UI anzuzeigen. Das heißt, im Moment haben wir da definitiv eine offene Flanke -- allerdings ist das ganze Thema auch bisher ehr ein draft +

+ +
+ +
+
@@ -21067,7 +21083,8 @@
- + + @@ -21460,6 +21477,10 @@ + + + + @@ -21685,7 +21706,7 @@
- + @@ -21794,7 +21815,7 @@ - + @@ -23701,7 +23722,8 @@ - + + @@ -23723,8 +23745,8 @@ - - + + @@ -23740,6 +23762,13 @@ + + + + + + + @@ -25535,9 +25564,9 @@ - - - + + + @@ -26273,8 +26302,8 @@ - - + + @@ -33700,7 +33729,7 @@ - +