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) => {
|
on:input={(event) => {
|
||||||
color = setColor(event);
|
color = setColor(event);
|
||||||
bridgeCommand(`lastHighlightColor:${color}`);
|
bridgeCommand(`lastHighlightColor:${color}`);
|
||||||
|
}}
|
||||||
|
on:change={() => {
|
||||||
|
setTextColor();
|
||||||
saveCustomColours({});
|
saveCustomColours({});
|
||||||
}}
|
}}
|
||||||
on:change={() => setTextColor()}
|
|
||||||
/>
|
/>
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</WithColorHelper>
|
</WithColorHelper>
|
||||||
|
|
|
@ -153,13 +153,13 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
on:input={(event) => {
|
on:input={(event) => {
|
||||||
color = setColor(event);
|
color = setColor(event);
|
||||||
bridgeCommand(`lastTextColor:${color}`);
|
bridgeCommand(`lastTextColor:${color}`);
|
||||||
saveCustomColours({});
|
|
||||||
}}
|
}}
|
||||||
on:change={() => {
|
on:change={() => {
|
||||||
// Delay added to work around intermittent failures on macOS/Qt6.5
|
// Delay added to work around intermittent failures on macOS/Qt6.5
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
setTextColor();
|
setTextColor();
|
||||||
}, 200);
|
}, 200);
|
||||||
|
saveCustomColours({});
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</IconButton>
|
</IconButton>
|
||||||
|
|
Loading…
Reference in a new issue