From b137309fc72505acf09bc827880052d8db20db13 Mon Sep 17 00:00:00 2001 From: BurningTreeC Date: Wed, 13 Nov 2024 15:50:58 +0100 Subject: [PATCH] don't let storyminwidth be negative --- core/wiki/macros/sidebar-resizer.tid | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/wiki/macros/sidebar-resizer.tid b/core/wiki/macros/sidebar-resizer.tid index 0c5d491f7..84af24797 100644 --- a/core/wiki/macros/sidebar-resizer.tid +++ b/core/wiki/macros/sidebar-resizer.tid @@ -204,7 +204,7 @@ title: $:/core/procedures/sidebar-resizer sidebarMinWidthWithoutOffset={{{ [subtract] }}} tiddlerWidthMetric={{{ [get[tiddler-width-metric]] }}} tiddlerWidthStart={{{ [get[start-tiddler-width]] }}} - storyMinWidth={{{ [addadd] }}} + storyMinWidth={{{ [addaddcompare:number:gteq[0]] :else[[0]] }}} storyWidthOverlap={{{ [addsubtract] }}} storyRightOverlap={{{ [subtractsubtract] }}} @@ -270,7 +270,7 @@ title: $:/core/procedures/sidebar-resizer storyLeftValue={{{ [!is[blank]is[tiddler]get[text]] :else[!is[blank]is[missing]then] :else[] }}} storyLeft={{{ [convert.to.pixels.locally] }}} storyMinWidthValue={{{ [!is[blank]is[tiddler]get[text]] :else[!is[blank]is[missing]then] :else[] }}} - storyMinWidth={{{ [convert.to.pixels.locally] }}} + storyMinWidth={{{ [convert.to.pixels.locallycompare:number:gteq[0]] :else[[0]] }}} storySidebarOffset={{{ [convert.to.pixels.locally] :else[[0]] }}} storyPaddingLeftExcess={{{ [subtract] }}} storyPaddingRightExcess={{{ [subtract] }}} @@ -302,7 +302,7 @@ title: $:/core/procedures/sidebar-resizer \procedure set-centralised-actions() <$let storyMinWidthValue={{{ [!is[blank]get[text]] :else[{$:/themes/tiddlywiki/centralised/metrics/storyminwidth}] }}} - storyMinWidth={{{ [convert.to.pixels.locally] }}} + storyMinWidth={{{ [convert.to.pixels.locallycompare:number:gteq[0]] :else[[0]] }}} storyWidthStart={{{ [get[start-story-width]] }}} storyWidthStart={{{ [convert.to.pixels.locally] }}} sidebarMinWidthValue={{{ [!is[blank]is[tiddler]get[text]] :else[!is[blank]is[missing]then] :else[{$:/themes/tiddlywiki/centralised/metrics/sidebarminwidth}] }}}