mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
save colours on change
instead of input
`input` is supposed to be fired on every adjustment to the picker whereas `change` is only fired when the picker is accepted, but qt seems to treat both as the latter, so this is currently a no-op
This commit is contained in:
parent
7bde95f221
commit
1df93b02f8
2 changed files with 4 additions and 2 deletions
|
@ -134,9 +134,11 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
on:input={(event) => {
|
||||
color = setColor(event);
|
||||
bridgeCommand(`lastHighlightColor:${color}`);
|
||||
}}
|
||||
on:change={() => {
|
||||
setTextColor();
|
||||
saveCustomColours({});
|
||||
}}
|
||||
on:change={() => setTextColor()}
|
||||
/>
|
||||
</IconButton>
|
||||
</WithColorHelper>
|
||||
|
|
|
@ -153,13 +153,13 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
on:input={(event) => {
|
||||
color = setColor(event);
|
||||
bridgeCommand(`lastTextColor:${color}`);
|
||||
saveCustomColours({});
|
||||
}}
|
||||
on:change={() => {
|
||||
// Delay added to work around intermittent failures on macOS/Qt6.5
|
||||
setTimeout(() => {
|
||||
setTextColor();
|
||||
}, 200);
|
||||
saveCustomColours({});
|
||||
}}
|
||||
/>
|
||||
</IconButton>
|
||||
|
|
Loading…
Reference in a new issue