elementary / gala

Gala Window Manager for elementary OS and Pantheon
https://elementary.io
GNU General Public License v3.0
272 stars 76 forks source link

Blur Behind #1998

Open danirabbit opened 1 month ago

danirabbit commented 1 month ago

Problem

Shell elements are transparent or semi-transparent so that they blend into the desktop itself, but this sometimes creates issues with contrast: https://github.com/elementary/dock/issues/259

Proposal

A way to blur behind the Dock and Panel (when it has a background)

Prior Art (Optional)

Windows: b8AefxSmxXELW9BKkNo6vW-3702192291

macOS: macos-sequoia-recopie-iphone-3938195366

Chrome OS: MeetChromeOS_Intro

seifeldinio commented 1 month ago

I propose adding a light background color with 10% opacity and a backdrop filter with a 9px blur effect. This enhances visibility and maintains the aesthetic blending of shell elements with the desktop.

dock {
    background: rgba(255, 255, 255, 0.1); /* 👈 Light background with 10% opacity */
    border-radius: 9px;
    box-shadow:
        inset 0 -1px 0 0 rgba(255, 255, 255, 0.1),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.15),
        inset 1px 0 0 0 rgba(255, 255, 255, 0.035),
        inset -1px 0 0 0 rgba(255, 255, 255, 0.035),
        0 0 0 1px rgba(0, 0, 0, 0.4),
        0 1px 3px rgba(0, 0, 0, 0.1),
        0 3px 9px rgba(0, 0, 0, 0.15);
    margin: 9px;
    margin-top: 0;
    backdrop-filter: blur(9px); /* 👈 Blur effect */
}

Mockups

To demonstrate the effectiveness of this solution, I have created four mockups showcasing the Dock over different backgrounds and text:

  1. Text Background:
Above text
  1. Light Background:
Above light
  1. Mid Background:
Above mid
  1. Dark Background:
Above dark

These mockups show that the Dock is now clearly visible and provides sufficient contrast against various backgrounds.

I'd love to hear your feedback or comments!