mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
Highlight field badges when toggled to non-default state (#1466)
This commit is contained in:
parent
abd671d4cd
commit
9f8be1af93
3 changed files with 18 additions and 9 deletions
|
@ -27,7 +27,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
);
|
||||
</script>
|
||||
|
||||
<span on:click|stopPropagation={toggle}>
|
||||
<span class:highlighted={!off} on:click|stopPropagation={toggle}>
|
||||
<Badge
|
||||
tooltip="{tr.editingHtmlEditor()} ({getPlatformString(keyCombination)})"
|
||||
iconSize={80}>{@html icon}</Badge
|
||||
|
@ -36,10 +36,13 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
|
||||
<style lang="scss">
|
||||
span {
|
||||
opacity: 0.6;
|
||||
opacity: 0.4;
|
||||
|
||||
&:hover {
|
||||
&.highlighted {
|
||||
opacity: 1;
|
||||
}
|
||||
&:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -15,16 +15,19 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
$: icon = off ? richTextOff : richTextOn;
|
||||
</script>
|
||||
|
||||
<span on:click|stopPropagation={toggle}>
|
||||
<span class:highlighted={off} on:click|stopPropagation={toggle}>
|
||||
<Badge iconSize={80}>{@html icon}</Badge>
|
||||
</span>
|
||||
|
||||
<style lang="scss">
|
||||
span {
|
||||
opacity: 0.6;
|
||||
opacity: 0.4;
|
||||
|
||||
&:hover {
|
||||
&.highlighted {
|
||||
opacity: 1;
|
||||
}
|
||||
&:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -29,7 +29,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
onMount(() => registerShortcut(toggleSticky, keyCombination, editorField.element));
|
||||
</script>
|
||||
|
||||
<span on:click|stopPropagation={toggleSticky}>
|
||||
<span class:highlighted={active} on:click|stopPropagation={toggleSticky}>
|
||||
<Badge
|
||||
tooltip="{tr.editingToggleSticky()} ({getPlatformString(keyCombination)})"
|
||||
widthMultiplier={0.7}>{@html icon}</Badge
|
||||
|
@ -38,10 +38,13 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
|
||||
<style lang="scss">
|
||||
span {
|
||||
opacity: 0.6;
|
||||
opacity: 0.4;
|
||||
|
||||
&:hover {
|
||||
&.highlighted {
|
||||
opacity: 1;
|
||||
}
|
||||
&:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in a new issue