diff --git a/core/language/en-GB/ThemeTweaks.multids b/core/language/en-GB/ThemeTweaks.multids
index 651455cd8..f1e748307 100644
--- a/core/language/en-GB/ThemeTweaks.multids
+++ b/core/language/en-GB/ThemeTweaks.multids
@@ -28,6 +28,10 @@ Metrics/FontSize: Font size
Metrics/LineHeight: Line height
Metrics/BodyFontSize: Font size for tiddler body
Metrics/BodyLineHeight: Line height for tiddler body
+Metrics/PreviewSliderWidth: Preview slider width
+Metrics/PreviewSliderWidth/Hint: the width of the slider between editor and editor preview
+Metrics/SidebarPadding: Sidebar padding
+Metrics/SidebarPadding/Hint: the padding of the sidebar between sidebar and story river - determines the position of the sidebar resizer
Metrics/SidebarResizer/Hint: the values for `storyleft`, `storyright`, `storywidth`, `storyminwidth`, `sidebarwidth` and `sidebarminwidth` need to be ''absolute'' CSS units, ''percentages'' or ''em'' units in order for the sidebar resizer to work
Metrics/StoryLeft: Story left position
Metrics/StoryLeft/Hint: how far the left margin of the story river
(tiddler area) is from the left of the page
@@ -43,11 +47,11 @@ Metrics/StoryRight: Story right
Metrics/StoryRight/Hint: how far the left margin of the sidebar
is from the left of the page
Metrics/StoryWidth: Story width
Metrics/StoryWidth/Hint: the overall width of the story river
-Metrics/TiddlerWidth: Tiddler width
-Metrics/TiddlerWidth/Hint: within the story river
Metrics/SidebarBreakpoint: Sidebar breakpoint
Metrics/SidebarBreakpoint/Hint: the minimum page width at which the story
river and sidebar will appear side by side
Metrics/SidebarMinWidth: Minimum Sidebar width
Metrics/SidebarMinWidth/Hint: the minimum width of the sidebar
Metrics/SidebarWidth: Sidebar width
Metrics/SidebarWidth/Hint: the width of the sidebar in fluid-fixed layout
+Metrics/TiddlerWidth: Tiddler width
+Metrics/TiddlerWidth/Hint: within the story river
diff --git a/core/ui/EditTemplate/body/default.tid b/core/ui/EditTemplate/body/default.tid
index e0d6eee59..04c2f9d52 100644
--- a/core/ui/EditTemplate/body/default.tid
+++ b/core/ui/EditTemplate/body/default.tid
@@ -68,7 +68,7 @@ $:/config/EditorToolbarButtons/Visibility/$(currentTiddler)$
sliderCondition=<>
mode="inline"
padding="0px"
- sliderWidth="6px"
+ sliderWidth=<>
/>
diff --git a/core/wiki/macros/sidebar-resizer.tid b/core/wiki/macros/sidebar-resizer.tid
index fa2e75ee2..e60c9fede 100644
--- a/core/wiki/macros/sidebar-resizer.tid
+++ b/core/wiki/macros/sidebar-resizer.tid
@@ -108,8 +108,9 @@ title: $:/core/procedures/sidebar-resizer
\end
\function get.tiddler-width.result()
-[match[%]thencompare:number:ltthencompare:number:gteq[0]then]
-:else[match[%]thencompare:number:gtthen]
+[match[%]thencompare:number:ltthencompare:number:gteq[0]thenaddsuffix]
+:else[match[%]thencompare:number:ltthencompare:number:lt[0]thenaddsuffix]
+:else[match[%]thencompare:number:gtthenaddsuffix]
:else[!match[%]thencompare:number:ltthenaddsuffix]
:else[!match[%]thencompare:number:gteqthenaddsuffix]
:else[compare:number:lt[0]then[0]addsuffix]
@@ -117,50 +118,55 @@ title: $:/core/procedures/sidebar-resizer
\end
\function get.story-right.result()
-[compare:number:ltthenaddsuffix]
-:else[compare:number:gteqthenaddsuffix]
+[compare:number:ltthenaddsuffix]
+:else[compare:number:gteqthenaddsuffix]
:else[addsuffix]
\end
-\function get.story-sidebar.padding()
-[match[left]thensubtract]
-:else[subtract]
-\end
-
\procedure set-storywidth-storyright-actions()
<$let
storyRightStart={{{ [get[start-story-right]] }}}
storyWidthStart={{{ [get[start-story-width]] }}}
storyRightStart={{{ [convert.to.pixels.locally] }}}
storyWidthStart={{{ [convert.to.pixels.locally] }}}
- storyMinWidthValue={{{ [!is[blank]is[tiddler]get[text]] :else[!is[blank]is[missing]then] :else[] }}}
- storyMinWidth={{{ [convert.to.pixels.locally] }}}
- sidebarMinWidthValue={{{ [!is[blank]is[tiddler]get[text]] :else[!is[blank]is[missing]then] :else[] }}}
+ storyRiverWidth={{{ [add] }}}
storyPaddingLeftValue={{{ [!is[blank]is[tiddler]get[text]] :else[!is[blank]is[missing]then[0px]] :else[] }}}
storyPaddingLeft={{{ [convert.to.pixels.locally] }}}
storyPaddingRightValue={{{ [!is[blank]is[tiddler]get[text]] :else[!is[blank]is[missing]then[0px]] :else[] }}}
storyPaddingRight={{{ [convert.to.pixels.locally] }}}
- sidebarMinWidth={{{ [convert.to.pixels.locally] :map[] }}}
- storyLeftValue={{{ [!is[blank]get[text]] :else[] }}}
+ storyMinWidthValue={{{ [!is[blank]is[tiddler]get[text]] :else[!is[blank]is[missing]then] :else[] }}}
+ storyMinWidth={{{ [convert.to.pixels.locallyaddadd] }}}
+ sidebarMinWidthValue={{{ [!is[blank]is[tiddler]get[text]] :else[!is[blank]is[missing]then] :else[] }}}
+ sidebarPaddingValue={{{ [!is[blank]is[tiddler]get[text]] :else[!is[blank]is[missing]then] :else[] }}}
+ sidebarPadding={{{ [convert.to.pixels.locally] }}}
+ storyLeftValue={{{ [!is[blank]is[tiddler]get[text]] :else[!is[blank]is[missing]then] :else[] }}}
storyLeft={{{ [convert.to.pixels.locally] }}}
+ sidebarMinWidth={{{ [convert.to.pixels.locallysubtractsubtract] }}}
clampedDiff={{{ [addaddsubtractcompare:number:gt[0]] :else[[0]] }}}
storyWidthStart={{{ [subtract] }}}
storyRightStart={{{ [subtract] }}}
storyWidth={{{ [add] }}}
innerStoryWidth={{{ [subtractsubtract] }}}
innerStoryWidthStart={{{ [subtractsubtract] }}}
+ storyMinWidth={{{ [add] }}}
storyMinWidthAddLeft={{{ [add] }}}
storyRiverLimit={{{ [subtract] }}}
storyMaxWidth={{{ [subtract] }}}
+ innerStoryWidthMin={{{ [subtractsubtract] }}}
+ innerStoryWidthMax={{{ [subtractsubtract] }}}
tiddlerWidthMetric={{{ [get[tiddler-width-metric]] }}}
tiddlerWidthStart={{{ [get[start-tiddler-width]] }}}
tiddlerWidthStartPixels={{{ [match[%]thenmultiplydivide[100]] :else[convert.to.pixels.locally] }}}
tiddlerWidthClampedDiff={{{ [addaddaddaddsubtractcompare:number:gt[0]] :else[[0]] }}}
- tiddlerWidth={{{ [addsubtract] }}}
- tiddlerWidthDiff={{{ [subtract] }}}
- tiddlerMinWidth={{{ [match[%]then] :else[subtract] }}}
- tiddlerMaxWidth={{{ [match[%]then] :else[subtract] }}}
- storyRiverWidth={{{ [subtract] }}}>
+ tiddlerWidth={{{ [compare:number:lteqthencompare:number:gteqthenaddsubtract] :else[[]] }}}
+ tiddlerWidthDiff={{{ [subtract] }}}
+ tiddlerMinWidth={{{ [subtract] }}}
+ tiddlerMaxWidth={{{ [subtract] }}}
+ storyWidthStoryRightStartDiff={{{ [subtract] }}}
+ storyRiverWidth={{{ [compare:number:eqthen] :else[compare:number:gt[0]thenadd] :else[compare:number:lt[0]thensubtract] :else[] }}}
+ storyRiverWidth={{{ [subtract] }}}
+ storyRightLimit={{{ [compare:number:eq[0]thensubtract] :else[compare:number:gt[0]then] :else[compare:number:lt[0]then] :else[] }}}
+ storyMinRight={{{ [add] }}}>
<$let
storyWidthMetric={{{ [get[story-width-metric]] }}}
@@ -168,12 +174,18 @@ title: $:/core/procedures/sidebar-resizer
storyMinWidthConverted={{{ [function[convert.to.result],,] }}}
storyMaxWidthConverted={{{ [function[convert.to.result],,] }}}
tiddlerWidthConverted={{{ [match[%]thenmultiply[100]divide] :else[function[convert.to.result],,] }}}
- tiddlerMinWidthConverted={{{ [match[%]thenmultiply[100]divide] :else[function[convert.to.result],,] }}}
- tiddlerMaxWidthConverted={{{ [match[%]thenmultiply[100]divide] :else[function[convert.to.result],,] }}}
+ tiddlerMinWidthConverted={{{ [match[%]thenmultiply[100]divide] :else[function[convert.to.result],,] }}}
+ tiddlerMaxWidthConverted={{{ [match[%]thenmultiply[100]divide] :else[function[convert.to.result],,] }}}
storyWidthSetTiddler={{{ [!is[blank]] :else[] }}}
tiddlerWidthSetTiddler={{{ [!is[blank]] :else[] }}}>
- <$action-setfield $tiddler=<> text=<>/>
+ <%if [!is[blank]] %>
+ <$action-setfield $tiddler=<> text=<>/>
+ <%elseif [compare:number:gt] %>
+ <$action-setfield $tiddler=<> text={{{ [addsuffix] }}}/>
+ <%elseif [compare:number:lt] %>
+ <$action-setfield $tiddler=<