Add per-Mount scrolling with shared paint and input clipping
Verify Tessera GUI / verify (push) Failing after 7m33s
Verify Tessera GUI / verify (push) Failing after 7m33s
This commit is contained in:
+10
-1
@@ -26,6 +26,10 @@ pub enum Kind {
|
||||
color: String,
|
||||
},
|
||||
Spacer(f32),
|
||||
Scroll {
|
||||
width: f32,
|
||||
height: f32,
|
||||
},
|
||||
Row,
|
||||
Column,
|
||||
Button,
|
||||
@@ -147,7 +151,7 @@ impl Data {
|
||||
pub fn is_container(&self) -> bool {
|
||||
matches!(
|
||||
self.kind,
|
||||
Kind::Row | Kind::Column | Kind::Button | Kind::Page
|
||||
Kind::Row | Kind::Column | Kind::Button | Kind::Page | Kind::Scroll { .. }
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -317,6 +321,9 @@ pub fn native_properties(data: &Data) -> Vec<(&'static str, Value)> {
|
||||
("radius", number(*radius)),
|
||||
("color", Value::Text(color.clone())),
|
||||
]),
|
||||
Kind::Scroll { width, height } => {
|
||||
fields.extend([("width", number(*width)), ("height", number(*height))])
|
||||
}
|
||||
Kind::Spacer(size) => fields.push(("size", number(*size))),
|
||||
_ => {}
|
||||
}
|
||||
@@ -375,6 +382,8 @@ pub fn apply_visual_property(data: &mut Data, name: &str, value: &Value) -> Resu
|
||||
crate::document::parse_color(value).map_err(|_| bad())?;
|
||||
color.clone_from(value);
|
||||
}
|
||||
(Kind::Scroll { width, .. }, "width") => *width = number()?,
|
||||
(Kind::Scroll { height, .. }, "height") => *height = number()?,
|
||||
(Kind::Rect { width, .. }, "width") => *width = number()?,
|
||||
(Kind::Rect { height, .. }, "height") => *height = number()?,
|
||||
(Kind::Rect { radius, .. }, "radius") => *radius = number()?,
|
||||
|
||||
Reference in New Issue
Block a user