From 5d2213918779bee9ea6a8232a1c8be237c7be0a7 Mon Sep 17 00:00:00 2001 From: BurningTreeC Date: Sun, 6 Oct 2024 13:31:32 +0200 Subject: [PATCH] make ctrl in fixed-fluid mode work like I intended --- core/wiki/macros/sidebar-resizer.tid | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/core/wiki/macros/sidebar-resizer.tid b/core/wiki/macros/sidebar-resizer.tid index 66a1472ff..34944ae6b 100644 --- a/core/wiki/macros/sidebar-resizer.tid +++ b/core/wiki/macros/sidebar-resizer.tid @@ -51,14 +51,12 @@ title: $:/core/macros/sidebar-resizer <$action-deletetiddler $tiddler="$:/state/sidebar/resizing"/> \end +\function convert.storydiff.to.result() [function[convert.to.result],,] + \procedure set-storyright-actions() -<$let storyLeftStart={{{ [convert.to.pixels{$:/state/sidebar/resizing!!start-story-left}] }}} storyRightStart={{{ [convert.to.pixels{$:/state/sidebar/resizing!!start-story-right}] }}} storyWidthConverted={{{ [convert.to.pixels{$:/themes/tiddlywiki/vanilla/metrics/storywidth}] }}} sidebarMinWidthConverted={{{ [convert.to.pixels{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}] }}} storyRiverLimit={{{ [subtract] }}} storyDiff={{{ [addsubtractmultiply[-1]] }}}> - <$let storyRightMetric={{$:/state/sidebar/resizing!!story-right-metric}} storyRiverWidthConverted={{{ [function[convert.to.result],,] }}} storyRiverLimitConverted={{{ [function[convert.to.result],,] }}} storyDiffConverted={{{ [function[convert.to.result],,] ~[0] }}} storyWidthConverted={{{ [function[convert.to.result],,] }}}> - <%if [match[ctrl]] %> - <$action-setfield $tiddler="$:/themes/tiddlywiki/vanilla/metrics/storyright" text={{{ [subtractcompare:number:ltthenaddsuffix] [compare:number:gteqthenaddsuffix] ~[addsuffix] }}}/> - <% else %> - <$action-setfield $tiddler="$:/themes/tiddlywiki/vanilla/metrics/storyright" text={{{ [compare:number:ltthenaddsuffix] [compare:number:gteqthenaddsuffix] ~[addsuffix] }}}/> - <% endif %> +<$let storyLeftStart={{{ [convert.to.pixels{$:/state/sidebar/resizing!!start-story-left}] }}} storyRightStart={{{ [convert.to.pixels{$:/state/sidebar/resizing!!start-story-right}] }}} storyWidth={{{ [convert.to.pixels{$:/themes/tiddlywiki/vanilla/metrics/storywidth}] }}} sidebarMinWidthConverted={{{ [convert.to.pixels{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}] }}} storyRiverLimit={{{ [subtract] }}} storyDiff={{{ [addsubtractmultiply[-1]] }}}> + <$let storyRightMetric={{$:/state/sidebar/resizing!!story-right-metric}} storyRiverWidthConverted={{{ [function[convert.to.result],,] }}} storyRiverLimitConverted={{{ [function[convert.to.result],,] }}} storyDiffConverted={{{ [!match[ctrl]then] ~0 }}} storyWidthConverted={{{ [function[convert.to.result],,] }}}> + <$action-setfield $tiddler="$:/themes/tiddlywiki/vanilla/metrics/storyright" text={{{ [subtractcompare:number:ltthenaddaddsuffix] ~[compare:number:gteqthenaddsuffix] ~[addsuffix] }}}/> \end