Add the ability to specify a level when creating windows
This lets some windows stay on top of others, independently of whether the application is in the foreground.
This commit is contained in:
parent
c1f448d8a8
commit
1c9c7ef7ae
4 changed files with 31 additions and 12 deletions
|
@ -142,6 +142,7 @@ pub struct WindowOptions<'a> {
|
|||
pub bounds: WindowBounds,
|
||||
pub titlebar: Option<TitlebarOptions<'a>>,
|
||||
pub center: bool,
|
||||
pub level: WindowLevel,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
|
@ -165,6 +166,12 @@ impl Default for Appearance {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
pub enum WindowLevel {
|
||||
Normal,
|
||||
PopUp,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum WindowBounds {
|
||||
Maximized,
|
||||
|
@ -276,6 +283,7 @@ impl<'a> Default for WindowOptions<'a> {
|
|||
traffic_light_position: Default::default(),
|
||||
}),
|
||||
center: false,
|
||||
level: WindowLevel::Normal,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue