fonol / anki-search-inside-add-card

An add-on providing full-text-search and PDF reading functionality to Anki's Add card dialog
https://ankiweb.net/shared/info/1781298089
GNU Affero General Public License v3.0
177 stars 24 forks source link

Feature request: Change Anki's toolbar position (easier to use when the fields are on the right) (code provided) #327

Open kvn1351 opened 2 years ago

kvn1351 commented 2 years ago

I'd like to have the fields on the right side. However, when I do this, I have to move the mouse across my entire screen (very tedious to say the least) to reach the buttons. Keyboard shortcuts are broken on Anki currently (qt6 build macOS M1).

Therefore, I've moved the toolbar to be a part of the sidebar instead. Which I think is a much better solution even when it's on the left. I've also added some margins to the button groups.

It works nicely with add-ons too.

let style = document.createElement('style');
style.innerHTML = '.btn-group { margin-top: 4px;}';
document.head.appendChild(style);

let leftSide = document.getElementById('leftSide');
let toolBar = document.getElementsByClassName('button-toolbar')[0];

leftSide.prepend(toolBar);

image