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:
Emil Ernerfeldt
2024-03-30 17:51:44 +01:00
committed by GitHub
parent 33221bd4dd
commit 1354c3e19a
3 changed files with 77 additions and 51 deletions
@@ -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()