mirror of
https://github.com/kossLAN/dots.git
synced 2025-11-05 06:59:50 -05:00
put shell in subdir, and add nix package
This commit is contained in:
parent
c45c04e9ac
commit
f41ea4b1cb
100 changed files with 57 additions and 126 deletions
70
shell/bar/notifications/NotificationButton.qml
Normal file
70
shell/bar/notifications/NotificationButton.qml
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import Quickshell.Widgets
|
||||
import "../.."
|
||||
|
||||
Item {
|
||||
id: root
|
||||
required property var bar
|
||||
property var implicitSize: 0
|
||||
readonly property real actualSize: Math.min(root.width, root.height)
|
||||
|
||||
implicitWidth: parent.height
|
||||
implicitHeight: parent.height
|
||||
|
||||
NotificationCenter {
|
||||
id: notificationCenter
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
color: mouseArea.containsMouse ? ShellSettings.colors["primary"] : "transparent"
|
||||
radius: 5
|
||||
|
||||
anchors {
|
||||
fill: parent
|
||||
margins: 1
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: mouseArea
|
||||
hoverEnabled: true
|
||||
anchors.fill: parent
|
||||
onPressed: {
|
||||
if (notificationCenter.visible) {
|
||||
notificationCenter.hide();
|
||||
} else {
|
||||
notificationCenter.show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
implicitWidth: root.implicitSize
|
||||
implicitHeight: root.implicitSize
|
||||
anchors.centerIn: parent
|
||||
|
||||
layer.enabled: true
|
||||
layer.effect: OpacityMask {
|
||||
source: Rectangle {
|
||||
width: root.actualSize
|
||||
height: root.actualSize
|
||||
color: "white"
|
||||
}
|
||||
|
||||
maskSource: IconImage {
|
||||
implicitSize: root.actualSize
|
||||
source: "root:resources/general/notification.svg"
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
color: mouseArea.containsMouse ? ShellSettings.colors["inverse_primary"] : ShellSettings.colors["inverse_surface"]
|
||||
anchors.fill: parent
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: notification number overlay
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue