#[repr(C)]pub enum StyleAppRegion {
NoDrag = 0,
Drag = 1,
}Expand description
Whether dragging this element moves the WINDOW — azul’s app-region.
Modelled on Electron’s -webkit-app-region, and accepted under both
-azul-app-region and -webkit-app-region so existing CSS ports over
unchanged.
.titlebar { -azul-app-region: drag; }
.titlebar button { -azul-app-region: no-drag; }This is what lets an application turn window decorations off and draw its own title bar without losing what a native one does: drag to move, double-click to maximize.
It does NOT cascade. A drag region names the exact element that is
draggable, and inheriting it would make every button, label and icon inside
a title bar drag the window instead of doing its own job — which is the bug
no-drag exists to undo in Electron. Here the default simply never
propagates, so children opt IN rather than out.
Variants§
NoDrag = 0
Normal content: the element handles its own input.
Drag = 1
Dragging this element moves the window; double-clicking it toggles maximize/restore.
Trait Implementations§
Source§impl Clone for StyleAppRegion
impl Clone for StyleAppRegion
Source§fn clone(&self) -> StyleAppRegion
fn clone(&self) -> StyleAppRegion
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more