Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
PhosphorShell::PanelWindow Class Reference

#include <phosphor-shell/include/PhosphorShell/PanelWindow.h>

Inheritance diagram for PhosphorShell::PanelWindow:
[legend]

Public Types

enum  Edge { Top , Bottom , Left , Right }
 Additional surface pixels rendered BEYOND the visible panel thickness, intended for the shell to draw a drop-shadow into. More...
 
enum  Layer { LayerBackground , LayerBottom , LayerTop , LayerOverlay }
 
enum  Alignment { Fill , Start , Center , End }
 
enum  KeyboardFocus { None , OnDemand , Exclusive }
 

Signals

void edgeChanged ()
 
void thicknessChanged ()
 
void shadowSizeChanged ()
 
void cornerCarveRadiusChanged ()
 
void screenChanged ()
 
void panelLayerChanged ()
 
void exclusiveZoneChanged ()
 
void exclusiveZoneEnabledChanged ()
 
void alignmentChanged ()
 
void panelLengthChanged ()
 
void marginsChanged ()
 
void keyboardFocusChanged ()
 

Public Member Functions

 PanelWindow (QQuickItem *parent=nullptr)
 
 ~PanelWindow () override
 
Edge edge () const
 
void setEdge (Edge edge)
 
int thickness () const
 
void setThickness (int thickness)
 
int shadowSize () const
 
void setShadowSize (int size)
 
int cornerCarveRadius () const
 
void setCornerCarveRadius (int radius)
 
QScreen * screen () const
 
void setScreen (QScreen *screen)
 
Layer panelLayer () const
 
void setPanelLayer (Layer layer)
 
int exclusiveZone () const
 
void setExclusiveZone (int zone)
 
bool exclusiveZoneEnabled () const
 
void setExclusiveZoneEnabled (bool enabled)
 
Alignment alignment () const
 
void setAlignment (Alignment alignment)
 
int panelLength () const
 
void setPanelLength (int length)
 
QMargins margins () const
 
void setMargins (const QMargins &margins)
 
KeyboardFocus keyboardFocus () const
 
void setKeyboardFocus (KeyboardFocus focus)
 

Member Enumeration Documentation

◆ Alignment

Enumerator
Fill 
Start 
Center 
End 

◆ Edge

Additional surface pixels rendered BEYOND the visible panel thickness, intended for the shell to draw a drop-shadow into.

The layer-shell surface size = thickness + shadowSize on the edge-perpendicular axis; the exclusiveZone advertised to the compositor stays at thickness so other windows don't reserve the shadow area. The shader is responsible for actually rendering the shadow in that extra strip — PanelWindow only hands it the surface space. Radius (logical pixels) of the concave quarter-arc carved into each corner of the visible panel where the panel meets the desktop area. 0 disables the carve. Larger values eat further into the panel, so reasonable choices are roughly 1/4 .. 1/3 of thickness. The carve is rendered by the shader as an alpha cutout — the panel's wl_surface remains rectangular and the compositor blends whatever's behind the carved region (wallpaper / other windows) into the cutout pixels, giving the "desktop flows around the panel" look popularised by Quickshell/Noctalia shells. Which corners are carved depends on the panel's edge: Top → bottom-left + bottom-right; the shader is responsible for matching the panel's orientation.

Enumerator
Top 
Bottom 
Left 
Right 

◆ KeyboardFocus

Enumerator
None 

Never receives keyboard focus (default — typical panel).

OnDemand 

Receives focus when the user clicks the surface.

Exclusive 

Holds focus exclusively; for lock screens etc.

◆ Layer

Enumerator
LayerBackground 
LayerBottom 
LayerTop 
LayerOverlay 

Constructor & Destructor Documentation

◆ PanelWindow()

PhosphorShell::PanelWindow::PanelWindow ( QQuickItem *  parent = nullptr)
explicit

◆ ~PanelWindow()

PhosphorShell::PanelWindow::~PanelWindow ( )
override

Member Function Documentation

◆ alignment()

Alignment PhosphorShell::PanelWindow::alignment ( ) const

◆ alignmentChanged

void PhosphorShell::PanelWindow::alignmentChanged ( )
signal

◆ cornerCarveRadius()

int PhosphorShell::PanelWindow::cornerCarveRadius ( ) const

◆ cornerCarveRadiusChanged

void PhosphorShell::PanelWindow::cornerCarveRadiusChanged ( )
signal

◆ edge()

Edge PhosphorShell::PanelWindow::edge ( ) const

◆ edgeChanged

void PhosphorShell::PanelWindow::edgeChanged ( )
signal

◆ exclusiveZone()

int PhosphorShell::PanelWindow::exclusiveZone ( ) const

◆ exclusiveZoneChanged

void PhosphorShell::PanelWindow::exclusiveZoneChanged ( )
signal

◆ exclusiveZoneEnabled()

bool PhosphorShell::PanelWindow::exclusiveZoneEnabled ( ) const

◆ exclusiveZoneEnabledChanged

void PhosphorShell::PanelWindow::exclusiveZoneEnabledChanged ( )
signal

◆ keyboardFocus()

KeyboardFocus PhosphorShell::PanelWindow::keyboardFocus ( ) const

◆ keyboardFocusChanged

void PhosphorShell::PanelWindow::keyboardFocusChanged ( )
signal

◆ margins()

QMargins PhosphorShell::PanelWindow::margins ( ) const

◆ marginsChanged

void PhosphorShell::PanelWindow::marginsChanged ( )
signal

◆ panelLayer()

Layer PhosphorShell::PanelWindow::panelLayer ( ) const

◆ panelLayerChanged

void PhosphorShell::PanelWindow::panelLayerChanged ( )
signal

◆ panelLength()

int PhosphorShell::PanelWindow::panelLength ( ) const

◆ panelLengthChanged

void PhosphorShell::PanelWindow::panelLengthChanged ( )
signal

◆ screen()

QScreen * PhosphorShell::PanelWindow::screen ( ) const

◆ screenChanged

void PhosphorShell::PanelWindow::screenChanged ( )
signal

◆ setAlignment()

void PhosphorShell::PanelWindow::setAlignment ( Alignment  alignment)

◆ setCornerCarveRadius()

void PhosphorShell::PanelWindow::setCornerCarveRadius ( int  radius)

◆ setEdge()

void PhosphorShell::PanelWindow::setEdge ( Edge  edge)

◆ setExclusiveZone()

void PhosphorShell::PanelWindow::setExclusiveZone ( int  zone)

◆ setExclusiveZoneEnabled()

void PhosphorShell::PanelWindow::setExclusiveZoneEnabled ( bool  enabled)

◆ setKeyboardFocus()

void PhosphorShell::PanelWindow::setKeyboardFocus ( KeyboardFocus  focus)

◆ setMargins()

void PhosphorShell::PanelWindow::setMargins ( const QMargins &  margins)

◆ setPanelLayer()

void PhosphorShell::PanelWindow::setPanelLayer ( Layer  layer)

◆ setPanelLength()

void PhosphorShell::PanelWindow::setPanelLength ( int  length)

◆ setScreen()

void PhosphorShell::PanelWindow::setScreen ( QScreen *  screen)

◆ setShadowSize()

void PhosphorShell::PanelWindow::setShadowSize ( int  size)

◆ setThickness()

void PhosphorShell::PanelWindow::setThickness ( int  thickness)

◆ shadowSize()

int PhosphorShell::PanelWindow::shadowSize ( ) const

◆ shadowSizeChanged

void PhosphorShell::PanelWindow::shadowSizeChanged ( )
signal

◆ thickness()

int PhosphorShell::PanelWindow::thickness ( ) const

◆ thicknessChanged

void PhosphorShell::PanelWindow::thicknessChanged ( )
signal

The documentation for this class was generated from the following file: