mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
![]() * Configure buddy widgets for labels in the Preferences dialog Labels are often used to describe the purpose of a different widget like a combobox, edit field or a spinbox by providing a textual name for their functionality. The relation between a label and a widget is typically expressed by placing the label next to the relevant object. In addition to this visual linking intended for human users, frameworks usually also offer semantic way to link labels with other widgets, so the relation can be noticed by programs like screenreaders, which can figure out the correct textual description for the focused widgets based on this information. By default, labels on their own are not focusable elements, so users dependend on keyboard navigation and speech get to notice only the widget types (textbox, spinbox, etc.) while moving around without any contextual information if labels are not linked. When the linking is done, the component names get included as well. QT provides the "buddy" property for QLabel, which creates a semantic link between the label and its buddy widget. This commit configures the buddy properties on labels of the Anki Preferences dialog. * Configure spinbox suffixes in Preferrences dialog QSpinBox provides a suffix property. This property makes it possible to display a measurement unit next to the component value, which is linked to it both visually and semantically for the GUI framework without affecting the spinbox value itself. For purposes of accessibility, it's better to use this property than simply place a label next to the component, since it can be directly accessed by screenreaders and other assistive technology. This commit configures suffix properties for spinboxes in the Anki Preferences dialog. Note: Removal of the original unit labels may have altered the UI a little bit. * Assign buddy widgets in the ID and password retrieval dialog Set buddy widgets of the labels in the Get ID and password for synchronization dialog. * Fix positioning/size of text boxes * Style the suffixes of Preferences' QSpinBoxes Style QSpinBox suffixes (for those that have one) in the Preferences dialog by prepending them by a space character. |
||
---|---|---|
.. | ||
browser | ||
data | ||
forms | ||
import_export | ||
operations | ||
qt | ||
__init__.py | ||
_macos_helper.py | ||
about.py | ||
addcards.py | ||
addons.py | ||
changenotetype.py | ||
clayout.py | ||
colors.py | ||
customstudy.py | ||
dbcheck.py | ||
debug_console.py | ||
deckbrowser.py | ||
deckchooser.py | ||
deckconf.py | ||
deckdescription.py | ||
deckoptions.py | ||
editcurrent.py | ||
editor.py | ||
emptycards.py | ||
errors.py | ||
exporting.py | ||
fields.py | ||
filtered_deck.py | ||
flags.py | ||
gui_hooks.py | ||
importing.py | ||
legacy.py | ||
log.py | ||
main.py | ||
mediacheck.py | ||
mediasrv.py | ||
mediasync.py | ||
modelchooser.py | ||
models.py | ||
mpv.py | ||
notetypechooser.py | ||
overview.py | ||
package.py | ||
preferences.py | ||
profiles.py | ||
progress.py | ||
props.py | ||
py.typed | ||
reviewer.py | ||
schema_change_tracker.py | ||
sound.py | ||
stats.py | ||
studydeck.py | ||
stylesheets.py | ||
switch.py | ||
sync.py | ||
tagedit.py | ||
taglimit.py | ||
taskman.py | ||
theme.py | ||
toolbar.py | ||
tts.py | ||
undo.py | ||
update.py | ||
utils.py | ||
webview.py | ||
widgetgallery.py | ||
winpaths.py |