Turn message about inability to embed images into a warning for now
We do test our tutorial and in the CI build we enforce embedding,
so the icon paths there don't work.
This is a two-stage change, that first centralizes the file I/O code
path for on-disk and builtin:/ files. Secondly the resource embedding
pass now produces diagnostics if a file cannot be located.
For loading images that are included in the widget library that's included in turn
in the compiler binary, we need to create ImageInner::EmbeddedData
with &'static data and &'static file extension. The latter was
created using string interning, but we can also access the path of the
widget library data structure.
This allows compiling with SIXTYFPS_EMBED_RESOURCES=true and
images/fonts are embedded as inline variables.
Generated data is emitted into the header file as
inline uint8_t sfps_embedded_resources_123[789] = {
0x1, 0x2, 0x3,
};
- The Tab must be drawn before the contents, because the style draws something under the active tab,
outside of its region
- Also set the QStyleOptionTab::HasFrame flag since we are in the equivalent of a QTabWidget
We just need to adjust the priority of the default binding to be a high value
(eg, less priority) since the other values must always win.
This fixes the placeholder text color
The synthetic window we "inject" in the ensure_window() pass did not
have the window-background from the style applied. This is visible
for example when viewing something like
Rectangle { background: blue; border-radius: height / 2 }
When an animate foo {} declaration ends up creating an synthetic, invalid BindingExpression,
we still need to give it a span, to ensure that the diagnostics
produced later have *some* location set.
Fixes#515
This can be reproduced by deleting the last item of the printer queue in the
printer demo.
It is a regression showing up because we now emit the MouseExit event after
the mouse grab as released.
The problem is that we upgrade the weak item, and call geometry() on it.
Calling geometry will re-evaluate the layout cache which will re-evaluate
the model which will result in the component being removed and the cache
entry having less item than expected.
It is ok to simply return 0. for these layout location since the item will
disapear anyway.
A simple demonstrative test-case like
```
export App := Window {
VerticalBox {
LineEdit {
placeholder-text: "Enter your name here";
}
Button {
text: "Submit";
}
}
}
```
would not be wide enough - the place holder text would not be visible.
Like CSS image-rendering it has "smooth" and "pixelated" options.
Only OpenGL has been tested right now, have not tested WASM or Qt.
Right now the first instance of a @image-url() will set the scaling
for that specific image. The same image used from memory on the otherhand
can all have a different scaling property.