From fb47dfd5fe5df0fdbe54d0a157b400223d52bd3e Mon Sep 17 00:00:00 2001 From: BurningTreeC Date: Sun, 6 Oct 2024 11:40:09 +0200 Subject: [PATCH] different behavior for ctrl-dragging --- core/wiki/macros/sidebar-resizer.tid | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/wiki/macros/sidebar-resizer.tid b/core/wiki/macros/sidebar-resizer.tid index d54a55aa9..bcf604480 100644 --- a/core/wiki/macros/sidebar-resizer.tid +++ b/core/wiki/macros/sidebar-resizer.tid @@ -53,8 +53,12 @@ title: $:/core/macros/sidebar-resizer \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={{{ [!match[ctrl]function[convert.to.result],,] ~[0] }}} storyWidthConverted={{{ [function[convert.to.result],,] }}}> - <$action-setfield $tiddler="$:/themes/tiddlywiki/vanilla/metrics/storyright" text={{{ [subtractcompare:number:ltthenaddsuffix] [compare:number:gteqthenaddsuffix] ~[addsuffix] }}}/> + <$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 %> \end