On Linux only Gnome uses its own color dialog, and it's inferior to QT's own: See the same issue @ https://github.com/OpenShot/openshot-qt/pull/2425
(This is/was visible only on some distributions' packaged versions of Anki, not via ./run.)
isLin check since QT on Windows already uses the default, whereas Mac's own picker seems superior (from what I can judge by screenshots).
- changes are now committed in bulk when closing the dialog,
and can be canceled
- it's not necessary to save the note to the database to preview it
- duplicate fields are now shown as duplicates in the top list
- redraw preview more quickly
- use + instead of _ when deduplicating names, as the latter is a
glob character
- field changes are now applied when user closes dialog with save
button, in bulk
- models diag now fetches note type and saves it as required, instead
of holding on top a copy that can grow stale as changes are made in
subdialogs
- both dialogs now perform operations in the backend
- note.model() now fetches the note type on the fly, instead of
holding on to a copy that may become stale
This reverts commit 2264fe3f66, reversing
changes made to 84b84ae31c.
Causes a traceback when opening the add screen, clicking on Type,
and choosing a note type.
File "/Users/dae/Work/code/dtop/qt/aqt/webview.py", line 31, in cmd
return json.dumps(self.onCmd(str))
File "/Users/dae/Work/code/dtop/qt/aqt/webview.py", line 97, in _onCmd
return self._onBridgeCmd(str)
File "/Users/dae/Work/code/dtop/qt/aqt/webview.py", line 500, in _onBridgeCmd
return self.onBridgeCmd(cmd)
File "/Users/dae/Work/code/dtop/qt/aqt/editor.py", line 374, in onBridgeCmd
self._links[cmd](self, *args) # type: ignore
File "/Users/dae/Work/code/dtop/qt/aqt/editor.py", line 404, in onBlur
if gui_hooks.editor_did_unfocus_field(False, self.note, int(ord)):
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
The reason to do that is that I can then call blur/key from other
method in add-on.
More precisely, I expect to create a method which captures the blur
command, ask anki to execute the standard version of the command, and
then execute more code once the note contains the new field value.
I should note that the code executed during blur/key/focus itself
didn't change. It's only it's location which changed.
A current problem I have is that there is nothing similar to hook
inside of javascript. It seems that it would be easier to be able to
add other methods in javascript and call them in loadNote. Currently I
simply redefined loadNote, which is far from perfect
Sometime I like to print html to understand why it bugs. And I really
prefer to have html indented if it's okay with you. There is no change
appart from the identation and quotes
I hope to use this in oder to had features to the web view. In
particular, I expect the "spell checking" feature to use it
hopefully. Because currently it's incompatible with other add-on
dealing with the editor
Forces the Fusion theme when running night mode, so we don't need
to work around platform themes that don't respond to the defined
palette.
Feedback/suggestions on the chosen colours welcome - _vars.scss is the
file to change if you want to experiment with adjustments.