1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 05:40:03 -04:00

Add button to collapse windows

This commit is contained in:
Emil Ernerfeldt
2020-05-17 12:26:17 +02:00
parent c79b28e3b0
commit f9bb9f71c4
8 changed files with 276 additions and 152 deletions

View File

@@ -72,6 +72,10 @@ impl Label {
}
}
pub fn font_height(&self, ui: &Ui) -> f32 {
ui.fonts()[self.text_style].height()
}
// TODO: this should return a LabelLayout which has a paint method.
// We can then split Widget::Ui in two: layout + allocating space, and painting.
// this allows us to assemble lables, THEN detect interaction, THEN chose color style based on that.