JD,
That is a nice idea, But I think it complements the other approaches
- Change color on the fly (your suggestion)
- Helps reduce size of code
- Embed the actual SVG in your code with a fill=color
- Reduces number of tiddlers and helps perhaps make a single tiddler
solution
- Allows other variations
- Clone an existing and set the fill=color and other settings
- Allows whole tiddler to be replaced with another icon without
touching the code.
Regards
TW Tones
On Monday, August 3, 2020 at 11:57:00 AM UTC+10, JD wrote:
>
> Cool! But it should be a core feature to be able to go back to the
> previously selected state of the sidebar on save or cancel, atleast!
>
> Just add this action before the hide-action on the edit button:
>
> <$action-setfield $tiddler="$:/state/sidebar/save" text={{{
> [[$:/state/sidebar]is[tiddler]!text[]then{$:/state/sidebar!!text}else[yes]]
> }}}/>
>
> Then on your cancel and save buttons, instead of always showing it, get
> the value of the previous state/save:
>
> <$action-setfield $tiddler="$:/state/sidebar"
> text={{$:/state/sidebar/save}}/>
>
> Also, forgive me i'm just wondering, why the new svg's? Wouldn't it make
> for a smaller plugin to just add a single css tiddler targetting your
> buttons, then on your buttons add a class that's unique you?
>
> Sample, add a stylesheet to your plugin with text:
>
> .am-green svg { fill: green !important; }
>
> And to your edit button, for example, return the core edit button image
> and just replace the class:
>
> \whitespace trim
> <$button
> message="tm-edit-tiddler"
> tooltip={{$:/language/Buttons/Edit/Hint}}
> aria-label="Am Edit"
> class={{{ [<tv-config-toolbar-class>addsuffix[ am-green]] }}}
> >
> <$list filter="[<tv-config-toolbar-icons>match[yes]]">
> {{$:/core/images/edit-button}}
> </$list>
> <$list filter="[<tv-config-toolbar-text>match[yes]]">
> <span class="tc-btn-text">
> <$text text=" "/>
> <$text text="am edit"}/>
> </span>
> </$list>
> <$action-setfield $tiddler="$:/state/sidebar/save" text={{{
> [[$:/state/sidebar]is[tiddler]!text[]then{$:/state/sidebar!!text}else[yes]]
> }}}/>
> <$action-setfield $tiddler="$:/state/sidebar" text="no"/>
> </$button>
>
> So there would be no need for identical images with just the color
> difference?
>
> Just a thought of course ^^,
>
> -jd
>
>
> On Mon, Aug 3, 2020, 06:57 amreus, <[email protected] <javascript:>>
> wrote:
>
>> JD, Thanks again for your insight.
>>
>> You can see the prototype here: http://amreus.tiddlyspot.com
>>
>>
>> -477d-b42e-adf1e6d75124o%40googlegroups.com
>>> <https://groups.google.com/d/msgid/tiddlywiki/8cac3f0d-b56b-477d-b42e-adf1e6d75124o%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "TiddlyWiki" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/tiddlywiki/OzlHFYjLPhk/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> [email protected] <javascript:>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/tiddlywiki/196c22a3-5645-46d7-8507-c3216eb100f3o%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/tiddlywiki/196c22a3-5645-46d7-8507-c3216eb100f3o%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/f9ff984e-169a-4750-9df2-0e0b0a789a34o%40googlegroups.com.