Make the code example demo narrow enough to fit on mobile (#4281)
I think it is a good example, and so I want to open it by default, but for that it needs to work on mobile. Hopefully this doesn't make it too cryptic <img width="415" alt="image" src="https://github.com/emilk/egui/assets/1148717/83d881fa-675e-4659-bd21-14abcb79fe46">
This commit is contained in:
@@ -52,6 +52,15 @@ impl Default for Demos {
|
||||
impl Demos {
|
||||
pub fn from_demos(demos: Vec<Box<dyn Demo>>) -> Self {
|
||||
let mut open = BTreeSet::new();
|
||||
|
||||
// Explains egui very well
|
||||
open.insert(
|
||||
super::code_example::CodeExample::default()
|
||||
.name()
|
||||
.to_owned(),
|
||||
);
|
||||
|
||||
// Shows off the features
|
||||
open.insert(
|
||||
super::widget_gallery::WidgetGallery::default()
|
||||
.name()
|
||||
|
||||
Reference in New Issue
Block a user