Commit graph

180 commits

Author SHA1 Message Date
Henrik Giesel
e895f85cbc Setup toggleHtmlEdit on editingArea 2021-06-17 17:08:33 +02:00
Henrik Giesel
c6cee3bf31 Connect HtmlEditButton to codable 2021-06-17 15:30:05 +02:00
Henrik Giesel
48c8f89a11 Display CodeMirror in editingArea 2021-06-17 14:44:03 +02:00
Henrik Giesel
96e549e0d4 Add codable element 2021-06-17 13:46:25 +02:00
hikaru-y
d6370d13bf Disable color picker buttons when a field is not focused 2021-06-11 23:36:06 +09:00
Damien Elmes
33cecaa618 use different toolbar size on Mac
see discussion on 8c8bf26488
2021-06-05 11:28:36 +10:00
Damien Elmes
8c8bf26488 try toolbar size of 1.85rem
https://forums.ankiweb.net/t/anki-2-1-45-alpha/10061/97
2021-06-04 15:11:34 +10:00
Henrik Giesel
973cd59b29 Make ColorPicker buttons halfwidth 2021-05-31 00:17:06 +02:00
Henrik Giesel
6d72e7bc49 Implement new ColorPicker 2021-05-30 22:58:40 +02:00
Henrik Giesel
93c0770cd0 Implement WithColorHelper.svelte 2021-05-30 21:44:05 +02:00
Henrik Giesel
794f9db637 Add new color icons 2021-05-30 20:09:09 +02:00
Henrik Giesel
054f96b726 Uniformly use variables to Button{Toolbar,Group} for setting button properties
Instead of using WithTheming around ButtonToolbar/ButtonGroup
2021-05-27 17:13:36 +02:00
Damien Elmes
3489257f41 update ts deps
- prettier's formatting has changed, so files needed to be reformatted
- dart is spitting out deprecation warnings like:

254 │   2: $spacer / 2,
    │      ^^^^^^^^^^^
    ╵
    bazel-out/darwin-fastbuild/bin/ts/sass/bootstrap/_variables.scss 254:6  @import
    ts/sass/button_mixins.scss 2:9                                          @use
    ts/components/ColorPicker.svelte 2:5                                    root stylesheet

DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div($grid-gutter-width, 2)
2021-05-26 09:37:40 +10:00
Henrik Giesel
ba1abf0353 Use min-{width,height} for legacy buttons 2021-05-25 20:29:42 +02:00
Henrik Giesel
e7f9eaf1ce Restructure legacy scss / remove button_mixin import 2021-05-25 13:57:09 +02:00
Henrik Giesel
5b6fbad5bb Base width/height off on --toolbar-size for legacy buttons 2021-05-25 13:29:55 +02:00
Matthias M
3d50972489 Restrict inversion to images 2021-05-24 19:46:51 +02:00
Matthias M
3ecc7add82 Adjust active:hover behaviour
so it behaves like Svelte buttons, when clicking and dragging the mouse away from the button.
2021-05-24 13:11:50 +02:00
Matthias M
ee1fbf2a8f Use !important instead of :not() selector
!important cannot be used with the radius mixin, so I had to state them explicitly.
2021-05-24 11:21:42 +02:00
Matthias M
afd6e47799 Merge branch 'ankitects:main' into main 2021-05-24 10:59:02 +02:00
Matthias M
a2980e04b0 Remove CSS variable button-bg again
The variable is not as useful as I thought, since night mode uses a gradient anyway (and day mode is simply white).
2021-05-23 19:39:57 +02:00
Matthias M
6cefa0f1bf Remove transition from .linkb to fix blinking 2021-05-23 15:55:22 +02:00
Matthias M
0063dcb3c8 Add CSS variable --button-bg
might be useful for add-on developers.
2021-05-23 01:18:00 +02:00
Matthias M
c612c41023 Make legacy buttons look like Svelte buttons
with extra night mode handling.
2021-05-23 00:50:02 +02:00
Matthias M
95cfd7e0b5 Invert legacy button content in night mode
for better visibility.
2021-05-22 22:40:21 +02:00
Henrik Giesel
6f31ab5990 Prefer event.which over event.{key,code}
It works better with alternative Latin-based keyboard layouts
2021-05-22 17:50:23 +02:00
Henrik Giesel
5cbda88605 Base shortcuts with letters no event.key, with symbols/numbers on event.code 2021-05-21 22:45:55 +02:00
Henrik Giesel
abf1418695 Switch to keyboard shortcuts based on event.key 2021-05-20 18:28:59 +02:00
Damien Elmes
4fc701eb1b fix fields/cards font size & too-large toolbar on high DPI Windows
- enable default_css on editor again, so that the html element
is set to the system font size. If this is bringing in unwanted styling,
maybe we can come up with a different solution that just adjusts the
fonts
- make toolbar size relative to html font size, instead of hard-coding
it
2021-05-20 13:15:17 +10:00
Damien Elmes
991695b7f6 use standard toolbar colors for legacy items 2021-05-19 19:58:12 +10:00
Damien Elmes
390379ed62 disable svelte-check on Windows for now 2021-05-19 11:45:02 +10:00
Henrik Giesel
30d246d74b WIP: Use our components in deckoptions sticky bar 2021-05-18 16:32:29 +02:00
Henrik Giesel
777d774545 Use StickyBar in deckoptions 2021-05-18 14:13:11 +02:00
Damien Elmes
2dab3f0487 disable broken svelte_check test on Windows for now
Likely caused by a lack of sandboxing on Windows, causing the generated
.d.ts files to be visible to svelte_check, and being picked up in
preference over the .svelte file.
2021-05-08 12:15:49 +10:00
Henrik Giesel
cd6599c301 Fix module name formatting 2021-05-07 02:14:54 +02:00
Henrik Giesel
1e5feffba0 Fix Preview tooltip 2021-05-07 02:04:44 +02:00
Henrik Giesel
8a558eb297 Fix unused CSS selector issue in graphs introduced by updating Svelte 2021-05-07 02:04:44 +02:00
Henrik Giesel
fbc9c8a250 Use any in toolbar.ts for using context as parameter 2021-05-07 02:04:44 +02:00
Henrik Giesel
8f2c5a0c1c Turn on editor:eslint 2021-05-07 02:04:44 +02:00
Henrik Giesel
147617dff2 Add copyright header 2021-05-07 02:04:44 +02:00
Henrik Giesel
17bca7be6e Add ts-expect-error for module import in EditorToolbar 2021-05-07 02:04:44 +02:00
Henrik Giesel
bb2fb8e9f5 Fix ButtonDropdown 2021-05-07 02:04:44 +02:00
Henrik Giesel
d92a0c44c7 Add lefttopbtns as AddonButtons 2021-05-07 02:04:44 +02:00
Henrik Giesel
d3bec1a584 Add ButtonToolbarItem as interface for modifying button groups 2021-05-07 02:04:44 +02:00
Henrik Giesel
55e8256f0e Clean up ButtonGroup and factor out extension logic 2021-05-07 02:04:44 +02:00
Henrik Giesel
dd99524ae0 Enable setting of PreviewButton and hiding of cloze button again 2021-05-07 02:04:42 +02:00
Henrik Giesel
0612c3428b Fix typing issues 2021-05-07 02:03:55 +02:00
Henrik Giesel
47edde0d00 Set tooltip for buttons correctly 2021-05-07 02:03:55 +02:00
Henrik Giesel
74dad42df3 Use ButtonGroupItem for all buttons in editor 2021-05-07 02:03:55 +02:00
Henrik Giesel
f724b45ae1 Add hiding functionality in ButtonGroup 2021-05-07 02:03:55 +02:00