mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-07-03 10:43:16 +00:00
76 lines
1.9 KiB
Plaintext
76 lines
1.9 KiB
Plaintext
![]() |
title: $:/core/ui/EditorToolbar/size-dropdown
|
||
|
|
||
|
\define lingo-base() $:/language/Buttons/Size/
|
||
|
\define toolbar-button-size-preset()
|
||
|
<$set name="width" filter="$(sizePair)$ +[first[]]">
|
||
|
|
||
|
<$set name="height" filter="$(sizePair)$ +[last[]]">
|
||
|
|
||
|
<$button tag="a">
|
||
|
|
||
|
<$action-setfield
|
||
|
$tiddler="""$(config-title)$/new-width"""
|
||
|
$value=<<width>>
|
||
|
/>
|
||
|
|
||
|
<$action-setfield
|
||
|
$tiddler="""$(config-title)$/new-height"""
|
||
|
$value=<<height>>
|
||
|
/>
|
||
|
|
||
|
<$action-deletetiddler
|
||
|
$tiddler="""$(config-title)$/presets-popup"""
|
||
|
/>
|
||
|
|
||
|
<$text text=<<width>>/> × <$text text=<<height>>/>
|
||
|
|
||
|
</$button>
|
||
|
|
||
|
</$set>
|
||
|
|
||
|
</$set>
|
||
|
\end
|
||
|
|
||
|
\define toolbar-button-size()
|
||
|
''{{$:/language/Buttons/Size/Hint}}''
|
||
|
|
||
|
<<lingo Caption/Width>> <$edit-text tag="input" tiddler="""$(config-title)$/new-width""" default=<<tv-bitmap-editor-width>> focus="true" size="8"/> <<lingo Caption/Height>> <$edit-text tag="input" tiddler="""$(config-title)$/new-height""" default=<<tv-bitmap-editor-height>> size="8"/> <$button popup="""$(config-title)$/presets-popup""" class="tc-btn-invisible tc-popup-keep" style="width: auto; display: inline-block; background-colour: inherit;" selectedClass="tc-selected">
|
||
|
{{$:/core/images/down-arrow}}
|
||
|
</$button>
|
||
|
|
||
|
<$reveal tag="span" state="""$(config-title)$/presets-popup""" type="popup" position="belowleft" animate="yes">
|
||
|
|
||
|
<div class="tc-drop-down tc-popup-keep">
|
||
|
|
||
|
<$list filter={{$:/config/BitmapEditor/ImageSizes}} variable="sizePair">
|
||
|
|
||
|
<<toolbar-button-size-preset>>
|
||
|
|
||
|
</$list>
|
||
|
|
||
|
</div>
|
||
|
|
||
|
</$reveal>
|
||
|
|
||
|
<$button>
|
||
|
<$action-sendmessage
|
||
|
$message="tm-edit-bitmap-operation"
|
||
|
$param="resize"
|
||
|
width={{$(config-title)$/new-width}}
|
||
|
height={{$(config-title)$/new-height}}
|
||
|
/>
|
||
|
<$action-deletetiddler
|
||
|
$tiddler="""$(config-title)$/new-width"""
|
||
|
/>
|
||
|
<$action-deletetiddler
|
||
|
$tiddler="""$(config-title)$/new-height"""
|
||
|
/>
|
||
|
<$action-deletetiddler
|
||
|
$tiddler=<<dropdown-state>>
|
||
|
/>
|
||
|
<<lingo Caption/Resize>>
|
||
|
</$button>
|
||
|
\end
|
||
|
|
||
|
<<toolbar-button-size>>
|