log_size_warnings for align and scroll
oops don't need this
@@ -104,6 +104,9 @@ impl<T: Data> Widget<T> for Align<T> {
bc.debug_check("Align");
let size = self.child.layout(layout_ctx, &bc.loosen(), data, env);
+
+ log_size_warnings(size);
+
let mut my_size = size;
if bc.is_width_bounded() {
my_size.width = bc.max().width;
@@ -137,3 +140,14 @@ impl<T: Data> Widget<T> for Align<T> {
self.child.paint_with_offset(ctx, data, env);
}
}
+
+fn log_size_warnings(size: Size) {
+ if size.width.is_infinite() {
+ println!("what");
+ log::warn!("Align widget's child has an infinite width.");
+ }
+
+ if size.height.is_infinite() {
+ log::warn!("Align widget's child has an infinite height.");
+ }
+}
\ No newline at end of file
