@Jan ,

Yes you can use the viewport-thing for that, it's now bundled in the 
dynaview plugin from the prerelease page,
I recommend using that. Just enable saving the viewport dimensions in the 
plugin's settings tab,
then you'll have two tiddlers $:/state/dynaview/viewportdimension/width and 
$:/state/dynaview/viewportdimensions/height whose values update dynamically 
every time the viewport size changes

Then you can make your Buttons like that:

\define compareViewportLow()
<$list 
filter="[{$:/state/DynaView/ViewportDimensions/Width}regexp[^$(lowValue)$$]]">
<$button><$actions when viewport low/><$actions more actions/></$button>
</$list>
\end
\define compareViewportHigh()
<$list 
filter="[{$:/state/DynaView/ViewportDimensions/Width}regexp[^$(highValue)$$]]">
<$button><$actions when viewport high/></$button>
</$list>
\end
<$list filter="[list[$:/numbers/viewport-low]]" variable="lowValue">
<<compareViewportLow>>
</$list>
<$list filter="[list[$:/numbers/viewport-high]]" variable="highValue">
<<compareViewportHigh>>
</$list>

I'm using two tiddlers here that store values from 1 to the breakpoint for 
"viewport low" in the list field of $:/numbers/viewport-low and values from 
the breakpoint for "viewport low + 1" to a high value in the list field of 
$:/numbers/viewport-high

You can get a tiddler with all numbers from 1 to 9999 here: 
http://tiddlytouch.tiddlyspot.com/#%24%3A%2Fplugins%2FBTC%2Ftiddly-touch%2Flists%2Fnumbers

Then you can split the list field at the value you choose for your 
breakpoint and make two tiddlers from it


That's one idea,
The other one is using Riz's version of the reveal widget, which can 
compare values with lt (less than) gt (greater than) and gteq and lteq 
(greater/equal, less/equal)
It could also make it to the next tiddlywiki release, but at the moment 
it's not at the prerelease page as far as I know 

You can find it here: 
https://ibnishak.github.io/Tesseract/pluginsandmacros/index.html#Reveal-Extended%3A%20Adding%20%3C%2C%3E%2C%3C%3D%2C%3E%3D%20types%20to%20reveal%20widget

Using this is easier than my version above - you won't need the two 
number-tiddlers!


Simon

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/dac33f9b-b8f8-4e9b-9e32-2ccedc1258a2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to