Commit graph

5126 commits

Author SHA1 Message Date
Simon Hausmann
d377a405d5 Prospective fix for linking error in the CI on Windows 2021-10-21 14:00:20 +02:00
Simon Hausmann
7b687d020c Fix compatibility of attach_peer on ModelHandle for older models
If the model doesn't implement `model_tracker` then we must
forward `attach_peer`.
2021-10-21 13:39:38 +02:00
Tobias Hunger
bb071fb92f cargo-audit: Remove indirect dependency on outdated time crate 2021-10-21 13:31:14 +02:00
Olivier Goffart
38c726ad4f We need to enable the png feature in the test backend 2021-10-21 13:10:22 +02:00
Olivier Goffart
68797dd0d4 Make sure to specify a high enough version for the rgb crate
There were security issues reported in previous version
2021-10-21 12:44:06 +02:00
Olivier Goffart
cc1205742d Move the image dependency down in the dependency tree
Corelib only need the image crate for doc test
the Qt bakcned don't use the image crate
2021-10-21 12:42:04 +02:00
Olivier Goffart
56d592100e Update a few dependencies 2021-10-21 12:24:48 +02:00
Simon Hausmann
8f2e4f487e Expose window-background in the native StyleMetrics
It's also in the non-native metrics
2021-10-20 17:41:02 +02:00
Simon Hausmann
2ba469cf2a Fix vector model example docs
Re-implement model_tracker instead of attach_peer.
2021-10-20 15:33:37 +02:00
Simon Hausmann
64ee1047c8 Simplify filters model
We don't need to re-implement attach_peer
2021-10-20 15:33:37 +02:00
Olivier Goffart
efd0aee6ec
Docs: remove the wording about the limitation that length does not track the model
Was solved in #599
2021-10-20 15:29:15 +02:00
Simon Hausmann
d420d5efd7 internal cleanup: Rename Property::set_dirty() to mark_dirty() 2021-10-20 15:25:28 +02:00
Simon Hausmann
a494eafa9c Make Property::set_dirty public
Property is not public API yet, there's not much value in playing hide and seek.

Co-authored-by: Olivier Goffart <ogoffart@sixtyfps.io>
2021-10-20 15:25:28 +02:00
Simon Hausmann
8596cca549 Fix model length tracking in the interpreter
Added the missing tracking call and fix the test to cover this properly.
2021-10-20 15:25:28 +02:00
Simon Hausmann
7d12fd7b4e Add support for tracking the length of a model in C++
Similar to the parent commit, the model tracks changes to the rows and
marks an internal property dirty. Since we have a base class this is a
little less intrusive.

cc #98
2021-10-20 15:25:28 +02:00
Simon Hausmann
63bf1af093 Add support for tracking the length of a model in Rust
This is done by exposing the ModelNotify to the caller via the new
ModelTracker trait, which has a function that allows "hooking" into the
dirty tracking of the size.

By extension, this also works in JavaScript.

cc #98
2021-10-20 15:25:28 +02:00
Olivier Goffart
e3d9abb1f7 ListView: Attempt to account for ListView with different item height
As an attempt to fix part of https://github.com/sixtyfpsui/cargo-ui/issues/10
2021-10-20 14:10:19 +02:00
Simon Hausmann
dec6c6ca51 Work around crash in Qt mac style when drawing scrollbars with invalid size
Fixes #595
2021-10-19 12:36:26 +02:00
Olivier Goffart
520db86495
Don't set no-frame explicitly to false.
False is already the default. No need to create a binding for it.
2021-10-18 13:41:05 +02:00
Olivier Goffart
6c677d13ac Document the new lenght properties on arrays
CC #580
2021-10-18 10:29:50 +02:00
James Blacklock
b409ee8cbe add license header to test case 2021-10-18 10:21:06 +02:00
James Blacklock
a3ba958197 remove cast 2021-10-18 10:21:06 +02:00
James Blacklock
36f4b32506 use shared pointer in cpp test 2021-10-18 10:21:06 +02:00
James Blacklock
1f0a5a6d7c fix formatting & cpp test case 2021-10-18 10:21:06 +02:00
James Blacklock
642e4b539a (hopefully) fix cpp generation 2021-10-18 10:21:06 +02:00
James Blacklock
25f14ab58c add test case 2021-10-18 10:21:06 +02:00
James Blacklock
745abe7019 handle array length in eval.rs 2021-10-18 10:21:06 +02:00
James Blacklock
cc4105e274 no need for InferredGenericType! 2021-10-18 10:21:06 +02:00
James Blacklock
ab665ba7b6 enable scripts to access the length of arrays 2021-10-18 10:21:06 +02:00
Olivier Goffart
9f3d02c319 Fixup previous commit
I got the condition wrong.

CC: #581
2021-10-15 17:20:10 +02:00
Olivier Goffart
19ce555d36 Don't hardcode ScrollArea's viewport size
The Flickable should already have sane default

But we need to make sure that the default binding don't override bindings
set with aliases. So we must use BindingsMap::set_binding_if_not_set which
sets the priority properly

Closes #581
2021-10-15 15:43:44 +02:00
Olivier Goffart
4436b422e5 Fix LineEdit.has-focus witht he native style
The property had the wrong name.

Also it is not a native-output
2021-10-14 15:34:25 +02:00
Olivier Goffart
bb4e5d8b55 Fix animation not starting when set from a callback
Two problems:
 - We were not marking the property as dirty, so dependent property would not
   update themselves
 - In the generated rust/c++ code, we would not call set_animated_value
2021-10-13 14:33:40 +02:00
Simon Hausmann
e3ce136106 Provide a modern introduction to the language reference 2021-10-13 10:38:05 +02:00
Olivier Goffart
ae5f19e60f
Fix typo 2021-10-13 09:44:56 +02:00
Simon Hausmann
f7193d2c53 Mention DYLD_FRAMEWORK_PATH in the Qt install docs
cc #566
2021-10-13 09:14:59 +02:00
Olivier Goffart
89c43bcd36 Workaround a rust-analyzer parse error in the generated code
Workaround for https://github.com/rust-analyzer/rust-analyzer/issues/10492
2021-10-12 21:13:07 +02:00
Olivier Goffart
5438f2650a ChangeLog entry for b74ab8969e 2021-10-12 15:01:35 +02:00
Olivier Goffart
b74ab8969e Implement Model::set_row_data for ModelHandle 2021-10-12 14:05:33 +02:00
Olivier Goffart
6b55821707 sixtyfps-build: don't print rerun-if-changed before the compilation error
Because otherwise it shows in the output in case of .60 compilation error
2021-10-12 14:05:33 +02:00
Simon Hausmann
912913d88d Fix sysinfo_macos.sh with mount points that have spaces in their path 2021-10-12 14:00:18 +02:00
Olivier Goffart
82a1cc1e83 Viewer: Added way to execute commands on callbacks 2021-10-12 13:58:52 +02:00
Simon Hausmann
15f2b19a95 Reorder sysinfo.60 once more
... to match the blog :-)
2021-10-12 11:35:38 +02:00
Simon Hausmann
64ec25f8e3 Clean up sysinfo.60 a little
Re-order the first properties and bindings for improved readability
2021-10-12 11:26:35 +02:00
Simon Hausmann
db60a5c4e1 Provide a slightly simpler language reference intro sentence 2021-10-12 10:30:46 +02:00
Simon Hausmann
e305f0e61c Fix sixtyfps::quit_event_loop() not exiting the event loop with Qt 6 on macOS
As per commit 0c02f133f3daee146b805149e69bba8cee6727b2 in qtbase (qt6),
quit() on QCoreApplication on macOS calls [NSApp terminate], which will
not return to main. The latter however is documented behavior, and
sixtyfps-viewer for example relies on it.
2021-10-11 16:55:32 +02:00
Olivier Goffart
f0f264a94a Document the ternary operator
CC: https://github.com/sixtyfpsui/sixtyfps/discussions/562
2021-10-11 10:49:45 +02:00
Olivier Goffart
acf2ef38a6 Don't put no-frame on the printer demo example
Prefer just put it in a random test instead
2021-10-11 10:30:31 +02:00
Robert Broketa
52ff84c0a1 Add changelog entry and move no-frame logic to cpp closure 2021-10-11 10:21:21 +02:00
Robert Broketa
938252d740 Not set bordeless/frameless mode if fullscreen 2021-10-11 10:21:21 +02:00