ErikReider / SwayNotificationCenter

A simple GTK based notification daemon for SwayWM
GNU General Public License v3.0
1.15k stars 59 forks source link

[Bug] floating-notifications have artefacts around #335

Closed fybx closed 7 months ago

fybx commented 7 months ago

Describe the bug A gray/black artefact is present around every .floating-notifications instance.

image

To Reproduce Steps to reproduce the behavior:

  1. Start a hyprland desktop session
  2. Set .floating-notifications { background: transparent; } in style.css
  3. Get a notification

Expected behavior The notifications must have clear borders.

Please provide logs if you're experiencing notification errors / bugs Not applicable.

Screenshots image

Desktop (please complete the following information):

Additional context

I have used GTK_DEBUG=interactive swaync to debug the layout and pinpointed the .background class to set the floating notification's backgrounds. I can change the colors, or set it to transparent. Even when set to transparent, the artefacts stay.


This SCSS file is transpiled to the style.css file for swaync-client.

/* Window behind control center and on all other monitors */
.blank-window {
    // Keeping it transparent for applying layerrule blur in hyprland
    background: transparent;
}

.control-center {
    background: $clrTrayBackground;
    border-radius: 24px;
    padding: $pxTrayInnerPadding;
}

.floating-notifications {
    background: transparent;
}

.background {
    background: transparent;
}

.notification-row {
    background: transparent;
}

And this is the hyprland.conf file to ignore transparent layers:

    layerrule = ignorezero, swaync-notification-window
ErikReider commented 7 months ago

Just like Vaxry said, the blur is blurring the notification shadows. Disable the shadows in the CSS file to fix this