Commit graph

24 commits

Author SHA1 Message Date
Tobias Hunger
a3b86690ff [reorg]: Move the rendering backends into internal 2022-01-31 16:00:50 +01:00
Tobias Hunger
bfca0e3573 Mass update copyright messages to be more REUSE compliant 2021-12-22 10:06:12 +01:00
Olivier Goffart
e4bd6bbfb8 Native style: respond to the StyleChange event
So that color scheme is updated when switching to the dark style, for example

Fixes #687
2021-11-29 17:18:23 +01:00
unc0
54ae34f9fb Set MSVC to use UTF-8 character sets on c++ source files,
so it won't throw error on `u"string"` when running in
other codepage, for example cp936.
Ref: https://docs.microsoft.com/en-us/cpp/build/reference/utf-8-set-source-and-executable-character-sets-to-utf-8
2021-11-17 19:35:12 +01:00
Simon Hausmann
f6f06a8ccb Fix compilation with Qt 6.2.0 and MSVC
Apply the same fix as woboq/qmetaobject-rs@fb6e8cda64
2021-09-30 15:45:14 +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
Olivier Goffart
58af765b07 Fix the qt backend always rebuilding
(because of one of the previous changes which renamed the file)
2021-08-06 21:48:38 +02:00
Olivier Goffart
43e07320a5 Fix comments and naming found in review in #355 2021-07-28 16:57:09 +02:00
Olivier Goffart
7821926002 Rust: defaults to the native style when Qt is available
This requires some gymnastics to get right as the information
need to be passed to the compiler despite having no direct dependency
between the compiler and the runtime or backends.
So use a file in the build directory to tell the default style

cc: #83
2021-07-28 16:57:09 +02:00
Olivier Goffart
13bd828b96 Update license date 2021-07-02 15:55:54 +02:00
Olivier Goffart
7f117829f2 Display a warning if Qt is older than 5.15
cc #232
2021-05-20 18:28:52 +02:00
Olivier Goffart
2e09a58fd7 Use the qttypes crate 2021-04-20 12:41:44 +02:00
Simon Hausmann
4cbcf2611f Fix recurring C++ timers
* sixtyfps_timer_start needs to *take* the timer id out of the Rust
  timer to avoid that the subsequent drop stops the timer again
* For the Qt event loop, call `timer_event()` once before entering
  QCoreApplication::exec(), to schedule any timers that were started
  beforehand.
* Added a way to quit the event loop gently, in order to use that
  from the C++ unit test.
2021-03-25 20:07:12 +01:00
Simon Hausmann
f5fb0bf297 Prospective Qt linkage fix for macOS
Try adding an LC_RPATH command to the cdylib that we're building (for example libsixtyfps_cpp.dylib),
to fix linkage against Qt, which uses `@rpath/QtCore.framework/XXX` for inter-library linkage dependencies.
2021-03-17 14:02:33 +01:00
Olivier Goffart
0aa3561a55 Fix build.rs not being re-run when the cpp! code changes 2021-01-28 17:23:10 +01:00
Olivier Goffart
e37ac6e45f Add a documentaion on how to install Qt
And link from it from the warning
2021-01-24 14:06:14 +01:00
Olivier Goffart
916ad96ea5 Allow to disable Qt build with an env variable 2021-01-22 13:28:08 +01:00
Simon Hausmann
3dba030243 Fix wasm build
This re-enables the wasm port through femtovg's wasm support. The Roboto
is included as a generic fallback font.
2021-01-14 08:53:13 +01:00
Simon Hausmann
0c2a557b95 Remove QtQuick and QtQml linkage for the Qt backend
We don't need these libraries at the moment.
2020-09-11 08:18:07 +02:00
Simon Hausmann
ca16b6c082 Clean up the QImage setup for rendering with QStyle
Centralize the code in one function, so that we can later change it to
deal with different device pixel ratios. The function returns an image
and a QRect that contains the logical size.
2020-09-09 18:55:33 +02:00
Olivier Goffart
27288c65e2 fixup previous commit
I had inverted the condition to test locally
2020-09-01 10:15:31 +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
Renamed from sixtyfps_runtime/qt_style/build.rs (Browse further)