mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 14:21:16 +00:00
Rename Rectangle.color to Rectangle.background
Add support for built-in property aliases and rename `color` to `background` - in preparation for it also changing to type brush. Right now the alias is silent, a deprecation and overall change will come in a subsequent change.
This commit is contained in:
parent
c479fd132d
commit
1f091cb1c0
16 changed files with 250 additions and 131 deletions
|
@ -667,7 +667,7 @@ impl ItemRenderer for GLItemRenderer {
|
|||
}
|
||||
// TODO: cache path in item to avoid re-tesselation
|
||||
let mut path = rect_to_path(geometry);
|
||||
let paint = femtovg::Paint::color(rect.color().into());
|
||||
let paint = femtovg::Paint::color(rect.background().into());
|
||||
self.shared_data.canvas.borrow_mut().save_with(|canvas| {
|
||||
canvas.translate(pos.x, pos.y);
|
||||
canvas.fill_path(&mut path, paint)
|
||||
|
@ -705,7 +705,7 @@ impl ItemRenderer for GLItemRenderer {
|
|||
path.rounded_rect(x, y, width, height, border_radius);
|
||||
}
|
||||
|
||||
let fill_paint = femtovg::Paint::color(rect.color().into());
|
||||
let fill_paint = femtovg::Paint::color(rect.background().into());
|
||||
|
||||
let mut border_paint = femtovg::Paint::color(rect.border_color().into());
|
||||
border_paint.set_line_width(border_width);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue