Simon Hausmann
f087cc18bc
Remove extern "C" functions from wasm module
...
We don't need these functions and their export. They account for ~20kb in
the optimized .wasm - plus JS glue code.
2021-02-26 17:04:49 +01:00
Simon Hausmann
d5d537b1ce
Remove redundant to_string() call
2021-02-17 15:28:58 +01:00
Simon Hausmann
3ba92bdc6d
Add API to the wasm interpreter to download and register fonts
2021-02-17 15:21:30 +01:00
Simon Hausmann
445ddd58d5
API cleanup
...
Remove the `application` infix from `register_application_font`, to
reduce the changes that it might be interpreted to be a function that
also changes the default font in all text elements.
2021-02-17 14:37:31 +01:00
Simon Hausmann
f7ab4625e4
Prospective build fix
...
Use the same to_string_lossy() code path on all platforms
2021-02-17 14:32:02 +01:00
Simon Hausmann
45fe6c3e8d
Add the ability to load application fonts by path
...
The viewer command line tool also gains the ability to specify them via `--app-font=/path/to/font.ttf` , which can be specified multiple times.
2021-02-17 14:16:52 +01:00
Olivier Goffart
9eac131ae5
Add the logo in the docs
2021-02-12 08:24:42 +01:00
Olivier Goffart
86d40ad5e0
Some warning fix in the CI
...
- re-enable Qt for the C++ part now that the download server is back up
- Use the proper way to set env variable on Windows
- Silent deprecated warning for alloc::LayoutError
- Silent warning in qt/lib.rs when Qt is not there
- remove LD_LIBRARY_PATH workaround as the install-qt-action is fixed
2021-01-22 17:58:53 +01:00
Olivier Goffart
9eedb730d2
Fix build when Qt is not available
2021-01-22 17:11:21 +01:00
Simon Hausmann
9e0927f324
Move the clipboard access from corelib to the backend
...
This way the backend doesn't need to depend on copypasta.
2021-01-22 15:25:06 +01:00
Simon Hausmann
5f265ffc09
Split up ComponentWindow::run() into show(), hide() and sixtyfps::run_event_loop()
...
This allows creating multiple windows for example, and it will allow for
showing windows in those tests that require a mapped window.
As a bonus, the run() function on generated components is not consuming
anymore.
2021-01-19 09:50:22 +01:00
Olivier Goffart
d65a655333
Fix Wasm build error and warnings
2021-01-15 15:23:17 +01:00
Olivier Goffart
f1ce103c7b
WIP: start splitting Window and PLatformWindow
2021-01-15 15:02:55 +01:00
Olivier Goffart
547b2a7f6e
Introduce Backend trait
...
Such that the font are properly registered when the GL backend is chosen at runtime
2021-01-15 12:20:32 +01:00
Olivier Goffart
a069ceae7f
Fix warning with wasm
2021-01-14 08:53:14 +01:00
Olivier Goffart
62150cba1a
Basic text input
2021-01-14 08:53:13 +01:00
Olivier Goffart
0b20d13401
Qt backend: Implement register_application_font_from_memory
2021-01-14 08:53:13 +01:00
Olivier Goffart
46dbb1ee9e
By default, enable the GL backend also on desktop
...
So it can be chosen with an env variable or if Qt is not available
2021-01-14 08:53:13 +01:00
Olivier Goffart
49c9881d10
fix compile
2021-01-14 08:53:13 +01:00
Olivier Goffart
531ff42973
WIP: Qt backend using Qt
2021-01-14 08:53:13 +01:00
Olivier Goffart
8a95b806c7
Strawman implementation of a combo box
2020-11-03 17:55:49 +01:00
Olivier Goffart
a82c23fc41
Add ability for the native style to export native Globals
2020-11-02 16:13:04 +01:00
Olivier Goffart
e4e601de83
Draw the frame properly around the native scrollview
2020-10-16 10:45:17 +02:00
Olivier Goffart
d57ad389e0
Default to the native style in the viewer if it is available
2020-10-14 14:51:47 +02:00
Olivier Goffart
3bdd71b36f
Start working on the Native ListView
...
Currently only the interpret part
2020-10-08 15:51:33 +02:00
Olivier Goffart
6662e1ff00
Proper Scrollbar on the native style
2020-09-28 18:13:13 +02:00
Olivier Goffart
6dd0d178a0
Rename ScrollArea to ScrollView
2020-09-28 10:52:29 +02:00
Olivier Goffart
315fd7a881
Start doing a ScrollArea element
...
Unfortunately something is wrong with the Qt style, it looks like the Qt style
does not respect the rect given for the sub components
Also Input is not handled yet.
2020-09-22 20:05:41 +02:00
Simon Hausmann
93a08c5207
Add a LineEdit widget to the ugly and native style
2020-09-18 18:54:37 +02:00
Simon Hausmann
02d18b09cf
Fix warning about x not needing to be mutable
2020-09-15 11:21:01 +02:00
Olivier Goffart
1cf6d81169
Impletment GroupBox with the Qt style
2020-09-02 17:05:28 +02:00
Olivier Goffart
9782d85fdb
Native style works with C++
2020-09-01 12:25:11 +02:00
Olivier Goffart
f1ad78bc25
Qt style support for the rust backend
...
Need to set the SIXTYFPS_STYLE=native env variable while compiling
2020-09-01 12:25:11 +02:00
Olivier Goffart
9d5f27db0b
Rename QtStyle to Native
2020-09-01 12:25:11 +02:00
Olivier Goffart
b27f64756e
In the Qt backend, having Qt is the default and not having it is the exception
...
Simplify the config
2020-09-01 09:58:25 +02:00
Olivier Goffart
6d41b1981d
Move the Qt style to a new backend: the Qt backend
...
Currently the Qt backend still redirect everything to the GL backend,
but the goal is to use QPainter and QWindow
This also adds a "default" backend, whose goal is to select the proper
backend at compile time
2020-08-31 17:26:04 +02:00