From 7fc223993dae536816464d177d14f223bbdb6db9 Mon Sep 17 00:00:00 2001 From: BurningTreeC Date: Thu, 10 Oct 2024 05:55:43 +0200 Subject: [PATCH] get metrics by currently selected theme --- core/wiki/macros/sidebar-resizer.tid | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/core/wiki/macros/sidebar-resizer.tid b/core/wiki/macros/sidebar-resizer.tid index d761cfcfb..e48dfa04b 100644 --- a/core/wiki/macros/sidebar-resizer.tid +++ b/core/wiki/macros/sidebar-resizer.tid @@ -71,13 +71,13 @@ title: $:/core/macros/sidebar-resizer <$let storyRightStart={{{ [convert.to.pixels{$:/state/sidebar/resizing!!start-story-right}] }}} storyWidthStart={{{ [convert.to.pixels{$:/state/sidebar/resizing!!start-story-width}] }}} - storyMinWidth={{{ [convert.to.pixels{$:/themes/tiddlywiki/vanilla/metrics/storyminwidth}] }}} - sidebarMinWidth={{{ [convert.to.pixels{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}] }}} + storyMinWidth={{{ [convert.to.pixels] }}} + sidebarMinWidth={{{ [convert.to.pixels] }}} storyPaddingLeft={{{ [get.theme.metric[metrics/storypaddingleft]] }}} storyPaddingLeft={{{ [convert.to.pixels] }}} storyPaddingRight={{{ [get.theme.metric[metrics/storypaddingright]] }}} storyPaddingRight={{{ [convert.to.pixels] }}} - storyLeft={{{ [convert.to.pixels{$:/themes/tiddlywiki/vanilla/metrics/storyleft}] }}} + storyLeft={{{ [convert.to.pixels] }}} clampedDiff={{{ [addaddsubtractcompare:number:gt[0]] ~0 }}} storyWidthStart={{{ [subtract] }}} storyRightStart={{{ [subtract] }}} @@ -108,7 +108,7 @@ title: $:/core/macros/sidebar-resizer storyWidthResult={{{ [compare:number:ltthenaddsuffix] ~[compare:number:gteqthenaddsuffix] ~[addsuffix] }}} - tiddlerWidthResult={{{ [match[%]thencompare:number:ltthen{$:/themes/tiddlywiki/vanilla/metrics/tiddlerwidth}compare:number:gteq[0]then{$:/themes/tiddlywiki/vanilla/metrics/tiddlerwidth}] ~[match[%]thencompare:number:gtthen{$:/themes/tiddlywiki/vanilla/metrics/tiddlerwidth}] ~[!match[%]thencompare:number:ltthenaddsuffix] ~[!match[%]thencompare:number:gteqthenaddsuffix] ~[compare:number:lt[0]then[0]addsuffix] ~[addsuffix] }}}> + tiddlerWidthResult={{{ [match[%]thencompare:number:ltthencompare:number:gteq[0]then] ~[match[%]thencompare:number:gtthen] ~[!match[%]thencompare:number:ltthenaddsuffix] ~[!match[%]thencompare:number:gteqthenaddsuffix] ~[compare:number:lt[0]then[0]addsuffix] ~[addsuffix] }}}> <$action-setfield $tiddler="$:/themes/tiddlywiki/vanilla/metrics/tiddlerwidth" text=<>/> <$action-setfield $tiddler="$:/themes/tiddlywiki/vanilla/metrics/storywidth" text=<>/> @@ -133,9 +133,9 @@ title: $:/core/macros/sidebar-resizer \procedure set-sidebarwidth-actions() <$let sidebarWidthMetric={{$:/state/sidebar/resizing!!sidebar-width-metric}} - sidebarMinWidth={{{ [convert.to.pixels{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}] }}} - storyLeft={{{ [convert.to.pixels{$:/themes/tiddlywiki/vanilla/metrics/storyleft}] }}} - storyMinWidth={{{ [convert.to.pixels{$:/themes/tiddlywiki/vanilla/metrics/storyminwidth}] }}} + sidebarMinWidth={{{ [convert.to.pixels] }}} + storyLeft={{{ [convert.to.pixels] }}} + storyMinWidth={{{ [convert.to.pixels] }}} sidebarMaxWidth={{{ [subtractsubtract] }}} clampedDiff={{{ [addaddsubtractcompare:number:gt[0]] ~0 }}} sidebarWidth={{{ [subtract] }}}>