61 lines
1.7 KiB
QML
61 lines
1.7 KiB
QML
import qs.config
|
|
import QtQuick
|
|
import QtQuick.Controls
|
|
import Quickshell
|
|
import Quickshell.Hyprland
|
|
import Quickshell.Widgets
|
|
|
|
Drawer {
|
|
id: control
|
|
dim: false
|
|
property bool focused: false
|
|
|
|
onVisibleChanged: {
|
|
focused = visible;
|
|
}
|
|
|
|
HyprlandFocusGrab {
|
|
active: control.focused
|
|
windows: [QsWindow.window]
|
|
onCleared: {
|
|
control.focused = false;
|
|
}
|
|
}
|
|
|
|
background: ClippingWrapperRectangle {
|
|
margin: 4
|
|
Component.onCompleted: {
|
|
if (control.edge == Qt.TopEdge) {
|
|
radius = 8;
|
|
} else if (control.edge == Qt.LeftEdge) {
|
|
topRightRadius = 8;
|
|
bottomRightRadius = 8;
|
|
} else if (control.edge == Qt.RightEdge) {
|
|
topLeftRadius = 8;
|
|
bottomLeftRadius = 8;
|
|
} else if (control.edge == Qt.BottomEdge) {
|
|
topLeftRadius = 8;
|
|
topRightRadius = 8;
|
|
}
|
|
}
|
|
color: Styling.theme.base300
|
|
|
|
Rectangle {
|
|
Component.onCompleted: {
|
|
if (control.edge == Qt.TopEdge) {
|
|
radius = 8;
|
|
} else if (control.edge == Qt.LeftEdge) {
|
|
topRightRadius = 8;
|
|
bottomRightRadius = 8;
|
|
} else if (control.edge == Qt.RightEdge) {
|
|
topLeftRadius = 8;
|
|
bottomLeftRadius = 8;
|
|
} else if (control.edge == Qt.BottomEdge) {
|
|
topLeftRadius = 8;
|
|
topRightRadius = 8;
|
|
}
|
|
}
|
|
color: Styling.theme.base100
|
|
}
|
|
}
|
|
}
|