1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-01 14:20:04 -04:00

Draw separator between window title and its contents

This commit is contained in:
Emil Ernerfeldt
2020-04-19 23:51:38 +02:00
parent 388132ba93
commit 7f85b2623b
3 changed files with 41 additions and 13 deletions

View File

@@ -1,6 +1,6 @@
use std::sync::Arc;
use crate::{layout::Direction, mesher::Path, widgets::Label, *};
use crate::{layout::Direction, mesher::Path, widgets::*, *};
#[derive(Clone, Copy, Debug)]
pub struct WindowState {
@@ -88,6 +88,7 @@ impl Window {
// Show top bar:
contents_region.add(Label::new(self.title).text_style(TextStyle::Heading));
contents_region.add(Separator::new().line_width(1.0).extra(window_padding.x)); // TODO: nicer way to split window title from contents
add_contents(&mut contents_region);