diff --git a/qt/aqt/__init__.py b/qt/aqt/__init__.py index f3ea4fad6..f1bc78cb9 100644 --- a/qt/aqt/__init__.py +++ b/qt/aqt/__init__.py @@ -346,15 +346,33 @@ class AnkiApp(QApplication): def eventFilter(self, src: Any, evt: QEvent) -> bool: if evt.type() == QEvent.Type.HoverEnter: - if isinstance(src, QPushButton): - # TODO: apply drop-shadow with setGraphicsEffect(QGraphicsDropShadowEffect) - # issue: can't access attributes of QClassProxy (Qt5-compat) + if ( + ( + isinstance( + src, + ( + QPushButton, + QCheckBox, + # classes with PyQt5 compatibility proxy + without_qt5_compat_wrapper(QToolButton), + without_qt5_compat_wrapper(QTabBar), + ), + ) + ) + and src.isEnabled() + or ( + isinstance(src, without_qt5_compat_wrapper(QComboBox)) + and not src.isEditable() + ) + ): self.setOverrideCursor(QCursor(Qt.CursorShape.PointingHandCursor)) else: self.restoreOverrideCursor() return False - elif evt.type() == QEvent.Type.HoverLeave or isinstance(evt, QCloseEvent): + elif evt.type() in [QEvent.Type.HoverLeave, QEvent.Type.Leave] or isinstance( + evt, QCloseEvent + ): self.restoreOverrideCursor() return False diff --git a/qt/aqt/data/web/css/deckbrowser.scss b/qt/aqt/data/web/css/deckbrowser.scss index e8561e26c..4d424eddf 100644 --- a/qt/aqt/data/web/css/deckbrowser.scss +++ b/qt/aqt/data/web/css/deckbrowser.scss @@ -71,6 +71,7 @@ body { height: 1em; opacity: 0.5; padding-top: 0.2em; + cursor: pointer; } .nightMode { diff --git a/qt/aqt/forms/dconf.ui b/qt/aqt/forms/dconf.ui index 1fef52366..d5d465ac5 100644 --- a/qt/aqt/forms/dconf.ui +++ b/qt/aqt/forms/dconf.ui @@ -186,7 +186,7 @@ - + scheduling_bury_related_new_cards_until_the @@ -355,7 +355,7 @@ - + scheduling_bury_related_reviews_until_the_next @@ -604,21 +604,21 @@ - + scheduling_show_answer_timer - + scheduling_automatically_play_audio - + scheduling_always_include_question_side_when_replaying diff --git a/qt/aqt/forms/emptycards.ui b/qt/aqt/forms/emptycards.ui index 317261610..70049a47f 100644 --- a/qt/aqt/forms/emptycards.ui +++ b/qt/aqt/forms/emptycards.ui @@ -55,7 +55,7 @@ 12 - + KEEP_NOTES diff --git a/qt/aqt/forms/exporting.ui b/qt/aqt/forms/exporting.ui index 4b34d3ae1..bcfb19c01 100644 --- a/qt/aqt/forms/exporting.ui +++ b/qt/aqt/forms/exporting.ui @@ -6,8 +6,8 @@ 0 0 - 610 - 348 + 550 + 200 @@ -57,7 +57,7 @@ - + exporting_include_scheduling_information @@ -67,7 +67,7 @@ - + exporting_include_media @@ -77,14 +77,14 @@ - + exporting_include_html_and_media_references - + exporting_include_tags @@ -94,7 +94,7 @@ - + true @@ -104,7 +104,7 @@ - + true @@ -114,14 +114,14 @@ - + exporting_include_guid - + exporting_support_older_anki_versions diff --git a/qt/aqt/forms/fields.ui b/qt/aqt/forms/fields.ui index 4b7ad1599..f0a372429 100644 --- a/qt/aqt/forms/fields.ui +++ b/qt/aqt/forms/fields.ui @@ -131,14 +131,14 @@ - + fields_reverse_text_direction_rtl - + true @@ -162,7 +162,7 @@ - + true diff --git a/qt/aqt/forms/filtered_deck.ui b/qt/aqt/forms/filtered_deck.ui index c525b1398..87277b4f5 100644 --- a/qt/aqt/forms/filtered_deck.ui +++ b/qt/aqt/forms/filtered_deck.ui @@ -198,7 +198,7 @@ actions_options - + decks_reschedule_cards_based_on_my_answers @@ -208,7 +208,7 @@ - + decks_enable_second_filter @@ -248,7 +248,7 @@ - + decks_custom_steps_in_minutes diff --git a/qt/aqt/forms/findreplace.ui b/qt/aqt/forms/findreplace.ui index ec11bbc24..b9afb6495 100644 --- a/qt/aqt/forms/findreplace.ui +++ b/qt/aqt/forms/findreplace.ui @@ -63,14 +63,14 @@ - + browsing_treat_input_as_regular_expression - + browsing_ignore_case @@ -99,7 +99,7 @@ - + browsing_selected_notes_only diff --git a/qt/aqt/forms/forget.ui b/qt/aqt/forms/forget.ui index 03e44fdda..5b6790f0f 100644 --- a/qt/aqt/forms/forget.ui +++ b/qt/aqt/forms/forget.ui @@ -17,14 +17,14 @@ true - + scheduling_restore_position - + scheduling_reset_counts diff --git a/qt/aqt/forms/importing.ui b/qt/aqt/forms/importing.ui index 1e0ed1cb3..b41079f0c 100644 --- a/qt/aqt/forms/importing.ui +++ b/qt/aqt/forms/importing.ui @@ -70,7 +70,7 @@ - + importing_allow_html_in_fields diff --git a/qt/aqt/forms/modelopts.ui b/qt/aqt/forms/modelopts.ui index c30264688..d098e6e00 100644 --- a/qt/aqt/forms/modelopts.ui +++ b/qt/aqt/forms/modelopts.ui @@ -27,7 +27,7 @@ editing_latex - + notetypes_create_scalable_images_with_dvisvgm diff --git a/qt/aqt/forms/preferences.ui b/qt/aqt/forms/preferences.ui index d1b7f4aac..af8c46fff 100644 --- a/qt/aqt/forms/preferences.ui +++ b/qt/aqt/forms/preferences.ui @@ -61,49 +61,49 @@ - + preferences_show_play_buttons_on_cards_with - + preferences_interrupt_current_audio_when_answering - + preferences_paste_clipboard_images_as_png - + preferences_paste_without_shift_key_strips_formatting - + preferences_ignore_accents_in_search - + Legacy import/export handling - + preferences_reduce_motion_tooltip @@ -204,35 +204,35 @@ preferences_scheduling - + preferences_show_next_review_time_above_answer - + preferences_show_remaining_card_count_during_review - + preferences_show_learning_cards_with_larger_steps - + preferences_legacy_timezone_handling - + @@ -382,28 +382,28 @@ - + preferences_synchronize_audio_and_images_too - + preferences_automatically_sync_on_profile_openclose - + preferences_periodically_sync_media - + preferences_on_next_sync_force_changes_in @@ -666,7 +666,7 @@ - + preferences_some_settings_will_take_effect_after diff --git a/qt/aqt/forms/reposition.ui b/qt/aqt/forms/reposition.ui index 73e783d25..dc6c4dc95 100644 --- a/qt/aqt/forms/reposition.ui +++ b/qt/aqt/forms/reposition.ui @@ -62,14 +62,14 @@ - + browsing_randomize_order - + browsing_shift_position_of_existing_cards diff --git a/qt/aqt/forms/taglimit.ui b/qt/aqt/forms/taglimit.ui index 2d1805491..5c8008b9f 100644 --- a/qt/aqt/forms/taglimit.ui +++ b/qt/aqt/forms/taglimit.ui @@ -14,7 +14,7 @@ custom_study_selective_study - + custom_study_require_one_or_more_of_these diff --git a/sass/buttons.scss b/sass/buttons.scss index f769e62b7..edf161b91 100644 --- a/sass/buttons.scss +++ b/sass/buttons.scss @@ -23,6 +23,7 @@ button { -webkit-appearance: none; color: vars.color(fg); + cursor: pointer; background: linear-gradient( 180deg, diff --git a/ts/components/Switch.svelte b/ts/components/Switch.svelte index ba1c48615..5b2b20dc3 100644 --- a/ts/components/Switch.svelte +++ b/ts/components/Switch.svelte @@ -37,6 +37,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html .form-switch & { width: 3em; margin-left: 1.5em; + cursor: pointer; } } diff --git a/ts/deck-options/RevertButton.svelte b/ts/deck-options/RevertButton.svelte index 8bd09c8e5..4ff880f1b 100644 --- a/ts/deck-options/RevertButton.svelte +++ b/ts/deck-options/RevertButton.svelte @@ -89,6 +89,10 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html } } + :global(.badge) { + cursor: pointer; + } + .hide :global(.badge) { opacity: 0; } diff --git a/ts/deck-options/Switch.svelte b/ts/deck-options/Switch.svelte deleted file mode 100644 index ba1c48615..000000000 --- a/ts/deck-options/Switch.svelte +++ /dev/null @@ -1,47 +0,0 @@ - - - -
- -
- - diff --git a/ts/graphs/graphs-base.scss b/ts/graphs/graphs-base.scss index 29ec0742b..211a959a7 100644 --- a/ts/graphs/graphs-base.scss +++ b/ts/graphs/graphs-base.scss @@ -1 +1,10 @@ @use "sass/base"; +@use "sass/button-mixins" as button; + +label, +input[type="radio"], +input[type="checkbox"] { + cursor: pointer; +} + +@include button.base;