forked from Shinonome/dots-hyprland
notifications: right click to expand, don't hide if hovered
This commit is contained in:
@@ -145,6 +145,12 @@ export default ({
|
|||||||
onMiddleClick: (self) => {
|
onMiddleClick: (self) => {
|
||||||
destroyWithAnims();
|
destroyWithAnims();
|
||||||
},
|
},
|
||||||
|
onSecondaryClick: (self) => {
|
||||||
|
expanded = !expanded;
|
||||||
|
notifTextPreview.revealChild = !expanded;
|
||||||
|
notifTextExpanded.revealChild = expanded;
|
||||||
|
notifExpandButton.child.label = `expand_${expanded ? 'less' : 'more'}`;
|
||||||
|
},
|
||||||
setup: (self) => {
|
setup: (self) => {
|
||||||
self.on("button-press-event", () => {
|
self.on("button-press-event", () => {
|
||||||
wholeThing.attribute.held = true;
|
wholeThing.attribute.held = true;
|
||||||
@@ -471,7 +477,7 @@ export default ({
|
|||||||
widget.add(notificationBox);
|
widget.add(notificationBox);
|
||||||
wholeThing.child.children = [widget];
|
wholeThing.child.children = [widget];
|
||||||
if (isPopup) Utils.timeout(popupTimeout, () => {
|
if (isPopup) Utils.timeout(popupTimeout, () => {
|
||||||
if (wholeThing) {
|
if (wholeThing && !wholeThing.attribute.hovered) {
|
||||||
wholeThing.revealChild = false;
|
wholeThing.revealChild = false;
|
||||||
Utils.timeout(userOptions.animations.durationSmall, () => {
|
Utils.timeout(userOptions.animations.durationSmall, () => {
|
||||||
if (wholeThing) {
|
if (wholeThing) {
|
||||||
|
|||||||
Reference in New Issue
Block a user