mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-10 20:36:38 +00:00
Add support for mapping image properties
This exposes a slint.Image class, which has a load_from_path class method as well as size/width/height properties. cc #4202
This commit is contained in:
parent
9aa931f1f8
commit
93efd74e24
6 changed files with 97 additions and 3 deletions
|
@ -1,6 +1,7 @@
|
|||
// Copyright © SixtyFPS GmbH <info@slint.dev>
|
||||
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.1 OR LicenseRef-Slint-commercial
|
||||
|
||||
mod image;
|
||||
mod interpreter;
|
||||
use interpreter::{ComponentCompiler, PyDiagnostic, PyDiagnosticLevel, PyValueType};
|
||||
mod errors;
|
||||
|
@ -28,6 +29,7 @@ fn slint(_py: Python<'_>, m: &PyModule) -> PyResult<()> {
|
|||
.map_err(|e| errors::PyPlatformError(e))?;
|
||||
|
||||
m.add_class::<ComponentCompiler>()?;
|
||||
m.add_class::<image::PyImage>()?;
|
||||
m.add_class::<PyValueType>()?;
|
||||
m.add_class::<PyDiagnosticLevel>()?;
|
||||
m.add_class::<PyDiagnostic>()?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue