Commit graph

118 commits

Author SHA1 Message Date
Simon Hausmann
8c477998dc Load the logo in the examples off the website
This will allow moving them out of the repo and also makes the urls shorter.
2020-11-25 09:34:47 +01:00
Olivier Goffart
3ae7c6e0b5 Hover effect 2020-11-24 18:09:32 +01:00
Simon Hausmann
d80868bbf4 Add support for font_weight to Text and TextInput
This allows implementing another sliding puzzle theme feature, the
boldness of the tile number text in the simple theme when the tile is in
the correct position. For the other themes the weight is constant and
it's bold.

More cleanup to follow later: unify the font handle and FontCacheKey
handling, improve the API to allow for the use of symbolic constants
(normal, bold, etc.) instead of the CSS number values.
2020-11-24 10:10:00 +01:00
Simon Hausmann
3d85e45ec3 Add support for source clipping to the Image element
This allows rendering only a sub-rectangle of the original image, which
we can use right away in the sliding puzzle demo.
2020-11-23 15:46:59 +01:00
Olivier Goffart
08fe5f6c72 Add a Clip 2020-11-20 15:45:45 +01:00
Olivier Goffart
183f300a85 Implement the temperature converter in the .60 code
A edited signal was required on the line edit
2020-11-03 18:23:37 +01:00
Olivier Goffart
4a182ef4d0 Layout alignment 2020-11-03 12:22:34 +01:00
Olivier Goffart
07589f3037 Document HoizontalLayout and VerticalLayout 2020-10-26 19:25:24 +01:00
Simon Hausmann
6aa292eac1 Change the names of the logical and physical pixel units
The logical pixels are now just called "px" and the less frequently
used physical pixels have the "phx" suffix.

The existing markup was adapted using the syntax updater and the
following patch:

    +    if node.kind() == SyntaxKind::NumberLiteral {
    +        if node.text().ends_with("lx") {
    +            return write!(
    +                file,
    +                "{}px",
    +                node.text().as_str().split_at(node.text().as_str().len() - 2).0
    +            );
    +        }
    +        if node.text().ends_with("px") {
    +            return write!(
    +                file,
    +                "{}phx",
    +                node.text().as_str().split_at(node.text().as_str().len() - 2).0
    +            );
    +        }
    +    }

Fixes #49
2020-10-16 07:19:40 +02:00
Simon Hausmann
9c23d9b571 Alternate fix for image loading in docs preview
Revert commit 9f488bba3b for now and
instead resort to an absolute url to the image. This way we
don't have to use the wrong base url.
2020-10-13 09:44:25 +02:00
Simon Hausmann
9f488bba3b Try to get the image loading work in the embedded doc preview
By specifying the CORS-friendly github raw url as base url for the interpreter,
we can load images using relative paths.

According to the inspector the image is loaded successfully,
so what seems to be left to fix is an event loop related issue.
2020-10-13 09:31:42 +02:00
Simon Hausmann
b3a591cef0 Small grammar fix 2020-10-12 21:27:01 +02:00
Simon Hausmann
7e0e7b43f0 Add support for calling focus() on TextInput elements
This allows activating text inputs in signal handlers connected for
example to buttons.

This implements parts of #55
2020-10-01 08:52:45 +02:00
Simon Hausmann
9ad8968529 Add support for the initial_focus synthetic property
Setting it will translate to a set_focus_item call in the constructor.

This implements parts of #55
2020-09-30 15:11:01 +02:00
Simon Hausmann
2da84fee46 Add a boilerplate TextInput item 2020-09-18 16:34:24 +02:00
Simon Hausmann
adec90e8d2 Ident all builtin elements by one level
Looks much nicer in the C++ docs :)
2020-09-03 09:48:53 +02:00
Simon Hausmann
8b45efd16d Put all builtin element names into blocks 2020-09-03 09:39:08 +02:00
Olivier Goffart
8a7afbc238 Documents the elements 2020-09-02 18:57:24 +02:00