Tobias Hunger
d543bc3a1d
Janitor: Fix clippy::assign_op_pattern
2021-07-23 13:48:52 +02:00
Tobias Hunger
d64291245e
Janitor: Fix clippy::len_zero
2021-07-23 13:48:52 +02:00
Tobias Hunger
8d83ce88d7
Janitor: Fix clippy::excessive_precision
2021-07-23 13:48:52 +02:00
Tobias Hunger
3e0534afea
Janitor: Fix clippy::needless_lifetimes
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
Tobias Hunger
b61dcc42b9
Janitor: Fix clippy::double_parens
2021-07-23 13:48:52 +02:00
Tobias Hunger
9e224f579c
Janitor: Fix clippy::comparison_to_empty
2021-07-23 13:48:52 +02:00
Tobias Hunger
2a6560b073
Janitor: Remove unecessary cast
...
Prefer a u8 literal over an i32 literal that is then cast to a u8
2021-07-23 13:48:52 +02:00
Tobias Hunger
67586b12e4
Janitor: Do float comparison dance in qt_window.rs
2021-07-23 13:48:52 +02:00
Simon Hausmann
4f13238ff5
Fix preview on rectangles with opacity or drop shadow
...
Instead of producing an error, produce just a warning that the effect won't
be visible on root elements.
2021-07-23 11:41:28 +02:00
Olivier Goffart
da6897f4c6
native style: Fix clipping in NativeListView
...
The Style is overriding the clip, so we need to set the system clip
to make sure that clips are combined.
2021-07-22 22:29:52 +02:00
Olivier Goffart
2447de3d1b
We should only set the height of the element in a repeater for the children of ListView
2021-07-22 18:18:58 +02:00
Olivier Goffart
6aa6dec9b4
Small simplification on the usages of ListView
...
Now that the height computation is done properly
2021-07-22 17:29:53 +02:00
Olivier Goffart
ff8f7930d2
ListView: fix default height of items
2021-07-22 17:13:36 +02:00
Olivier Goffart
a6d3b11bd9
Remove a test that don't pass (yet)
...
I thought i had fixed it, but apparently not.
More work is needed
2021-07-22 15:27:24 +02:00
Olivier Goffart
6a49024839
Fix date in license header in new file
...
I imported this file from an old file and it still had the previous year
2021-07-22 14:44:35 +02:00
Olivier Goffart
8743ff87ed
Consider that elements in a listview are part of a layout
2021-07-22 14:38:58 +02:00
Olivier Goffart
19ad14b6f2
C++: Fix assigning a @linear-gradient to a color property
2021-07-22 14:38:58 +02:00
Olivier Goffart
0a46b367e2
C++: fix creating a gradient from a const reference to a color
2021-07-22 14:38:58 +02:00
Olivier Goffart
c2433d0f0b
Fix panic when parsing linear-gradient with a trailing coma
2021-07-22 14:38:58 +02:00
Olivier Goffart
f7923bfb77
Fix an error ending by a period
...
Reword the error because we might not even have an identifier
2021-07-22 14:38:58 +02:00
Olivier Goffart
7e0136b11d
Fix panic when exiting the sixtyfps-viewer when a TextInput is focused
...
The viewer holds the component in a thread_local, so when it is being
dropped, thread_locals are already destroyed.
When an TexInput is focused, it holds a Timer for the blinking cursor,
so when that Timer gets drop'ed, we must not access the thread_local
2021-07-22 14:38:58 +02:00
Simon Hausmann
d6eb45b4f8
Regression: Fix missing window background
...
After commit 492af0f67c
the native class
name of "Window" changed to "WindowItem", so the string based check here
didn't match anymore. For consistency this match now uses the element
name instead, like in other places in the compiler.
2021-07-22 13:02:04 +02:00
Olivier Goffart
6265b7b9f6
Add a reference to cargo-ui in examples/README.md
2021-07-22 11:57:00 +02:00
Simon Hausmann
b8f208100c
Minor doc fix: Link to the run_event_loop function mentioned in the docs
...
The formatting is not a code block, but I could not figure out how to do
that. A link is still better IMO than a difference in formatting.
2021-07-22 10:55:13 +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
Simon Hausmann
8658e50e27
Fix typo
2021-07-22 09:04:55 +02:00
Simon Hausmann
3146fb7764
internal cleanup: Remove the sixtyfps::testing::HasWindow trait
...
and replace it with the internal, re-exported WindowHandleAccess
one.
Strictly speaking, this is a breaking change. In practice the
returned type of this trait was in `sixtyfps::re_exports`, so any
public use is questionable :)
2021-07-21 20:33:02 +02:00
Simon Hausmann
eaddbe664e
internal cleanup: Rename ComponentWindow to WindowRc
...
That's all it is nowadays, it's a wrapper around Rc<Window>. It's not an
alias because we need to also "wrap" it to C++ via cbindgen, but that's
about it.
2021-07-21 20:33:02 +02:00
Tobias Hunger
57389c1731
Janitor: Fix remaining instance of clippy::redundant_clone
2021-07-21 19:44:57 +02:00
Tobias Hunger
aeebbb1d96
Janitor: Fix remaining clippy::option_map_unit_fn
2021-07-21 19:44:57 +02:00
Tobias Hunger
8b022cd917
Janitor: Fix remaining instance of clippy::iter_cloned_collect
2021-07-21 19:44:57 +02:00
Tobias Hunger
4bd8920ac4
Janitor: Fix clippy::declare_interior_mutable_const
2021-07-21 19:44:57 +02:00
Tobias Hunger
f02ab4d8c3
Janitor: Remove some unnecessary &
2021-07-21 19:44:57 +02:00
Tobias Hunger
a8b2aa2f2d
Janitor: Fix cspell complaining about toint
2021-07-21 19:44:57 +02:00
Tobias Hunger
56fea6e6c3
Janitor: Fix clippy::many_single_char_names
2021-07-21 19:44:57 +02:00
Simon Hausmann
1c285694d7
internal cleanup: Remove the use of ComponentWindow in the interpreter
2021-07-21 17:41:12 +02:00
Simon Hausmann
ef184f7f1a
internal cleanup: Remove the rest of the ComponentWindow API
...
Now it just remains a wrapper around the Rc, and it can soon be moved to
the API crate hopefully.
2021-07-21 17:41:12 +02:00
Simon Hausmann
77ea5b7a15
API cleanup: hide the rest of the ComponentWindow "internals"
2021-07-21 17:41:12 +02:00
Simon Hausmann
4c1d9dc03e
internal cleanup: Remove the poup functions from ComponentWindow
...
Use WindowHandleAccess instead. Also the clone()
isn't needed anymore since the function take a self reference instead of an Rc<Self> by value.
2021-07-21 17:41:12 +02:00
Simon Hausmann
e005058285
internal cleanup: remove free_graphics_resource from the public ComponentWindow API
...
Use the WindowHandleAccess backdoor instead.
2021-07-21 17:41:12 +02:00
Simon Hausmann
e4717824f8
internal cleanup: Prepare for more Window internals encapsulation
...
Hide access to the internals behind a trait that won't be re-exported
into the public Rust API. This allows removing as_any() again.
2021-07-21 17:41:12 +02:00
Simon Hausmann
e902395d09
Trim the Rust ComponentWindow API a little bit more
...
* Remove some public wrapper functions that are crate internal
2021-07-21 17:41:12 +02:00
Simon Hausmann
2553dd1459
Trim the Rust ComponentWindow API and implementation a little bit
...
* Remove the `new` function from the main impl and use the slightly
less visible From conversion trait
* Make the inner Rc<Window> pub(crate) instead of pub
* Instead, provide a public as_any() accessor that the Qt backend can use
2021-07-21 17:41:12 +02:00
Simon Hausmann
492af0f67c
Rename the implementation of the Window
item to WindowItem
...
If we were to add `sixtyfps:🪟 :Window` to the re_exports, then
this clashes. We might rename the former, but this is a cleaner naming
in any case.
Relates to #333
2021-07-20 17:50:17 +02:00
Olivier Goffart
b194c62c22
GL backend: Use the cache for the Window icon
2021-07-20 17:02:24 +02:00
Olivier Goffart
1360f1e26e
Added icon property to the Window element
2021-07-20 16:34:19 +02:00
Simon Hausmann
68626e27fb
internal cleanup: simplify free_graphics_resources trait signature
...
This allows then routing the call through window::Window's Deref impl
2021-07-20 16:19:45 +02:00