mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-10 09:20:26 +00:00
make minwidths configurable
This commit is contained in:
parent
669fd60ec5
commit
bb673fc807
@ -128,9 +128,9 @@ title: $:/core/procedures/sidebar-resizer
|
||||
storyWidthStart={{{ [<get.resizer.state>get[start-story-width]] }}}
|
||||
storyRightStart={{{ [convert.to.pixels.locally<storyRightStart>] }}}
|
||||
storyWidthStart={{{ [convert.to.pixels.locally<storyWidthStart>] }}}
|
||||
storyMinWidthValue={{{ [<storyMinWidthTiddler>!is[blank]!is[missing]get[text]] :else[<storyMinWidthTiddler>!is[blank]is[missing]then[10px]] :else[<get.theme.metric storyminwidth>] }}}
|
||||
storyMinWidthValue={{{ [<storyMinWidthTiddler>!is[blank]!is[missing]get[text]] :else[<storyMinWidthTiddler>!is[blank]is[missing]then<get.left.minwidth>] :else[<get.theme.metric storyminwidth>] }}}
|
||||
storyMinWidth={{{ [convert.to.pixels.locally<storyMinWidthValue>] }}}
|
||||
sidebarMinWidthValue={{{ [<sidebarMinWidthTiddler>!is[blank]!is[missing]get[text]] :else[<sidebarMinWidthTiddler>!is[blank]is[missing]then[10px]] :else[<get.theme.metric sidebarminwidth>] }}}
|
||||
sidebarMinWidthValue={{{ [<sidebarMinWidthTiddler>!is[blank]!is[missing]get[text]] :else[<sidebarMinWidthTiddler>!is[blank]is[missing]then<get.right.minwidth>] :else[<get.theme.metric sidebarminwidth>] }}}
|
||||
sidebarMinWidth={{{ [convert.to.pixels.locally<sidebarMinWidthValue>] }}}
|
||||
storyPaddingLeftValue={{{ [<storyPaddingLeftTiddler>!is[blank]!is[missing]get[text]] :else[<storyPaddingLeftTiddler>!is[blank]is[missing]then[0px]] :else[get.theme.metric[storypaddingleft]] }}}
|
||||
storyPaddingLeft={{{ [convert.to.pixels.locally<storyPaddingLeftValue>] }}}
|
||||
@ -195,12 +195,12 @@ title: $:/core/procedures/sidebar-resizer
|
||||
|
||||
\procedure set-sidebarwidth-actions()
|
||||
<$let
|
||||
sidebarMinWidthValue={{{ [<sidebarMinWidthTiddler>!is[blank]!is[missing]get[text]] :else[<sidebarMinWidthTiddler>!is[blank]is[missing]then[10px]] :else[<get.theme.metric sidebarminwidth>] }}}
|
||||
sidebarMinWidthValue={{{ [<sidebarMinWidthTiddler>!is[blank]!is[missing]get[text]] :else[<sidebarMinWidthTiddler>!is[blank]is[missing]then<get.right.minwidth>] :else[<get.theme.metric sidebarminwidth>] }}}
|
||||
sidebarWidthMetric={{{ [<get.resizer.state>get[sidebar-width-metric]] }}}
|
||||
sidebarMinWidth={{{ [convert.to.pixels.locally<sidebarMinWidthValue>] }}}
|
||||
storyLeftValue={{{ [<storyLeftTiddler>!is[blank]get[text]] :else[<get.theme.metric storyleft>] }}}
|
||||
storyLeft={{{ [convert.to.pixels.locally<storyLeftValue>] }}}
|
||||
storyMinWidthValue={{{ [<storyMinWidthTiddler>!is[blank]!is[missing]get[text]] :else[<storyMinWidthTiddler>!is[blank]is[missing]then[10px]] :else[<get.theme.metric storyminwidth>] }}}
|
||||
storyMinWidthValue={{{ [<storyMinWidthTiddler>!is[blank]!is[missing]get[text]] :else[<storyMinWidthTiddler>!is[blank]is[missing]then<get.left.minwidth>] :else[<get.theme.metric storyminwidth>] }}}
|
||||
storyMinWidth={{{ [convert.to.pixels.locally<storyMinWidthValue>] }}}
|
||||
sidebarMaxWidth={{{ [<widgetNodeWidth>subtract<storyLeft>subtract<storyMinWidth>] }}}
|
||||
clampedDiff={{{ [<storyLeft>add<storyMinWidth>add<startSidebarWidth>subtract<widgetNodeWidth>compare:number:gt[0]] ~0 }}}
|
||||
@ -230,7 +230,7 @@ title: $:/core/procedures/sidebar-resizer
|
||||
storyMinWidth={{{ [convert.to.pixels.locally<storyMinWidthValue>] }}}
|
||||
storyWidthStart={{{ [<get.resizer.state>get[start-story-width]] }}}
|
||||
storyWidthStart={{{ [convert.to.pixels.locally<storyWidthStart>] }}}
|
||||
sidebarMinWidthValue={{{ [<sidebarMinWidthTiddler>!is[blank]!is[missing]get[text]] :else[<sidebarMinWidthTiddler>!is[blank]is[missing]then[10px]] :else[{$:/themes/tiddlywiki/centralised/metrics/sidebarminwidth}] }}}
|
||||
sidebarMinWidthValue={{{ [<sidebarMinWidthTiddler>!is[blank]!is[missing]get[text]] :else[<sidebarMinWidthTiddler>!is[blank]is[missing]then<get.right.minwidth>] :else[{$:/themes/tiddlywiki/centralised/metrics/sidebarminwidth}] }}}
|
||||
sidebarMinWidth={{{ [convert.to.pixels.locally<sidebarMinWidthValue>] }}}
|
||||
storyMaxWidth={{{ [<widgetNodeWidth>subtract<sidebarMinWidth>subtract<sidebarMinWidth>] }}}
|
||||
dragDiffMultiplied={{{ [<dragDiff>multiply[2]] }}}
|
||||
|
@ -2,7 +2,7 @@ title: $:/core/procedures/sliders
|
||||
tags: $:/tags/Global
|
||||
code-body: yes
|
||||
|
||||
\procedure one-cell-slider(width:"100%",minHeight:"10px",template:"",mode:"block",sliderWidth:"12px",padding:"12px",sliderCondition:"yes")
|
||||
\procedure one-cell-slider(width:"100%",minHeight:"10px",template:"",mode:"block",sliderWidth:"12px",padding:"12px",sliderCondition:"yes",leftMinWidth:"100px",rightMinWidth:"100px")
|
||||
\import $:/core/procedures/sidebar-resizer
|
||||
\function get.resizer.style.position() absolute
|
||||
\function get.template-right.width() [<sidebarWidthTiddler>get[text]] :else[[50%]]
|
||||
@ -10,6 +10,8 @@ code-body: yes
|
||||
\function get.resizer.style.width() [<sliderWidth>]
|
||||
\function set.throttling() no
|
||||
\function get.template.left()
|
||||
\function get.left.minwidth() [<leftMinWidth>]
|
||||
\function get.right.minwidth() [<rightMinWidth>]
|
||||
\whitespace trim
|
||||
|
||||
<div
|
||||
@ -52,13 +54,15 @@ code-body: yes
|
||||
</div>
|
||||
\end
|
||||
|
||||
\procedure two-cell-slider(width:"100%",minHeight:"10px",templateLeft:"",templateRight:"",mode:"block",sliderWidth:"12px",padding:"12px",sliderCondition:"yes")
|
||||
\procedure two-cell-slider(width:"100%",minHeight:"10px",templateLeft:"",templateRight:"",mode:"block",sliderWidth:"12px",padding:"12px",sliderCondition:"yes",leftMinWidth:"100px",rightMinWidth:"100px")
|
||||
\import $:/core/procedures/sidebar-resizer
|
||||
\function get.resizer.style.position() absolute
|
||||
\function get.template-right.width() [<sidebarWidthTiddler>get[text]] :else[[50%]]
|
||||
\function get.resizer.style.left() [[calc(100% - ]addsuffix<get.template-right.width>addsuffix[)]]
|
||||
\function get.resizer.style.width() [<sliderWidth>]
|
||||
\function set.throttling() no
|
||||
\function get.left.minwidth() [<leftMinWidth>]
|
||||
\function get.right.minwidth() [<rightMinWidth>]
|
||||
\whitespace trim
|
||||
|
||||
<div
|
||||
|
Loading…
Reference in New Issue
Block a user