Commit graph

607 commits

Author SHA1 Message Date
Olivier Goffart
8c6eb65f1c Few adaptations of the renamed viewer 2021-05-22 09:30:57 +02:00
Simon Hausmann
7de783bbe1 Remove unnecessary viewbox position 2021-05-21 19:51:00 +02:00
Simon Hausmann
e7bc91c804 Add support for specifying the viewbox of path elements 2021-05-21 19:51:00 +02:00
Olivier Goffart
22c631baf9 Only compile the qt_viewer example if Qt >= 5.15 2021-05-21 07:54:31 +02:00
Olivier Goffart
1f46fd05ec Allow the qt_viewer to compile if cmake finds qt, but not qttypes
This can happen when setting the SIXTYFPS_NO_QT env variable

cc #232
2021-05-21 07:45:38 +02:00
Simon Hausmann
b7ab299de0 Fix C++ iot-dashboard build with older CMake versions
... by excluding it from the build with <= 3.16 :-)

Also pin fmtlib to the latest release, instead of master - to be on
the safe side.

Fixes #232
2021-05-20 16:56:51 +02:00
Simon Hausmann
a7ce64657c Restore source compatibility for drop-shadow-blur
Let's keep source compatibility and define `drop-shadow-blur` to be a radius.
The CSS spec says that the standard deviation is half of the radius.

We just need to scale again and increase the shadow rect to make sure that no borders are visible.
2021-05-20 12:14:05 +02:00
Simon Hausmann
8d278faac2 Make the drop shadow more subtle in the slide puzzle
In the current upstream version it's very very subtle.
2021-05-20 09:02:45 +02:00
Simon Hausmann
bb7b301b10 GL backend: new box drop shadow implementation
This replaces the box gradient with a new implementation that
behaves like the HTML Canvas element, by applying a gaussian
blur to the alpha of the rectangle to shadow.

The drop-shadow-blur property is changed to be now just a "level", like
the HTML Canvas shadowBlur property, which is defined to be half of the
standard deviation of the gaussian blur to be applied.
2021-05-20 08:50:02 +02:00
Olivier Goffart
839e1acd53 iot-dashboard: use a Path to draw the pie chart
Somehow the Path element is not so easy to use
2021-05-19 00:27:42 +02:00
Olivier Goffart
24bafdb2f9 Some more comments to iot-dashboard 2021-05-18 16:55:07 +02:00
Olivier Goffart
efab8967d7 iot-dashboard: don't set the width/height 2021-05-18 13:59:21 +02:00
Simon Hausmann
25d0b604e9 Change the humidity in the iot dashboard to random values every four seconds 2021-05-18 13:07:26 +02:00
Olivier Goffart
223d489ba0 Fix the slide puzzle
It panics at runtime because of binding loop involving layout
2021-05-18 11:10:51 +02:00
Olivier Goffart
fbdbe69fe7 Window: make hight and width fixed size, preferred-* property set the initial size
Issue #227
2021-05-18 10:23:06 +02:00
Simon Hausmann
f7cb67d086 Fix build 2021-05-17 19:32:18 +02:00
Simon Hausmann
760a6ef6c5 Clean up the clock code a little bit 2021-05-17 17:44:43 +02:00
Simon Hausmann
50d2fa88c7 Some docs for the dashboard 2021-05-17 16:28:56 +02:00
Simon Hausmann
02c07de989 Split up the C++ dashboard a little 2021-05-17 16:14:26 +02:00
Simon Hausmann
e8f6dd0586 Remove debug output
Don't always print the generated code
2021-05-17 15:45:27 +02:00
Simon Hausmann
b0fdd9c264 Begin rework the C++ iot dashboard
Implement the Clock as a C++ widget that shows the current time
2021-05-17 15:43:42 +02:00
Simon Hausmann
e5919a9b1e Generate the main contents of the C++ dashboard dynamically from code 2021-05-17 11:56:18 +02:00
Simon Hausmann
906d1f4b95 Added boilerplate for C++ iot dashboard 2021-05-17 11:12:08 +02:00
Simon Hausmann
d52c18f1df Cleanup: Use a unique name for the C++ CMake projects 2021-05-17 10:52:01 +02:00
Simon Hausmann
952f07bbf6 Split the dashboard .60 files
This is in preparation for a C++ interpreter version
2021-05-17 10:49:24 +02:00
Olivier Goffart
bf6c1deb33 Printer demo: fix cyclic dependency on the layout
`width: height;` cannot be allowed for an item in a layout
2021-05-11 14:59:57 +02:00
Olivier Goffart
b463e3cca4 WIP refactor layout
This commit add support for the box layout
2021-05-11 14:59:57 +02:00
Olivier Goffart
eec09310a7 Fix license check 2021-05-07 18:59:01 +02:00
Olivier Goffart
65da9cb933 Some progress on the iot-dashboard demo 2021-05-07 18:54:28 +02:00
Olivier Goffart
07229a16f5 WIP iot-dashboard
A port of https://github.com/peter-ha/qskinny/tree/iot-dashboard/examples/iot-dashboard
2021-05-07 10:27:58 +02:00
Simon Hausmann
1265c73e01 Fix MSVC build
Include ctime for std::time_t
2021-05-04 15:35:27 +02:00
Simon Hausmann
eb1ba121a2 Fix the size of the check boxes in the settings page
In the first row the check box is smaller than elsewhere.
The standard height used for spin boxes and combo boxes is 32px, so check boxes should have the same.

Otherwise there are only labels on that layout row and those should have a flexible
height.
2021-04-30 15:58:33 +02:00
Simon Hausmann
02d598ee64 Make clicking on the more button in the printer queue navigate to the printer queue 2021-04-30 15:24:08 +02:00
Simon Hausmann
141c05410e Polish the combobox in the printer demo
Provide a highlight on hover
2021-04-30 15:11:40 +02:00
Simon Hausmann
8308855053 Modernize the memory game
Use the new clip property on Rectangles instead of the deprecated Clip element
2021-04-27 15:13:50 +02:00
Olivier Goffart
eab8f733fc Build the old printer C++ demo 2021-04-27 12:20:06 +02:00
Olivier Goffart
607ad5217f Printerdemo C++: add the logic for the queue 2021-04-27 10:42:40 +02:00
Olivier Goffart
0bb61cc1b3 Fix popup placmement and size with the qt backend 2021-04-26 17:29:06 +02:00
Simon Hausmann
d842760a41 Minor tweak to slide puzzle theme data structure
Use a brush instead of color as property type for those theme properties
that can be brushes.

This allows to use gradients for backgrounds for live demonstrations
2021-04-26 14:10:40 +02:00
Olivier Goffart
8ca0eb65b3 Better animation of the expanding of the printer queue 2021-04-26 11:22:36 +02:00
Olivier Goffart
f104a8f80d Printer demo: fix the print page layout 2021-04-26 10:42:46 +02:00
Olivier Goffart
97fe979e5b Printer demo: Small adjustments to the print screen 2021-04-26 08:59:32 +02:00
Olivier Goffart
d8ebd42712 GL backend: fix vertical alignment of text
Fix issue in
https://github.com/sixtyfpsui/sixtyfps/issues/207#issuecomment-825780094

For the purpose of alignment, we need to use the font height, not the actual
text height, because otherwise it does not look visualy centered if the
text does not have letters that goes under the baseline
2021-04-25 14:20:35 +02:00
Olivier Goffart
baebd27b60 Printerdemo: don't panic on wasm
because we would use unsupported time functions
2021-04-23 19:09:16 +02:00
Simon Hausmann
297eb02dd6 Fix the alignment of the text in the buttons of the printer demo
The top padding of 5 pixels that should center the image results in the
text element being placed too far down.

Instead, let the horizontal layout assign a full height to the image and text and
let each take care of the content alignment.

Fixes #207
2021-04-23 16:08:03 +02:00
Olivier Goffart
91ed04a72c Make length (still the default for all property) be the logical length
And a new `physical_length` is now the physical_length unit

Note: this does not change the runtime part yet
2021-04-21 17:15:19 +02:00
Simon Hausmann
378a8f3596 Fit the printer demo's home buttons easily on the raspberry pi screen
Minor tweak to the button spacing a little
2021-04-16 13:55:28 +02:00
Simon Hausmann
cb70f58990 Port the slide puzzle over to specifying the custom font in .60 2021-04-14 09:49:51 +02:00
Simon Hausmann
7773678e22 Simplify wasm "startup" code
Apply the simplification of 2398d00e6f to all
index.html files we use. An async function
can be called directly.
2021-04-14 09:36:33 +02:00
Simon Hausmann
e614fb3bb1 Remove manual plaster font loading for the slide puzzle wasm version
Since commit 727c9a19f7 the plaster font is included in the
wasm binary.
2021-04-14 09:35:19 +02:00