core: layer deferred surfaces with draw priorities
This commit is contained in:
@@ -6,6 +6,13 @@ pub use gpui_native_utils::{StyledExt, h_flex, v_flex};
|
||||
/// A handler told to clean up after a dismissed surface.
|
||||
pub type DismissHandler = std::rc::Rc<dyn Fn(&mut gpui::App)>;
|
||||
|
||||
/// Deferred draw priority of window-modal surfaces; default layer 0 stays for in-flow chrome like resize handles.
|
||||
pub const DIALOG_LAYER: usize = 1;
|
||||
/// Deferred draw priority of floating panels, so controls inside a dialog open above it.
|
||||
pub const OVERLAY_LAYER: usize = 2;
|
||||
/// Deferred draw priority of passive notifications, so they stay visible over dialogs.
|
||||
pub const TOAST_LAYER: usize = 3;
|
||||
|
||||
/// A component that can be told which size to render at.
|
||||
pub trait Sizable: Sized {
|
||||
/// Sets the size.
|
||||
|
||||
Reference in New Issue
Block a user