[TW5] Colour-picker macro inside a slider

86 views
Skip to first unread message

FrD

unread,
Aug 5, 2016, 3:14:12 PM8/5/16
to TiddlyWiki
Hi,

I'm trying to put a call to the colour-picker macro inside a slider.

The problem I encounter is that the second button (the one which closes the slider) is centered and not left-aligned, and I can't figure out why.

I'd like to have it on the left like the first button.

Any help appreciated.

Thanks

FrD


Here is the code you can put inside a tiddler at tiddlywiki.com :

<$reveal type="match" state=<<qualify "cal_">> text="close" default="close">
<$button set=<<qualify "cal_">> setTo="open" class="tc-btn-invisible">{{$:/core/images/right-arrow}}
</$button>
</$reveal>
<$reveal type="match" state=<<qualify "cal_">> text="open">
<$button set=<<qualify "cal_">> setTo="close" class="tc-btn-invisible">
{{$:/core/images/down-arrow}}


<$macrocall $name='colour-picker' actions="
<$action-setfield $tiddler='TestColourPicker' $index='background-color' $value=<<colour-picker-value>>/>
"/>
</$button>
</$reveal>

Eric Shulman

unread,
Aug 5, 2016, 5:02:09 PM8/5/16
to TiddlyWiki
On Friday, August 5, 2016 at 12:14:12 PM UTC-7, FrD wrote:
The problem I encounter is that the second button (the one which closes the slider) is centered and not left-aligned, and I can't figure out why.
Here is the code you can put inside a tiddler at tiddlywiki.com :
<$reveal type="match" state=<<qualify "cal_">> text="close" default="close">
<$button set=<<qualify "cal_">> setTo="open" class="tc-btn-invisible">{{$:/core/images/right-arrow}}
</$button>
</$reveal>
<$reveal type="match" state=<<qualify "cal_">> text="open">
<$button set=<<qualify "cal_">> setTo="close" class="tc-btn-invisible">
{{$:/core/images/down-arrow}}
<$macrocall $name='colour-picker' actions="
<$action-setfield $tiddler='TestColourPicker' $index='background-color' $value=<<colour-picker-value>>/>
"/>
</$button>
</$reveal>

You have the entire color picker inside the second button!  Move the </$button> before the <$macrocall> to fix it.

-e

FrD

unread,
Aug 6, 2016, 3:02:33 AM8/6/16
to TiddlyWiki
Hi Eric,

Thanks a lot. It was just in front of me and I could'nt see !

FrD
Reply all
Reply to author
Forward
0 new messages