Tobias Hunger
24a2021226
Janitor: Fix clippy::needless_borrow
2021-08-04 22:50:35 +02:00
Tobias Hunger
ce4727b2e8
Janitor: Fix clippy::single_char_pattern
2021-08-04 22:50:35 +02:00
Tobias Hunger
5cf23f102e
Janitor: Fix clippy::redundant_pattern_matching
2021-08-04 22:50:35 +02:00
Simon Hausmann
29f5853332
Provide sixtyfps::Window
by reference in the Rust API
...
This also removes Clone from the Window again, to avoid having to face
the question: Does cloning a window duplicate it on the screen?
2021-08-03 10:32:04 +02:00
Benoit Canet
f1f9ff63cf
importer: Fix build compilation errors.
...
A crate that disapeared was probably providing the
used trait.
Switch the transparency comparison code to use:
https://docs.rs/float-cmp/0.9.0/float_cmp/ .
Given I a not a graphic programmer the patch uses
value that seems meaningfull according to the doc
of the float_cmp crate.
Excerpt from the documentation:
"""For most cases, I recommend you use a smallish
integer for the ulps parameter (1 to 5 or so),
and a similar small multiple of the floating point’s
EPSILON constant (1.0 to 5.0 or so), but there are
plenty of cases where this is insufficient."""
Signed-off-by: Benoît Canet <benoit@nodalink.com>
2021-07-29 08:08:09 +02:00
Benoit Canet
b45aa8dcf6
importer: Remove spurious semicolumns.
...
These extras semicolumns were triggering
compiler warnings; get rid of them.
Signed-off-by: Benoît Canet <benoit@nodalink.com>
2021-07-29 08:08:09 +02:00
Simon Hausmann
235ce85edd
Fix warning about unused import
...
Accidentally missed in #347 , amends 742c1eddfd
2021-07-23 13:57:55 +02:00
Simon Hausmann
742c1eddfd
Fix alpha detection condition in the color presentation request
...
It needs to be not 1
Co-authored-by: Olivier Goffart <olivier@woboq.com>
2021-07-23 13:48:52 +02:00
Tobias Hunger
2cdc5848a2
Janitor: Replace float comparison dance with approx_eq from euclid
...
Sixtyfps uses euclid already, so let's use euclid for float comparisons
as well.
I changed the code to decide whether a number is a positive integer to
make do without a comparison along the way.
2021-07-23 13:48:52 +02:00
Tobias Hunger
27b42687fa
Janitor: Fix clippy::redundant_closure
2021-07-23 13:48:52 +02:00
Tobias Hunger
9539a53480
Janitor: Fix clippy::redundant_clone
2021-07-23 13:48:52 +02:00
Tobias Hunger
0405beed83
Janitor: Fix clippy::redundant_static_lifetimes
2021-07-23 13:48:52 +02:00
Tobias Hunger
c3e0324787
Janitor: Spelling/grammar fixes in comments
2021-07-23 13:48:52 +02:00
Olivier Goffart
a095d8322e
LSP: add a "Show preview" code lense
2021-07-22 09:19:41 +02:00
Olivier Goffart
0766ebbd0d
LSP: update the lsp-types crate version
2021-07-22 09:19:41 +02:00
Tobias Hunger
4bd8920ac4
Janitor: Fix clippy::declare_interior_mutable_const
2021-07-21 19:44:57 +02:00
mwaitzman
2d2afad670
polish to figma_import's README.md
2021-07-20 16:05:10 +02:00
Olivier Goffart
d7402be076
LSP: properly classify callback aliases in auto-complete
...
Otherwise the completion is wrong as it tries to complete
with `:` instead of `=>`
2021-07-15 11:10:05 +02:00
Tobias Hunger
5e2e8dac40
Janitor: Spelling fixes
2021-07-15 07:55:06 +02:00
Tobias Hunger
29039dac6d
Janitor: calling insert_str()
using a single-character string literal
...
This is clippy::single_char_add_str.
2021-07-15 07:55:06 +02:00
Tobias Hunger
37619b8918
Janitor: OPTION.as_ref().map(String::as_str)
== OPTION.as_deref()
...
This is clippy::option_as_ref_deref
2021-07-15 07:55:06 +02:00
Tobias Hunger
02557b0406
Janitor: Fix typos in comments
2021-07-15 07:55:06 +02:00
Tobias Hunger
024faa6322
Janitor: Use float comparison dance
...
Color values can be calculated, so do the full comparison dance instead
of doing the bitwise comparison.
2021-07-12 15:01:19 +02:00
Tobias Hunger
88b8634007
Janitor: Remove useless drop
...
This was dropping a referrence, which is a no-op. So remove this drop.
2021-07-12 15:01:19 +02:00
Tobias Hunger
dc51d4ccda
Use impl Default
instead of new()
constructors
2021-07-12 13:22:25 +02:00
Jocelyn Turcotte
f12abe1bec
LSP: Enable comment toggling in Sublime Text
...
It needs a .tmPreferences file to be able to know how to
generate comments.
https://sublime-text-unofficial-documentation.readthedocs.io/en/latest/reference/comments.html
2021-07-05 09:47:41 +02:00
Jocelyn Turcotte
7610d6302f
LSP: Update Sublime Text instructions for version 4
...
The showPreview workaround was only necessary in Sublime Text 3,
so remove it.
Version 3 is still used by some people but most future users will be
using Sublime Text 4.
2021-07-05 09:47:41 +02:00
Tobias Hunger
a5b61aa52b
Janitor: Fix spelling in error messages
2021-07-03 18:22:01 +02:00
Tobias Hunger
39984b27db
Janitor: Fix spelling in comments
2021-07-03 15:49:43 +02:00
Olivier Goffart
13bd828b96
Update license date
2021-07-02 15:55:54 +02:00
Olivier Goffart
9bf0c0d963
Fixup last commit
2021-07-02 12:52:56 +02:00
Olivier Goffart
7601c7e2eb
Updator: allow to update from 0.1.0
...
Even if there is nothing to do yet
2021-07-02 12:44:02 +02:00
Olivier Goffart
d51ea1429d
Online editor: check the url to load from a branch
2021-07-01 09:42:25 +02:00
Simon Hausmann
cec7dde6e6
Small typo fixes
2021-06-30 16:12:39 +02:00
Olivier Goffart
ccdcb61178
Rename the sixtyfps_compiler binary to sixtyfps-compiler
2021-06-29 14:21:44 +02:00
Olivier Goffart
98cec35080
Increase version numbers
2021-06-28 10:39:43 +02:00
Olivier Goffart
ffb0a9881b
Add command line arguments to the LSP
...
To set the include path, the style, or the backend
2021-06-09 17:15:49 +02:00
Olivier Goffart
6c1aa9bd8f
Add a pass to always have the top level as a Window
2021-06-09 11:02:55 +02:00
Olivier Goffart
715d38903f
Allow to omit the type of aliases
2021-06-07 10:48:09 +02:00
Olivier Goffart
1537a60712
LSP: auto-complete for the reserved property
...
Which includes the layout properties
2021-05-28 15:03:45 +02:00
Olivier Goffart
1c505edd09
Revert the change to depends on the public crate from our tools
...
We should probablt re-ecport the function from the interpreter, but one
shouldn't depends both on sixtyfps and sixtyfps-interpreter at the same
time
2021-05-25 15:53:49 +02:00
Simon Hausmann
73f647c2e1
Add the Rust equivalent of sixtyfps::invoke_from_event_loop
...
The same API exists in C++.
2021-05-25 15:53:49 +02:00
Rishabh Budhiraja
74727d953f
Renames viewer to sixtyfps-viewer and publishes it on crates.io ( #237 )
...
* Renames viewer to sixtyfps-viewer and publishes it on crates.io
* Maintain the directory name consistency
2021-05-22 08:34:50 +02:00
Olivier Goffart
91b43017ad
Fix build
2021-05-20 18:28:52 +02:00
Simon Hausmann
a7ce64657c
Restore source compatibility for drop-shadow-blur
...
Let's keep source compatibility and define `drop-shadow-blur` to be a radius.
The CSS spec says that the standard deviation is half of the radius.
We just need to scale again and increase the shadow rect to make sure that no borders are visible.
2021-05-20 12:14:05 +02:00
Simon Hausmann
6811f0e1b6
Fix sixtyfps-compiler aborting when using -f rust
...
Apply the same fix as in 6742241d34
2021-05-20 10:38:59 +02:00
Simon Hausmann
c08a8aa954
Improve drop-shadow-blur updater logic
...
* Catch drop_shadow_blur besides drop-shadow-blur
* Use a C style comment in case the binding is not at the end of the line
2021-05-20 08:50:02 +02:00
Simon Hausmann
136342023f
Add support for drop-shadow-blur type change to the syntax updater
...
Keep the code compiling with a visually still appealing result, but
add a comment that this may need visual review.
2021-05-20 08:50:02 +02:00
Olivier Goffart
73ddea74a8
Improve a bit LSP readme
2021-05-18 16:34:18 +02:00
Olivier Goffart
8ecc834333
LSP: forward the diagnostic from the preview to the editor
...
Because the preview might have more diagnostics.
2021-05-18 16:12:30 +02:00