mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-27 12:29:41 +00:00
Add a constructor to Text and let the color default to black
We really shouldn't require specifying a color for every Text {} element just in order to see *some* text. For Rectangle OTOH transparent is a good default (and thus for Color), hence this change just to Text. Right now the constructor bit is also a bit repetitive, this could perhaps be folded into BuiltinItem to generate the ffi, default impl and forward to an init function if it exists.
This commit is contained in:
parent
dd8e487acc
commit
625cb6c6b8
10 changed files with 41 additions and 18 deletions
|
@ -359,6 +359,11 @@ Flickable::~Flickable()
|
|||
sixtyfps_flickable_data_free(&data);
|
||||
}
|
||||
|
||||
Text::Text()
|
||||
{
|
||||
sixtyfps_text_init(this);
|
||||
}
|
||||
|
||||
namespace private_api {
|
||||
template<int Major, int Minor, int Patch>
|
||||
struct VersionCheckHelper
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue