add debug paint to list example
@@ -18,7 +18,9 @@ use std::sync::Arc;
use druid::lens::{self, LensExt};
use druid::widget::{Button, Flex, Label, List, Scroll, WidgetExt};
-use druid::{AppLauncher, Color, Data, Lens, LocalizedString, UnitPoint, Widget, WindowDesc};
+use druid::{
+ theme, AppLauncher, Color, Data, Lens, LocalizedString, UnitPoint, Widget, WindowDesc,
+};
#[derive(Clone, Data, Lens)]
struct AppData {
@@ -35,6 +37,9 @@ fn main() {
right: Arc::new(vec![1, 2, 3]),
};
AppLauncher::with_window(main_window)
+ .configure_env(|env, _| {
+ env.set(theme::DEBUG_PAINT, true);
+ })
.use_simple_logger()
.launch(data)
.expect("launch failed");
