Commit Graph

35 Commits

Author SHA1 Message Date
Kaben Nanlohy
77bba533ea
Allow burying cards in browser (#2351)
* Allow burying cards in browser

This code is based on existing "toggle suspend" command in browser.

- Adds "toggle bury" command to browser cards menu.
- Adds "browsing-toggle-bury" to core translation. Only english-language.
- Adds "buried" coloring to rows for buried cards in browser table.

Not yet done:

- Keyboard shortcut for "toggle bury" action.
- Non-english translations.

* Add contributor as requested in CONTRIBUTORS.

* Fix formatting in browser_table.rs.

* Add keyboard shortcut to "toggle bury" command.

This adds keyboard shortcut "ctrl-shift-j" to "toggle bury" command in
browser cards menu.

* Simplify logic for color of buried-card rows.
2023-01-30 19:21:06 +10:00
Matthias Metelka
52f52724fa
Add orientation toggle to browser view menu (#2074)
* Use horizontal orientation on browser splitter by default

* Add View menu action to toggle browser orientation

* Add shortcut for toggleOrientation action

based on the most popular add-on.

* Try to fix typing issue

* Make orientation respond to aspect ratio

aspect ratio < 1 means vertical orientation, >= 1 horizontal

* Implement three-way switch for browser orientation

* Fix typing

* Add separator before QWidgetAction

* Use submenu instead of widget and adjust enum

* Add accelerators; move non-accelerator strings into separate .ftl (dae)

* Move BrowserLayout to its own file (dae)
2022-09-20 12:56:59 +10:00
Matthias Metelka
24abb06cee
Color Palette Patch 1 (#2073)
* Make several colors more faint

* Move selection-color definition out of table.py and adjust colors

* Use functions for repetitive border-gradient definitions

* Tweak QTableView and QScrollBar styles

* Use mdi icon for Qt drag handles and adjust padding in browser.ui

* Apply appropriate drag-handle icon depending on orientation

* Fix formatting

* Remove unused import

* Add right margin to browser layout

* Apply splitter styling on macOS as well (dae)

+ Remove the styling from sliders, as it was presumably not intentional.
2022-09-19 10:58:05 +10:00
RumovZ
700fc50f7a
View menu (#1668)
* Add main view menu

* Add browser view menu

* Use standard keys for zooming and full screen

* Capitalise menu item names

* Toggle Showing Cards/Notes -> Toggle Cards/Notes

* Explicitly set linux full screen key

on_toggle_fullscreen -> on_toggle_full_screen
2022-02-17 16:31:46 +10:00
RumovZ
cc91017bf1
Remove unused actions from ui files (#1655)
* Remove redundant actions in add dialog

* Remove unused actions from main and browser
2022-02-11 10:15:36 +10:00
Damien Elmes
b64c179609 change notes/cards toggle shortcut to ctrl+alt+t
Closes #1652
2022-02-09 12:59:45 +10:00
RumovZ
65f6728454
Fix Alt-Gr and add shortcut to create copy again (#1544)
* Set QT_QPA_PLATFORM for Win on recent Qt versions

Erroneously dropped for Qt 5.15.1+.

* Enable original shortcut to create copy

* minor tweaks to comment to make it clearer (dae)
2021-12-10 17:52:08 +10:00
Damien Elmes
7ef40cb850 disable 'create copy' shortcut for now
In preparation for a new beta; we can add a new shortcut once one is
decided on https://github.com/ankitects/anki/pull/1541
2021-12-09 10:24:21 +10:00
RumovZ
cd22485f9b
Add browser action to create note copy (#1535)
* Add browser action to create note copy

* Use new note and copy instead of using source

* Change shortcut due to Qt's Alt-Gr bug

* Add separate routine for suffixing action with ...

* Remove '...' from some translations

The convention is to add an ellipsis if more input is required to
perform the action. Whether or not the action opens a new window is not
decisive.
Sources:
https://developer.apple.com/design/human-interface-guidelines/macos/menus/menu-anatomy/
https://docs.microsoft.com/en-us/windows/win32/uxguide/cmd-toolbars
2021-12-08 08:40:48 +10:00
Damien Elmes
546d32cfda ctrl+alt+n for forget
https://forums.ankiweb.net/t/anki-2-1-44-make-cards-new/12247/7
2021-08-18 15:32:45 +10:00
Damien Elmes
cff8069ef9 remove 'flag ' prefix from flag names 2021-06-04 15:03:17 +10:00
RumovZ
5e7a47fdc7 Rename violet to pink 2021-06-01 18:14:43 +02:00
RumovZ
c97c6c6e98 Add violet, turquoise and purple flags 2021-05-31 12:03:30 +02:00
Damien Elmes
9f3f6bab7d enable redo support
Also:

- fix issues where the Undo action in the Browse screen was not
consistent with the main window. The existing hook signature has been
changed; from a snapshot of the add-on code from a few months ago, it
was not a hook that was being used by anyone.
- change the undo shortcut in the Browse window to match the main
window. It was different because undoing a change in the editing area
could accidentally trigger an undo of an operation, but the damage is
limited now that (most) operations can be redone. If it still proves to
be a problem, perhaps we should just always swallow ctrl+z when an
editing field is focused.
2021-05-19 15:18:39 +10:00
RumovZ
08226e2004 Change notes mode shortcut 2021-04-06 16:48:35 +02:00
RumovZ
a1277b0919 Tweak new browsing strings 2021-04-06 11:41:18 +02:00
RumovZ
52b66dc985 Add shortcut and tooltip to switch 2021-03-31 18:53:36 +02:00
RumovZ
c8146c13c1 Make toggle actions checkable 2021-03-31 10:05:44 +02:00
RumovZ
ad7ac06398 Add switch for browser states 2021-03-29 12:24:24 +02:00
RumovZ
0d8b1c9d0b squash merge browser refactor
Closes #1100
2021-03-29 16:14:54 +10:00
Damien Elmes
dbcb997ad7 update TR references in .ui files
We're not benefiting from type checking yet, as mypy and pylint currently
ignore the generated files
2021-03-26 15:03:51 +10:00
Damien Elmes
6aab9feec1 add (unused) reschedule option back to avoid breaking fastbar 2021-02-08 09:51:40 +10:00
Damien Elmes
704b5e581a Rework reschedule tool
The old rescheduling dialog's two options have been split into two
separate menu items, "Forget", and "Set Due Date"

For cards that are not review cards, "Set Due Date" behaves like the
old reschedule option, changing the cards into a review card, and
and setting both the interval and due date to the provided number of
days.

When "Set Due Date" is applied to a review card, it no longer resets
the card's interval. Instead, it looks at how much the provided number
of days will change the original interval, and adjusts the interval by
that amount, so that cards that are answered earlier receive a smaller
next interval, and cards that are answered after a longer delay receive
a bonus.

For example, imagine a card was answered on day 5, and given an interval
of 10 days, so it has a due date of day 15.

- if on day 10 the due date is changed to day 12 (today+2), the card
is being scheduled 3 days earlier than it was supposed to be, so the
interval will be adjusted to 7 days.
- and if on day 10 the due date is changed to day 20, the interval will
be changed from 10 days to 15 days.

There is no separate option to reset the interval of a review card, but
it can be accomplished by forgetting the card(s), and then setting the
desired due date.

Other notes:

- Added the action to the review screen as well.
- Set the shortcut to Ctrl+Shift+D, and changed the existing Delete
Tags shortcut to Ctrl+Alt+Shift+A.
2021-02-07 21:57:51 +10:00
Damien Elmes
b8d67cdad5 move remaining Filter button items into sidebar
- Closes #976
- Added helper to apply arbitrary colour to an icon.
- Fix #979 - low res icons in night mode.
- The icons and colours are not perfect - please feel free to send
through a PR if you can improve them.
- Convert colors dictionary into module consts, so we can
use code completion.
- Added "Edited Today" and "Due Tomorrow"
- Rename camelCase attribute to snake_case and tweak the wording
of some enum constants. We've already broken compatibility with the
major sidebar add-ons, so we may as well make these changes while we
can.
- Removed Filter button. Currently there is no exposed way to toggle
the Sidebar off - wonder if we still need it?
2021-02-05 18:58:22 +10:00
Damien Elmes
bd730a012e replace sidebar filter shortcut with existing Filter button shortcut 2021-02-05 14:32:56 +10:00
RumovZ
16462941ab Remove actionCreateFilteredDeck2 and use modifier 2021-02-02 09:29:09 +01:00
RumovZ
8065e73ef8 Add cross links for second dyndeck filter 2021-02-01 19:10:05 +01:00
RumovZ
0949cdc73e Rename "Filtered Deck from Current Filter" 2021-02-01 12:09:37 +01:00
RumovZ
6b1d5f14e8 Change filtered-deck shortcut in browser to Ctrl+G 2021-02-01 11:59:16 +01:00
RumovZ
011b562038 Add current-filter-to-filtered-deck action 2021-01-31 23:16:49 +01:00
RumovZ
9bfe8e3840 Remove search button and reword search bar hint 2021-01-30 19:23:40 +01:00
Damien Elmes
f1a4c57dc1 restore shortcuts that got lost in Fluent conversion
They were missed as they were not marked 'notr'.

https://forums.ankiweb.net/t/home-and-end-keys-no-longer-work-in-browse-window/6524
2021-01-16 10:03:29 +10:00
Henrik Giesel
28278fcc40 Remove preview button from browser.py top bar 2021-01-09 23:25:56 +01:00
Damien Elmes
11dca54471 update designer references 2020-11-17 19:55:18 +10:00
Damien Elmes
aea0a6fcc6 initial Bazel conversion
Running and testing should be working on the three platforms, but
there's still a fair bit that needs to be done:

- Wheel building + testing in a venv still needs to be implemented.
- Python requirements still need to be compiled with piptool and pinned;
need to compile on all platforms then merge
- Cargo deps in cargo/ and rslib/ need to be cleaned up, and ideally
unified into one place
- Currently using rustls to work around openssl compilation issues
on Linux, but this will break corporate proxies with custom SSL
authorities; need to conditionally use openssl or use
https://github.com/seanmonstar/reqwest/pull/1058
- Makefiles and docs still need cleaning up
- It may make sense to reparent ts/* to the top level, as we don't
nest the other modules under a specific language.
- rspy and pylib must always be updated in lock-step, so merging
rspy into pylib as a private module would simplify things.
- Merging desktop-ftl and mobile-ftl into the core ftl would make
managing and updating translations easier.
- Obsolete scripts need removing.
- And probably more.
2020-11-01 14:26:58 +10:00