mirror of
https://github.com/slint-ui/slint.git
synced 2025-11-01 20:31:27 +00:00
C++: drops IntSize in favor of Size<T> (#922)
Fixes #909 Since we declare the struct in C++, we don't need to declare it in rust for cbindgen anymore, as long as we expose the Size2D type from euclid to the cbindgen_private namespace
This commit is contained in:
parent
7a735a48db
commit
753784c331
4 changed files with 31 additions and 32 deletions
|
|
@ -4,6 +4,7 @@
|
|||
#pragma once
|
||||
#include <string_view>
|
||||
#include "slint_generated_public.h"
|
||||
#include "slint_size.h"
|
||||
#include "slint_image_internal.h"
|
||||
#include "slint_string.h"
|
||||
#include "slint_sharedvector.h"
|
||||
|
|
@ -33,7 +34,7 @@ public:
|
|||
*/
|
||||
|
||||
/// Returns the size of the Image in pixels.
|
||||
IntSize size() const { return cbindgen_private::types::slint_image_size(&data); }
|
||||
Size<unsigned int> size() const { return cbindgen_private::types::slint_image_size(&data); }
|
||||
|
||||
/// Returns the path of the image on disk, if it was constructed via Image::load_from_path().
|
||||
std::optional<slint::SharedString> path() const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue