Unlucky-Life / ankimon

Ankimon is a Anki Addon to Gamify your learning experience
Other
38 stars 4 forks source link

"About Anki" on Mac replaced with AnkiMon License #93

Closed ylime0124 closed 2 weeks ago

ylime0124 commented 2 months ago
image
Unlucky-Life commented 2 months ago

@ylime0124 oh damn, didnt know about this ! Thx for the notice!

shigeyukey commented 3 weeks ago

I may be wrong as I have not debugged on a Mac yet, adding .setMenuRole(QAction.MenuRole.NoRole) to QAction may help. Previously such a Mac specific bug was solved that way. Like this.

#__init__.py 7324
test_action13 = QAction("About and License", mw)
test_action13.setMenuRole(QAction.MenuRole.NoRole) # add
test_action13.triggered.connect(license.show_window)
mw.pokemenu.addAction(test_action13)

🟢Edit : I'll test this next time I debug on Mac, but I'm busy so it will be a while yet.

shigeyukey commented 3 weeks ago

Done, I confirmed it works on Mac. Adding test_action13.setMenuRole(QAction.MenuRole.NoRole) will make "About Anki" work correctly. Maybe the reason for this is the Mac automatically assigns the most frequently used menus to the app. MenuRole.NoRole will disable it.

Unlucky-Life commented 3 weeks ago

@shigeyukey Thanks man great help !