From 0671e59fed301591d0ab6d79f34dfb3267b008c2 Mon Sep 17 00:00:00 2001 From: Simon Baird Date: Sun, 12 Oct 2014 00:26:51 +1000 Subject: [PATCH] Add span wrapper around button caption text Reasons: - can show or hide the button text with CSS (assuming tv-config-toolbar-text is yes). - can have different looking buttons in the page controls versus the view toolbar, etc - more flexibility styling the button appearance, for example you can change the text size compared to the icon size - button appearance is more themeable --- core/ui/EditToolbar/cancel.tid | 2 +- core/ui/EditToolbar/delete.tid | 2 +- core/ui/EditToolbar/save.tid | 2 +- core/ui/PageControls/closeall.tid | 2 +- core/ui/PageControls/controlpanel.tid | 2 +- core/ui/PageControls/encryption.tid | 4 ++-- core/ui/PageControls/full-screen.tid | 2 +- core/ui/PageControls/home.tid | 2 +- core/ui/PageControls/import.tid | 2 +- core/ui/PageControls/language.tid | 2 +- core/ui/PageControls/more-page-actions.tid | 2 +- core/ui/PageControls/new-journal.tid | 2 +- core/ui/PageControls/newtiddler.tid | 2 +- core/ui/PageControls/refresh.tid | 2 +- core/ui/PageControls/savewiki.tid | 2 +- core/ui/PageControls/storyview.tid | 2 +- core/ui/PageControls/tag-button.tid | 2 +- core/ui/PageControls/theme.tid | 2 +- core/ui/ViewToolbar/clone.tid | 2 +- core/ui/ViewToolbar/close-others.tid | 2 +- core/ui/ViewToolbar/close.tid | 2 +- core/ui/ViewToolbar/edit.tid | 2 +- core/ui/ViewToolbar/info.tid | 2 +- core/ui/ViewToolbar/more-tiddler-actions.tid | 2 +- core/ui/ViewToolbar/new-here.tid | 2 +- core/ui/ViewToolbar/new-journal-here.tid | 2 +- core/ui/ViewToolbar/permalink.tid | 2 +- core/ui/ViewToolbar/permaview.tid | 2 +- themes/tiddlywiki/vanilla/base.tid | 5 +++++ 29 files changed, 34 insertions(+), 29 deletions(-) diff --git a/core/ui/EditToolbar/cancel.tid b/core/ui/EditToolbar/cancel.tid index 03a533f53..f5e01e3c8 100644 --- a/core/ui/EditToolbar/cancel.tid +++ b/core/ui/EditToolbar/cancel.tid @@ -8,6 +8,6 @@ description: {{$:/language/Buttons/Cancel/Hint}} {{$:/core/images/cancel-button}} <$list filter="[prefix[yes]]"> -<$text text={{$:/language/Buttons/Cancel/Caption}}/> +<$text text={{$:/language/Buttons/Cancel/Caption}}/> diff --git a/core/ui/EditToolbar/delete.tid b/core/ui/EditToolbar/delete.tid index bab951295..add232c63 100644 --- a/core/ui/EditToolbar/delete.tid +++ b/core/ui/EditToolbar/delete.tid @@ -8,6 +8,6 @@ description: {{$:/language/Buttons/Delete/Hint}} {{$:/core/images/delete-button}} <$list filter="[prefix[yes]]"> -<$text text={{$:/language/Buttons/Delete/Caption}}/> +<$text text={{$:/language/Buttons/Delete/Caption}}/> \ No newline at end of file diff --git a/core/ui/EditToolbar/save.tid b/core/ui/EditToolbar/save.tid index 1d642c08a..e5282c528 100644 --- a/core/ui/EditToolbar/save.tid +++ b/core/ui/EditToolbar/save.tid @@ -8,6 +8,6 @@ description: {{$:/language/Buttons/Save/Hint}} {{$:/core/images/done-button}} <$list filter="[prefix[yes]]"> -<$text text={{$:/language/Buttons/Save/Caption}}/> +<$text text={{$:/language/Buttons/Save/Caption}}/> \ No newline at end of file diff --git a/core/ui/PageControls/closeall.tid b/core/ui/PageControls/closeall.tid index 95bdcb3a6..a34eff5df 100644 --- a/core/ui/PageControls/closeall.tid +++ b/core/ui/PageControls/closeall.tid @@ -8,6 +8,6 @@ description: {{$:/language/Buttons/CloseAll/Hint}} {{$:/core/images/close-all-button}} <$list filter="[prefix[yes]]"> -<$text text={{$:/language/Buttons/CloseAll/Caption}}/> +<$text text={{$:/language/Buttons/CloseAll/Caption}}/> diff --git a/core/ui/PageControls/controlpanel.tid b/core/ui/PageControls/controlpanel.tid index 2d4f7d27c..8157c42cc 100644 --- a/core/ui/PageControls/controlpanel.tid +++ b/core/ui/PageControls/controlpanel.tid @@ -8,6 +8,6 @@ description: {{$:/language/Buttons/ControlPanel/Hint}} {{$:/core/images/options-button}} <$list filter="[prefix[yes]]"> -<$text text={{$:/language/Buttons/ControlPanel/Caption}}/> +<$text text={{$:/language/Buttons/ControlPanel/Caption}}/> diff --git a/core/ui/PageControls/encryption.tid b/core/ui/PageControls/encryption.tid index dffc4efa7..cc06c82cd 100644 --- a/core/ui/PageControls/encryption.tid +++ b/core/ui/PageControls/encryption.tid @@ -9,7 +9,7 @@ description: {{$:/language/Buttons/Encryption/Hint}} {{$:/core/images/locked-padlock}} <$list filter="[prefix[yes]]"> -<$text text={{$:/language/Buttons/Encryption/ClearPassword/Caption}}/> +<$text text={{$:/language/Buttons/Encryption/ClearPassword/Caption}}/> @@ -19,7 +19,7 @@ description: {{$:/language/Buttons/Encryption/Hint}} {{$:/core/images/unlocked-padlock}} <$list filter="[prefix[yes]]"> -<$text text={{$:/language/Buttons/Encryption/SetPassword/Caption}}/> +<$text text={{$:/language/Buttons/Encryption/SetPassword/Caption}}/> diff --git a/core/ui/PageControls/full-screen.tid b/core/ui/PageControls/full-screen.tid index 1fb6edf59..d2ca1cbd3 100644 --- a/core/ui/PageControls/full-screen.tid +++ b/core/ui/PageControls/full-screen.tid @@ -8,6 +8,6 @@ description: {{$:/language/Buttons/FullScreen/Hint}} {{$:/core/images/full-screen-button}} <$list filter="[prefix[yes]]"> -<$text text={{$:/language/Buttons/FullScreen/Caption}}/> +<$text text={{$:/language/Buttons/FullScreen/Caption}}/> diff --git a/core/ui/PageControls/home.tid b/core/ui/PageControls/home.tid index 7b48f2a21..8a06f6055 100644 --- a/core/ui/PageControls/home.tid +++ b/core/ui/PageControls/home.tid @@ -8,6 +8,6 @@ description: {{$:/language/Buttons/Home/Hint}} {{$:/core/images/home-button}} <$list filter="[prefix[yes]]"> -<$text text={{$:/language/Buttons/Home/Caption}}/> +<$text text={{$:/language/Buttons/Home/Caption}}/> diff --git a/core/ui/PageControls/import.tid b/core/ui/PageControls/import.tid index f7b6350bc..654a77ccd 100644 --- a/core/ui/PageControls/import.tid +++ b/core/ui/PageControls/import.tid @@ -9,7 +9,7 @@ description: {{$:/language/Buttons/Import/Hint}} {{$:/core/images/import-button}} <$list filter="[prefix[yes]]"> -<$text text={{$:/language/Buttons/Import/Caption}}/> +<$text text={{$:/language/Buttons/Import/Caption}}/> <$browse/> diff --git a/core/ui/PageControls/language.tid b/core/ui/PageControls/language.tid index 1d07da32c..8abc7b126 100644 --- a/core/ui/PageControls/language.tid +++ b/core/ui/PageControls/language.tid @@ -15,7 +15,7 @@ $(languagePluginTitle)$/icon <$list filter="[prefix[yes]]"> -<$text text={{$:/language/Buttons/Language/Caption}}/> +<$text text={{$:/language/Buttons/Language/Caption}}/> <$reveal state=<> type="popup" position="below" animate="yes"> diff --git a/core/ui/PageControls/more-page-actions.tid b/core/ui/PageControls/more-page-actions.tid index 4fe8e2dbd..00b1c58b1 100644 --- a/core/ui/PageControls/more-page-actions.tid +++ b/core/ui/PageControls/more-page-actions.tid @@ -11,7 +11,7 @@ $:/config/PageControlButtons/Visibility/$(listItem)$ {{$:/core/images/down-arrow}} <$list filter="[prefix[yes]]"> -<$text text={{$:/language/Buttons/More/Caption}}/> +<$text text={{$:/language/Buttons/More/Caption}}/> <$reveal state=<> type="popup" position="below" animate="yes"> diff --git a/core/ui/PageControls/new-journal.tid b/core/ui/PageControls/new-journal.tid index 6177c96a8..d1b5cae30 100644 --- a/core/ui/PageControls/new-journal.tid +++ b/core/ui/PageControls/new-journal.tid @@ -10,7 +10,7 @@ description: {{$:/language/Buttons/NewJournal/Hint}} {{$:/core/images/new-journal-button}} <$list filter="[prefix[yes]]"> -<$text text={{$:/language/Buttons/NewJournal/Caption}}/> +<$text text={{$:/language/Buttons/NewJournal/Caption}}/> \end diff --git a/core/ui/PageControls/newtiddler.tid b/core/ui/PageControls/newtiddler.tid index 1995e5f00..9af1d49ee 100644 --- a/core/ui/PageControls/newtiddler.tid +++ b/core/ui/PageControls/newtiddler.tid @@ -8,6 +8,6 @@ description: {{$:/language/Buttons/NewTiddler/Hint}} {{$:/core/images/new-button}} <$list filter="[prefix[yes]]"> -<$text text={{$:/language/Buttons/NewTiddler/Caption}}/> +<$text text={{$:/language/Buttons/NewTiddler/Caption}}/> diff --git a/core/ui/PageControls/refresh.tid b/core/ui/PageControls/refresh.tid index dc2c5467d..18ef57b09 100644 --- a/core/ui/PageControls/refresh.tid +++ b/core/ui/PageControls/refresh.tid @@ -8,6 +8,6 @@ description: {{$:/language/Buttons/Refresh/Hint}} {{$:/core/images/refresh-button}} <$list filter="[prefix[yes]]"> -<$text text={{$:/language/Buttons/Refresh/Caption}}/> +<$text text={{$:/language/Buttons/Refresh/Caption}}/> diff --git a/core/ui/PageControls/savewiki.tid b/core/ui/PageControls/savewiki.tid index c196c2ecf..16a4312c4 100644 --- a/core/ui/PageControls/savewiki.tid +++ b/core/ui/PageControls/savewiki.tid @@ -9,7 +9,7 @@ description: {{$:/language/Buttons/SaveWiki/Hint}} {{$:/core/images/save-button}} <$list filter="[prefix[yes]]"> -<$text text={{$:/language/Buttons/SaveWiki/Caption}}/> +<$text text={{$:/language/Buttons/SaveWiki/Caption}}/> \ No newline at end of file diff --git a/core/ui/PageControls/storyview.tid b/core/ui/PageControls/storyview.tid index 1d921ec2f..0b8c43c52 100644 --- a/core/ui/PageControls/storyview.tid +++ b/core/ui/PageControls/storyview.tid @@ -13,7 +13,7 @@ $:/core/images/storyview-$(storyview)$ <$list filter="[prefix[yes]]"> -<$text text={{$:/language/Buttons/StoryView/Caption}}/> +<$text text={{$:/language/Buttons/StoryView/Caption}}/> <$reveal state=<> type="popup" position="below" animate="yes"> diff --git a/core/ui/PageControls/tag-button.tid b/core/ui/PageControls/tag-button.tid index e49e611e5..ac1c3524c 100644 --- a/core/ui/PageControls/tag-button.tid +++ b/core/ui/PageControls/tag-button.tid @@ -8,6 +8,6 @@ description: {{$:/language/Buttons/TagManager/Hint}} {{$:/core/images/tag-button}} <$list filter="[prefix[yes]]"> -<$text text={{$:/language/Buttons/TagManager/Caption}}/> +<$text text={{$:/language/Buttons/TagManager/Caption}}/> diff --git a/core/ui/PageControls/theme.tid b/core/ui/PageControls/theme.tid index 3af7510f3..c14ffba77 100644 --- a/core/ui/PageControls/theme.tid +++ b/core/ui/PageControls/theme.tid @@ -8,7 +8,7 @@ description: {{$:/language/Buttons/Theme/Hint}} {{$:/core/images/theme-button}} <$list filter="[prefix[yes]]"> -<$text text={{$:/language/Buttons/Theme/Caption}}/> +<$text text={{$:/language/Buttons/Theme/Caption}}/> <$reveal state=<> type="popup" position="below" animate="yes"> diff --git a/core/ui/ViewToolbar/clone.tid b/core/ui/ViewToolbar/clone.tid index 9c3f26a9a..a1f97e6d6 100644 --- a/core/ui/ViewToolbar/clone.tid +++ b/core/ui/ViewToolbar/clone.tid @@ -8,6 +8,6 @@ description: {{$:/language/Buttons/Clone/Hint}} {{$:/core/images/clone-button}} <$list filter="[prefix[yes]]"> -<$text text={{$:/language/Buttons/Clone/Caption}}/> +<$text text={{$:/language/Buttons/Clone/Caption}}/> diff --git a/core/ui/ViewToolbar/close-others.tid b/core/ui/ViewToolbar/close-others.tid index 2be44940b..63bc4da80 100644 --- a/core/ui/ViewToolbar/close-others.tid +++ b/core/ui/ViewToolbar/close-others.tid @@ -8,6 +8,6 @@ description: {{$:/language/Buttons/CloseOthers/Hint}} {{$:/core/images/close-others-button}} <$list filter="[prefix[yes]]"> -<$text text={{$:/language/Buttons/CloseOthers/Caption}}/> +<$text text={{$:/language/Buttons/CloseOthers/Caption}}/> diff --git a/core/ui/ViewToolbar/close.tid b/core/ui/ViewToolbar/close.tid index 6a6ae1ff1..3f90b68f1 100644 --- a/core/ui/ViewToolbar/close.tid +++ b/core/ui/ViewToolbar/close.tid @@ -8,6 +8,6 @@ description: {{$:/language/Buttons/Close/Hint}} {{$:/core/images/close-button}} <$list filter="[prefix[yes]]"> -<$text text={{$:/language/Buttons/Close/Caption}}/> +<$text text={{$:/language/Buttons/Close/Caption}}/> \ No newline at end of file diff --git a/core/ui/ViewToolbar/edit.tid b/core/ui/ViewToolbar/edit.tid index 16b3bf185..20e0aa79f 100644 --- a/core/ui/ViewToolbar/edit.tid +++ b/core/ui/ViewToolbar/edit.tid @@ -8,6 +8,6 @@ description: {{$:/language/Buttons/Edit/Hint}} {{$:/core/images/edit-button}} <$list filter="[prefix[yes]]"> -<$text text={{$:/language/Buttons/Edit/Caption}}/> +<$text text={{$:/language/Buttons/Edit/Caption}}/> diff --git a/core/ui/ViewToolbar/info.tid b/core/ui/ViewToolbar/info.tid index 0dc861638..22ef4f0b6 100644 --- a/core/ui/ViewToolbar/info.tid +++ b/core/ui/ViewToolbar/info.tid @@ -8,6 +8,6 @@ description: {{$:/language/Buttons/Info/Hint}} {{$:/core/images/info-button}} <$list filter="[prefix[yes]]"> -<$text text={{$:/language/Buttons/Info/Caption}}/> +<$text text={{$:/language/Buttons/Info/Caption}}/> diff --git a/core/ui/ViewToolbar/more-tiddler-actions.tid b/core/ui/ViewToolbar/more-tiddler-actions.tid index b5c1ebc62..ff852f617 100644 --- a/core/ui/ViewToolbar/more-tiddler-actions.tid +++ b/core/ui/ViewToolbar/more-tiddler-actions.tid @@ -11,7 +11,7 @@ $:/config/ViewToolbarButtons/Visibility/$(listItem)$ {{$:/core/images/down-arrow}} <$list filter="[prefix[yes]]"> -<$text text={{$:/language/Buttons/More/Caption}}/> +<$text text={{$:/language/Buttons/More/Caption}}/> <$reveal state=<> type="popup" position="below" animate="yes"> diff --git a/core/ui/ViewToolbar/new-here.tid b/core/ui/ViewToolbar/new-here.tid index 6ab831f64..94a81b07f 100644 --- a/core/ui/ViewToolbar/new-here.tid +++ b/core/ui/ViewToolbar/new-here.tid @@ -13,7 +13,7 @@ description: {{$:/language/Buttons/NewHere/Hint}} {{$:/core/images/new-here-button}} <$list filter="[prefix[yes]]"> -<$text text={{$:/language/Buttons/NewHere/Caption}}/> +<$text text={{$:/language/Buttons/NewHere/Caption}}/> \end diff --git a/core/ui/ViewToolbar/new-journal-here.tid b/core/ui/ViewToolbar/new-journal-here.tid index 9aeffb602..f93a10a1a 100644 --- a/core/ui/ViewToolbar/new-journal-here.tid +++ b/core/ui/ViewToolbar/new-journal-here.tid @@ -13,7 +13,7 @@ description: {{$:/language/Buttons/NewJournalHere/Hint}} {{$:/core/images/new-journal-button}} <$list filter="[prefix[yes]]"> -<$text text={{$:/language/Buttons/NewJournalHere/Caption}}/> +<$text text={{$:/language/Buttons/NewJournalHere/Caption}}/> \end diff --git a/core/ui/ViewToolbar/permalink.tid b/core/ui/ViewToolbar/permalink.tid index 0d13052f8..d19c1db1b 100644 --- a/core/ui/ViewToolbar/permalink.tid +++ b/core/ui/ViewToolbar/permalink.tid @@ -8,6 +8,6 @@ description: {{$:/language/Buttons/Permalink/Hint}} {{$:/core/images/permalink-button}} <$list filter="[prefix[yes]]"> -<$text text={{$:/language/Buttons/Permalink/Caption}}/> +<$text text={{$:/language/Buttons/Permalink/Caption}}/> diff --git a/core/ui/ViewToolbar/permaview.tid b/core/ui/ViewToolbar/permaview.tid index a2b93de4d..699fce949 100644 --- a/core/ui/ViewToolbar/permaview.tid +++ b/core/ui/ViewToolbar/permaview.tid @@ -8,6 +8,6 @@ description: {{$:/language/Buttons/Permaview/Hint}} {{$:/core/images/permaview-button}} <$list filter="[prefix[yes]]"> -<$text text={{$:/language/Buttons/Permaview/Caption}}/> +<$text text={{$:/language/Buttons/Permaview/Caption}}/> diff --git a/themes/tiddlywiki/vanilla/base.tid b/themes/tiddlywiki/vanilla/base.tid index 178358363..618273a0c 100644 --- a/themes/tiddlywiki/vanilla/base.tid +++ b/themes/tiddlywiki/vanilla/base.tid @@ -260,6 +260,11 @@ button svg, button img { fill: <>; } +.tc-btn-text { + padding: 0; + margin: 0; +} + .tc-btn-big-green { padding: 8px; margin: 4px 8px 4px 8px;