Anki 2.1.55 Beta 5-6

“Save deck options” still doesn’t work properly if you enter the settings with the keyboard in b6 (if you use the arrows, everything works OK)
4

2 Likes

Which widgets are you referring to exactly? A screenshot would be helpful.

Almost every color in Anki can be altered by overriding the respective CSS variable. You could set --canvas: transparent for example.

@cqg Thanks for the reminder. I’m working on the Select component right now for the CSV import window. Hopefully I can fix this in one go.

2 Likes

Everything below toolbar in main window, editor, everything above toolbar in Previewer. Some things in Browser also have background color, but my add-on doesn’t touch the Browser. But maybe not setting background color will increase performance a bit?

I doubt that, but I guess as long as the Qt windows themselves have a background color, I can make it transparent on the webviews.

That would be sweet, thanks! (I’m not sure about Qt, but on Android painting over other elements (overdraw) is, or used to be, considered bad practice because of reduced performance and there are even tools built into the system to debug it.)

I got bad news. Qt uses black as the default background color for webviews. This might have changed with the update to Qt 6.4. Even if I remove the background color from say, the editor’s body, it will still show up as a black box:

If I can’t find a way to make the webviews transparent (I’m looking at something like setAttribute(Qt.WA_TranslucentBackground)…), add-ons like yours will have to provide the background image separately for the webview (I think the one managed by Anki Palace already does so).

We’re slowly transitioning Anki’s screens to webview-only. Once that is achieved, we can set the Qt margins to 0 and setting custom backgrounds will be a breeze.

Not entirely sure but I think I’ve seen that black background color before. I have this logic to remove the background color from web views, extremely hacky and fragile. It might have stopped working because some names changed inside the app… Either way, I think it should be possible to have a transparent web view in some way?

P.S. Why not make Anki entirely a web app?

Nevermind, I got it working with this line on AnkiWebView:

self._page.setBackgroundColor(Qt.GlobalColor.transparent)

That’s the goal, if I understood correctly. It’s just a very long and gruesome path, but I think we’ll get there some day. The biggest hurdle that’s left is the browser. It will be a proper challenge to get a web-equivalent working as efficiently as the Qt widget we’re using right now.


Edit: @oakkitten I’ve now experimented a lot with making the webview transparent, but due to flickering issues and a show-stopper (webview doesn’t render until it’s resized), I cannot add this to native Anki right now. I did make some changes that make the editor ready for a transparent webview, once it is achievable without those issues.

Perhaps you can do it with the add-on and then override the --canvas CSS variable.

2 Likes

When clicking to drill down of a deck, the zoom goes back to 100%
In Beta6

Anki custom scheduling throw a SyntaxError in anki-2.1.55+beta6_ca116699-mac-intel-qt5


Version ⁨2.1.55 (ca116699)⁩
Python 3.9.15 Qt 5.14.2 PyQt 5.14.1

It works in qt6.


Version ⁨2.1.55 (ca116699)⁩
Python 3.9.15 Qt 6.4.0 PyQt 6.4.0

Anki sometimes crashes when I click to close the entire program or use Cmd + Q.
Anki 2.1.55 Beta 6. Mac Os Big Sur 11.7.1.
Screen Shot 2022-11-29 at 12.23.30 PM

Beta 6 (Qt5, macOS 12.6.1):

  • Anki occasionally crashes when closing the program.

  • Assigned tags are often deleted after pressing return.

  • When typing Eng for the tag English and selecting this tag, sometimes only Eng is added to the tag list

  • Sometimes the cursor can’t be placed in the tag area. A slim vertical blue line appears, no input is possible.

  • When a tag is added properly, the text appears somehow squeezed for a moment.

The Chromium bundled with Qt 5.14 does not support the optional chaining operator (?.).
https://wiki.qt.io/QtWebEngine/ChromiumVersions
https://caniuse.com/mdn-javascript_operators_optional_chaining

2 Likes

Speaking of, I’ve never understood why there are three separate web views in the first place. What’s the advantage?

Thanks for the new beta!
Problems I wrote and were not solved:

  1. When first installing the software on the computer, everything is displayed in LTR even if the selected language is RTL. (You can check this by deleting the Anki folder in appdata (in Windows))
  2. It is still not possible to translate the layout menu in the browser.
  3. The font size is too large in many places. For example in deck options and statistics. I use a 13.3 inch computer and I have to scroll a lot with the mouse just because it’s better designed…
1 Like

It seems that the UI has gotten a lot bigger, a lot rounder, and a lot more padded…
Similar to what happened with Firefox’s tabs…

The desktop version of Anki should be information-dense and not prioritise touch-friendlyness.


after

3 Likes

Screenshots of affected areas would help a lot. On my system I don’t notice any big fonts (to the contrary), so I guess this is an issue isolated to Windows?

I’m curious what portion of the userbase thinks that way. Overall I got very positive feedback on the design changes so far.

My main priority actually was to make the software more pleasant to look at (touch-friendliness is a by-product).

1 Like

I don’t know. It’s a relic of times when web components didn’t play a major role in Anki (long before I discovered the software).

FYI In the latest Beta Apple Silicon (Ventura), there are multiple Settings… off the File menu.

Is there a way to suppress those mediaserver access logs when ./running from source?
The have been around since the switch from bazel to ninja.

1669791072.512 GET /_anki/pages/congrats.html
1669791072.512 GET /_anki/legacyPageData
1669791072.530 GET /_anki/css/webview.css
1669791072.533 GET /_anki/css/toolbar.css
1669791072.534 GET /_anki/css/toolbar-bottom.css
1669791072.535 GET /_anki/js/vendor/jquery.min.js
1669791072.534 GET /_anki/js/webview.js
1 Like