Commit graph

205 commits

Author SHA1 Message Date
Lukas Jung
b6171530ab replace text_input_position_for_byte_offset with text_input_cursor_rect_for_byte_offset 2022-03-28 10:07:07 +02:00
Simon Hausmann
033cf3721e Improve performance of opacity rendering
Avoid an opacity layer also in the case where it is applied to an element with no children.
2022-03-25 10:50:02 +01:00
Simon Hausmann
d6a569b8f8 Make rendering_metrics_collector a public module
... instead of pulling it entirely into the graphics module.
2022-03-24 21:20:28 +01:00
Simon Hausmann
f3b1ba6717 Collect statistics about the number of layers created in the GL and Qt renderer 2022-03-24 21:20:28 +01:00
Simon Hausmann
7b194b3f8c Rename FPSCounter to RenderingMetricsCollector
In preparation for collecting additional data
2022-03-24 21:20:28 +01:00
Simon Hausmann
fee858271c Fix the frame per second counter when using refresh_full_speed
After commit 575665994a we need to explictly schedule a repaint,
so that we draw and call `measure_frame_rendered`.
2022-03-24 14:49:20 +01:00
Simon Hausmann
caca532ada Released unused opacity layers 2022-03-23 17:37:27 +01:00
Simon Hausmann
4799ac9ce8 Don't create layers for opacity if it's not needed
More could be done towards this, but after literally seeing `opacity: 1;` in
.slint files, this seems worth doing.
2022-03-23 17:37:27 +01:00
Simon Hausmann
bef31d3169 Rename the layer boolean property to cache-rendering-hit 2022-03-21 20:22:43 +01:00
Simon Hausmann
849282a5a8 Don't render with layers if the layer property is false 2022-03-21 20:22:43 +01:00
Simon Hausmann
3a5181d31f Implement the Layer element for the Qt renderer 2022-03-21 20:22:43 +01:00
Simon Hausmann
a72aa9f799 Implement correct opacity for the Qt backend
Relates to #725
2022-03-18 16:35:26 +01:00
Simon Hausmann
75949e702c Prepare item rendering for children self-handling
The render function now takes a self_rc and returns a enum that permits
the implementation to handle rendering of children on its own and
thus make the caller skip that traversal step.
2022-03-18 15:42:49 +01:00
Lukas Jung
5495a8a701 add close request handling the qt backend 2022-03-17 08:51:00 +01:00
ogoffart
7b50791db4 Bump version number to 0.2.2 2022-03-10 08:48:33 +00:00
Lukas Jung
10dc49d294 don't draw lineEdit's focus ring if it is not enabled 2022-03-09 19:52:18 +01:00
Olivier Goffart
a85482e5a4 Fix selection and clicking on password fields 2022-03-02 21:55:49 +01:00
Olivier Goffart
70bc75c267 Use a better character for the password replacement char
Also don't use the byte len, but the char length.
It's not entierly correct, but it's good enough
2022-03-02 21:55:49 +01:00
Lukas Jung
dba6f11aec make SpinBox only focusable if enabled 2022-03-02 17:51:31 +01:00
Lukas Jung
7e21e16e2e change the qstyle of NativeSpinBox when rendering 2022-03-02 17:51:31 +01:00
Lukas Jung
c15b0e1486 Add focus and keyboard control to native/qt spinbox 2022-03-02 17:51:31 +01:00
Jared Moulton
b884a4ca19 Fix CI issues, remove references to replace-char, add a test, fix creation of string 2022-03-02 15:47:32 +01:00
Jared Moulton
fdbc8056b3 Add an option to draw *'s instead of characters for password fields 2022-03-02 15:47:32 +01:00
Simon Hausmann
39a2290221
Build the backends without rtti unless needed (#1001)
* Build the backends without rtti unless needed

Only the interpreter needs the rtti generated code.

 * Since `SlintElement` emits `#[cfg(feature = "rtti")]` tokens, each
 crate using `SlintElement` needs to have an `rtti` feature.
 * The selector gets backend specific rtti selection features, in order
   for the interpreter to enable them.
* Enable rtti when building the C++ project with the interpreter enabled
2022-03-01 18:37:07 +01:00
n-raine
beda5aca07 Add dark style detection support for GL backend
With the help of dark-light crate this is now exposed as dark-style
boolean property in NativeStyleMetrics.

Co-authored-by: Olivier Goffart <olivier@slint-ui.com>
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
2022-03-01 16:41:20 +01:00
Olivier Goffart
0ab86bc0d1 Fix initialization of NativeStyleMetrics with the interpreter 2022-03-01 11:28:55 +01:00
Olivier Goffart
f7a0fda86c
Send a MouseExit event when the mouse leaves the window
Fixes #989
2022-03-01 11:23:39 +01:00
Olivier Goffart
0dc188f328 Support for referring to other globals from globals
- We need to make sure that the initialization of global is in the right order.
 - In C++ and rust, we need to add accessor to the global component
 - There can be `PropertyReference::Global` in binding of globals
 - The interpreter globals need to hold references to the global they may depend on

Fixes #175
2022-02-28 10:14:34 +01:00
Olivier Goffart
6ecd9b5565 Upgrade qttypes
It now expose the flag via env variable, and allow to report
the reason why Qt was not found
2022-02-23 22:17:12 +01:00
Tobias Hunger
f3feab1267
Implement ptr_eq for VWeak and PartialEq for Items (#976)
* Implement ptr_eq for VWeaks

Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
2022-02-21 17:45:18 +01:00
Tobias Hunger
6795d3ee00
Introduce a FocusEventResult enum (#975) 2022-02-21 17:43:41 +01:00
Tobias Hunger
9fefc03bcc Reuse compliance cleanups (found by the new tooling) 2022-02-15 11:34:37 +01:00
Simon Hausmann
b65b66b871 Replace use of SFPS prefix in Qt wrapper functions 2022-02-14 16:17:55 +01:00
ogoffart
ecd0fb7ecd Bump version number to 0.2.1 2022-02-10 16:25:28 +01:00
Tobias Hunger
58e7caafb0
Fix LICENSES symlinks 2022-02-09 17:05:47 +01:00
Tobias Hunger
4230ac2572
Update copyright information to reflect name change
Also run resue over the codebase and fix complaints from that tool.
2022-02-09 10:27:47 +01:00
Olivier Goffart
1425ef63de Change the Url from sixtyfps.io to slint-ui.com
Also, change the URL of the logo in the docs
2022-02-08 08:52:46 +01:00
Olivier Goffart
00ff5e21a7 Update git repository URL 2022-02-08 08:26:21 +01:00
Tobias Hunger
de4e195280
Rename internal crates and add a README.md to them
The README.md contains the warning that used to be in lib.rs.

Add README.md files to all internal crates

... pointing to the official public crate to use instead.

Rename internal crates

fixup: README files

fixup rename
2022-02-07 13:12:48 +01:00
Tobias Hunger
03f78af987
Update some .60 to .slint 2022-02-02 17:29:40 +01:00
Tobias Hunger
1534f87e30
Change authors to Slint Developers 2022-02-02 16:21:34 +01:00
Tobias Hunger
2b55c488ca
Rename sixtyfps to slint in internal 2022-02-02 16:16:55 +01:00
Olivier Goffart
1586235478 Rename SixtyFPSWidget 2022-02-02 14:29:30 +01:00
Olivier Goffart
c00884d5a2 Rename SixtyFPSElement 2022-02-02 14:29:30 +01:00
Tobias Hunger
cc3994b58d
Rename rust API 2022-02-02 13:26:35 +01:00
Olivier Goffart
69908a32b6 Rename sixtyfps-viewer -> slint-viewer 2022-02-02 13:19:40 +01:00
Simon Hausmann
fcf59f3793 Rename the C++ header files 2022-02-02 13:07:26 +01:00
Simon Hausmann
7d297da2fc Rename the sixtyfps C++ namespaces 2022-02-02 12:11:27 +01:00
Simon Hausmann
c846633708 Rename C ffi functions 2022-02-02 11:12:34 +01:00
Simon Hausmann
b1a70f9e58 Rename the SixtyFPS CMake interface 2022-02-02 09:58:26 +01:00