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:
llama 2025-09-10 20:58:38 +08:00
parent 7bde95f221
commit 1df93b02f8
No known key found for this signature in database
GPG key ID: 0B7543854B9413C3
2 changed files with 4 additions and 2 deletions

View file

@ -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>

View file

@ -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>