anki/ftl/core
Matthias Metelka f169ee0933
Revamp Preferences, implement Minimalist Mode and Qt widget gallery to test GUI changes (#2289)
* Create widget gallery dialog

* Add WidgetGallery to debug dialog

* Use enum for its intended purpose

* Rename "reduced-motion" to "reduce-motion"

* Add another border-radius value

and make former large radius a bit smaller.

* Revamp preferences, add minimalist mode

Also:
- create additional and missing widget styles and tweak existing ones
- use single profile entry to set widget styles and reduce choices to Anki and Native

* Indent QTabBar style definitions

* Add missing styles for QPushButton states

* Fix QTableView background

* Remove unused layout from Preferences

* Fix QTabView focused tab style

* Highlight QCheckBox and QRadioButton when focused

* Fix toolbar styles

* Reorder preferences

* Add setting to hide bottom toolbar

* Move toolbar settings above minimalist modes

* Remove unused lines

* Implement proper full-screen mode

* Sort imports

* Tweak deck overview appearance in minimalist mode

* Undo TitledContainer changes

since nobody asked for that

* Remove dynamic toolbar background from minimalist mode

* Tweak buttons in minimalist mode

* Fix some issues

* Reduce theme check interval to 5s on Linux

* Increase hide timer interval to 2s

* Collapse toolbars with slight delay when moving to review state

This should ensure the bottom toolbar collapses too.

* Allow users to make hiding exclusive to full screen

* Rename full screen option

* Fix hide mode dropdown ignoring checkbox state on startup

* Fix typing issue

* Refine background image handling

Giving the toolbar body the main webview height ensures background-size: cover behaves exactly the same.

To prevent an override of other background properties, users are advised to only set background-images via the background-image property, not the background shorthand.

* Fix top toolbar getting huge when switching modes

The issue was caused by the min-height hack to align the background images. A call to web.adjustHeightToFit would set the toolbar to the same height as the main webview, as the function makes use of document.offsetHeight.

* Prevent scrollbar from appearing on bottom toolbar resize

* Cleanup

* Put review tab before editing; fix some tab orders

* Rename 'network' to 'syncing'

* Fix bottom toolbar disappearing on UI > 100

* Improve Preferences layout by adding vertical spacers to the bottom

also make the hiding of video_driver and its label more obvious in preferences.py.

* Fix bottom toolbar animating on startup

Also fix bottom toolbar not appearing when unchecking hide mode in reviewer.

* Hide/Show menubar in fullscreen mode along with toolbar

* Attempt to fix broken native theme on macOS

* Format

* Improve native theme on other systems by not forcing palette

with the caveat that theme switching can get weird.

* Fix theme switching in native style

* Remove redundant condition

* Add back check for Qt5 to prevent theme issues

* Add check for macOS before setting fusion theme

* Do not force scrollbar styles on macOS

* Remove all of that crazy theme logic

* Use canvas instead of button-bg for ColorRole.Button

* Make sure Anki style is always based on Fusion

otherwise we can't guarantee the same look on all systems.

* Explicitly apply default style when Anki style is not selected

This should fix the style not switching back after it was selected.

* Remove reduncant default_palette

* Revert 8af4c1cc2

On Mac with native theme, both Qt5 and Qt6 look correct already. On
the Anki theme, without this change, we get the fusion-style scrollbars
instead of the rounded ones.

* Rename AnkiStyles enum to WidgetStyle

* Fix theme switching shades on same theme

* Format

* Remove unused placeholderText

that caused an error when opening the widget gallery on Qt5.

* Check for full screen windowState using bitwise operator

to prevent error in Qt5.

Credit: https://stackoverflow.com/a/65425151

* Hide style option on Windows

also exclude native option from dropdown just in case.

* Format

* Minor naming tweak
2023-01-18 21:24:16 +10:00
..
actions.ftl Make SpinBox chevrons more subtle (#2243) 2022-12-08 22:32:35 +10:00
adding.ftl Make missing cloze a warning again 2021-06-15 08:43:00 +02:00
browsing.ftl Experiment with labelled note view switch (#2117) 2022-10-10 18:36:11 +10:00
card-stats.ftl Move update logic into CardInfo.svelte 2021-10-18 09:01:24 +02:00
card-template-rendering.ftl Template err improvements (#1953) 2022-07-09 13:00:03 +10:00
card-templates.ftl More template checks (#2032) 2022-09-05 16:52:25 +10:00
change-notetype.ftl Change Notetype UI Rework (#1499) 2021-11-24 12:09:55 +10:00
custom-study.ftl Rework display of available cards in custom study 2022-05-20 17:52:02 +10:00
database-check.ftl move ftl into top level ftl/ folder; make it source of truth for aqt 2020-11-18 16:20:58 +10:00
deck-config.ftl Redesign deck options screen, swap tooltips for help modals (#2139) 2022-10-25 16:18:50 +10:00
decks.ftl run ftl/remove-unused.sh 2021-11-24 14:44:02 +10:00
editing.ftl Fix some issues with the Tag Editor (#2215) 2022-11-27 10:45:33 +10:00
empty-cards.ftl automatically format/check ftl files 2020-11-22 15:30:59 +10:00
errors.ftl Refactor error handling (#2136) 2022-10-21 18:02:12 +10:00
exporting.ftl Change "unique note identifier" to "unique identifier" 2022-06-11 10:11:29 +10:00
fields.ftl Introduce setting to collapse field by default (#1990) 2022-08-31 23:34:39 +10:00
findreplace.ftl automatically format/check ftl files 2020-11-22 15:30:59 +10:00
help.ftl Minor wording tweaks to help.ftl; remove an unused entry 2022-10-27 08:24:38 +10:00
importing.ftl CSV import/export fixes and features (#1898) 2022-06-09 10:28:01 +10:00
keyboard.ftl Add getPlatformString for making shortcuts to platform string 2021-04-22 13:04:24 +02:00
media-check.ftl More template checks (#2032) 2022-09-05 16:52:25 +10:00
media.ftl remove format separator from recording string 2020-12-16 19:44:47 +10:00
network.ftl automatically format/check ftl files 2020-11-22 15:30:59 +10:00
notetypes.ftl Plaintext import/export (#1850) 2022-06-01 20:26:16 +10:00
preferences.ftl Revamp Preferences, implement Minimalist Mode and Qt widget gallery to test GUI changes (#2289) 2023-01-18 21:24:16 +10:00
profiles.ftl Backup improvements (#1728) 2022-03-21 19:40:42 +10:00
scheduling.ftl Reset->change in due date prompt 2022-06-01 19:44:51 +10:00
search.ftl search-invalid-flag -> search-invalid-flag-2 2021-06-02 21:49:33 +02:00
statistics.ftl run ftl/remove-unused.sh 2021-11-24 14:44:02 +10:00
studying.ftl Fix bury count (more) (#1712) 2022-03-07 11:03:14 +10:00
sync.ftl tweak sync conflict message 2021-09-08 19:19:23 +10:00
undo.ftl move action names out of undo.ftl into actions.ftl 2021-05-08 17:11:54 +10:00