Commit graph

5155 commits

Author SHA1 Message Date
Olivier Goffart
ea104ed203 Revert "Change the version number in docs-preview.html"
This reverts commit 8fee7d6486.

Revert now that the release is done
2021-09-09 10:45:13 +02:00
Olivier Goffart
954dedf4f5 Fix publishing
the testing backend is not on crates.io, so the dev-dependency must not
have a version field
2021-09-09 09:27:31 +02:00
Olivier Goffart
8fee7d6486 Change the version number in docs-preview.html 2021-09-09 08:55:51 +02:00
Olivier Goffart
c56b965672 Update version number in docs 2021-09-09 08:54:19 +02:00
Olivier Goffart
559e1080d2 Change the date in the changelog 2021-09-09 08:45:37 +02:00
Simon Hausmann
e1a81155ff Update extension logo to updated SixtyFPS logo
Re-generated using https://www.gieson.com/Library/projects/utilities/icon_slayer/
2021-09-08 20:52:08 +02:00
Simon Hausmann
d8a39c8d6e gallery: Change the text of the textedit example
to something that might make more sense to read :-)
2021-09-08 18:52:07 +02:00
Olivier Goffart
dd2dae7143 Add some entries in the changelog 2021-09-08 17:48:38 +02:00
Simon Hausmann
e193792194 Update copy of the SixtyFPS logo
Unfortunately the rtd theme doesn't support the logo url yet in
our setup, so update this svg copy as the original was updated to
remove the space between "Sixty" and "FPS".
2021-09-08 17:31:47 +02:00
Simon Hausmann
1fd8c7236a Make it possible to disable the GL backend in the CMake build
Even if SIXTYFPS_BACKEND_GL is set to OFF, we would default to enabling
X11, which translates to enabling the x11 feature, which in turn
implicitly activates the GL backend. In addition, the interpreter Rust
API crate also enables the GL backend in its defeaults.

In order to make it possible to turn off the GL backend, three changes are necessary:

* The default backend no more selects a default :-). Instead the Rust
  API crate, Rust interpreter API crate and the CMake project define
  the same features and defaults.
* The C++ crate depends on the interpreter without its defaults (which enable GL)
* In CMake the X11 and Wayland features become dependent options, that
  are only show in the CMake configure UI if the GL backend is enabled.
  This way a GL-disabled build won't also pass --features x11.
2021-09-08 17:13:10 +02:00
Olivier Goffart
fafcbfde2c Fix panic when trying to access layout cache of destroyed items
This can be reproduced by deleting the last item of the printer queue in the
printer demo.
It is a regression showing up because we now emit the MouseExit event after
the mouse grab as released.
The problem is that we upgrade the weak item, and call geometry() on it.
Calling geometry will re-evaluate the layout cache which will re-evaluate
the model which will result in the component being removed and the cache
entry having less item than expected.

It is ok to simply return 0. for these layout location since the item will
disapear anyway.
2021-09-08 14:42:08 +02:00
Olivier Goffart
e8c1fccbbc Fix the ugly style not compiling 2021-09-07 12:35:19 +02:00
Simon Hausmann
e8803a604e Fix minimum size of line edit with placeholder text
A simple demonstrative test-case like

```
export App := Window {
    VerticalBox {
        LineEdit {
            placeholder-text: "Enter your name here";
        }
        Button {
            text: "Submit";
        }
     }
}
```

would not be wide enough - the place holder text would not be visible.
2021-09-07 11:57:31 +02:00
Simon Hausmann
1b1a9ef06a Add a test-case for the ctrl+a shortcut to select all text 2021-09-07 11:33:28 +02:00
Simon Hausmann
df4e06be98 GL backend: render the cursor also for an empty text input if requested 2021-09-07 11:33:28 +02:00
Simon Hausmann
17b20dd5c4 text input: Add support for ctrl+a to select all text
cc #474
2021-09-07 11:33:28 +02:00
Olivier Goffart
8d15bc1427 Parser: make the parentheses around if element optional
closes #466
2021-09-07 10:57:08 +02:00
Simon Hausmann
c142cd61b3 Janitor: bump usvg and resvg once more :) 2021-09-07 08:38:40 +02:00
Simon Hausmann
9a947553b7 Janitor: Bump glow and femtovg versions
femtovg also brings in the same glow version, so no duplicates here
2021-09-07 08:33:37 +02:00
Olivier Goffart
cbf22d494e TextEdit 2021-09-06 21:52:12 +02:00
Olivier Goffart
d35c92bdc2 Make tests/cases/text/default_color.60 not depend on the style 2021-09-06 21:52:12 +02:00
Olivier Goffart
42ffecad15 Properly send the exit event when releasing the grab
Might help to solve #456
2021-09-06 19:15:28 +02:00
Simon Hausmann
23eac421d6 Make the reuse_window() test more reliable
Always explicitly pick the testing backend for it, since it will create
a window in the rendering backend.
2021-09-06 15:56:59 +02:00
Simon Hausmann
7da24c40c3 Use the GL backend in the CI for node tests
In the CI we set SIXTYFPS_NO_QT=1 and this change removes the testing
backend from the nodejs tests, in order to fix #419 .
2021-09-06 15:56:59 +02:00
Simon Hausmann
8b5e29534f Upgrade fontdb
The new version splits the mmap feature out of the fs feature.
2021-09-06 15:41:52 +02:00
Olivier Goffart
56200fe296 Fixup previous commit 2021-09-06 14:59:19 +02:00
Olivier Goffart
b8c586e96e Qt backend Properly rebuild the c++ source code on changes 2021-09-06 14:58:27 +02:00
Simon Hausmann
4d3f08d954 Allow global singletons to have default callback handlers
It's already working, we just need to remove the error handling :-)

Fixes #467
2021-09-06 13:56:27 +02:00
Simon Hausmann
dd043fc51b Fix texture caching for images with the same source but different image-rendering properties
As tests/cases/examples/image_rendering.60 itself demonstrates, the png file
should be loaded into the CPU side image cache once, but the two textures
should be cached independently.

cc #465
2021-09-06 13:47:41 +02:00
Simon Hausmann
71cd4bb3f0 GL backend: clean up of window map state handling
Use std::cell:Ref/RefMut to reduce the indentation and make it easier to
see where the borrow occurs.
2021-09-06 13:15:06 +02:00
Simon Hausmann
2159ad5775 Restore test case
The changes in f8876fe2b2 were unintentional.
2021-09-06 13:09:57 +02:00
Olivier Goffart
4aeb9bcd08 Interpreter: fix comparison of enums
We need to normalize native enum to use dashes
2021-09-06 12:22:24 +02:00
Olivier Goffart
5b0c8cec5c Add a comment in the code
Normaly, fields od structure exposed to .60 need to be in lexicographic order
for themto work in C++ with agregate initialization, but since that field is not
in the .60 Struct, it needs to be last so it is default initilalized
2021-09-06 12:10:33 +02:00
Simon Hausmann
192652b78e Fix panic with viewer's --auto-reload feature with the GL backend
Improve the granularity of the borrow of the mapped window, to avoid
that when applying window properties we recurse into a borrow due to
the call for setting the geometry triggering a notify that borrows.
2021-09-06 11:55:22 +02:00
Simon Hausmann
7fb58b9334 Minor cleanup: unify two impl blocks for GraphicsWindow 2021-09-06 11:55:22 +02:00
Olivier Goffart
f8876fe2b2 Implement the image-rendering in the Qt backend
cc #465
2021-09-06 10:49:56 +02:00
Ryan Van Gilder
e7245cd0af cargo fmt and remove uneeded HorizontalLayout import 2021-09-06 10:03:51 +02:00
Ryan Van Gilder
80b230bdf1 Add image-rendering documentation 2021-09-06 10:03:51 +02:00
Ryan Van Gilder
4d1d0e73a4 Rename image-scaling to image-rendering to align with CSS 2021-09-06 10:03:51 +02:00
Ryan Van Gilder
4f76af6f35 Remove non-existent demo from Cargo.toml 2021-09-06 10:03:51 +02:00
Ryan Van Gilder
a03a27ae0d Add image-scaling property to Images to control how they are scaled
Like CSS image-rendering it has "smooth" and "pixelated" options.
Only OpenGL has been tested right now, have not tested WASM or Qt.
Right now the first instance of a @image-url() will set the scaling
for that specific image. The same image used from memory on the otherhand
can all have a different scaling property.
2021-09-06 10:03:51 +02:00
Olivier Goffart
6906475e22 Remove the unicode test
The GCC version on the CI is still too old

Also this fixes the CI not running the C++ driver tests
2021-09-05 09:29:00 +02:00
Olivier Goffart
619ce6c4f7 Struct exposed to .60 as struct need to be layed out in alphabetical order
because that's the order in which the C++ code generator pass the argument
to the agregate initialization
2021-09-05 09:29:00 +02:00
Olivier Goffart
dedc9b3b9b C++: Fix struct literal for builtin structs 2021-09-05 09:29:00 +02:00
Olivier Goffart
131d14058b Fix C++ generated code when the numbers are too big 2021-09-05 09:29:00 +02:00
Olivier Goffart
d47b679114 Fix panic of the syntax_tests 2021-09-05 09:29:00 +02:00
Olivier Goffart
a883ca0569 Optimize away Rectangle that serve no purpose
Rectangles which do not draw anything and have no x or y don't need to be in
the item tree, we can just remove them.
2021-09-05 09:29:00 +02:00
Olivier Goffart
ed24492db7 Only emit click when clicking and releasing the mouse within the TouchArea
Closes #455
2021-09-04 12:36:13 +02:00
Olivier Goffart
b075b40f23 Update resvg version 2021-09-04 10:50:20 +02:00
Olivier Goffart
f69ad502d6 Update rowan version 2021-09-04 10:50:06 +02:00