-->
import Quickshell
Base class of Quickshell windows
QSWindow
can be used as an attached object of anything that subclasses Item.
It provides the following properties
window
- the QSWindow
object.contentItem
- the contentItem
property of the window.The background color of the window. Defaults to white.
WARNING
If the window color is opaque before it is made visible, it will not be able to become transparent later unless surfaceFormat.opaque is false.
The clickthrough mask. Defaults to null.
If non null then the clickable areas of the window will be determined by the provided region.
ShellWindow {
// The mask region is set to `rect`, meaning only `rect` is clickable.
// All other clicks pass through the window to ones behind it.
mask: Region { item: rect }
Rectangle {
id: rect
anchors.centerIn: parent
width: 100
height: 100
}
}
If the provided region’s intersection mode is Combine
(the default),
then the region will be used as is. Otherwise it will be applied on top of the window region.
For example, setting the intersection mode to Xor
will invert the mask and make everything in
the mask region not clickable and pass through clicks inside it through the window.
ShellWindow {
// The mask region is set to `rect`, but the intersection mode is set to `Xor`.
// This inverts the mask causing all clicks inside `rect` to be passed to the window
// behind this one.
mask: Region { item: rect; intersection: Intersection.Xor }
Rectangle {
id: rect
anchors.centerIn: parent
width: 100
height: 100
}
}
The screen that the window currently occupies.
This may be modified to move the window to the given screen.
Set the surface format to request from the system.
opaque
- If the requested surface should be opaque. Opaque windows allow
the operating system to avoid drawing things behind them, or blending the window
with those behind it, saving power and GPU load. If unset, this property defaults to
true if color is opaque, or false if not. You should not need to modify this
property unless you create a surface that starts opaque and later becomes transparent.NOTE
The surface format cannot be changed after the window is created.
If the window should be shown or hidden. Defaults to true.
Opaque property that will receive an update when factors that affect the window’s position and transform changed.
This property is intended to be used to force a binding update, along with map[To|From]Item (which is not reactive).