Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make text and content opaque on a semi-transparent menu #295

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

quadpixels
Copy link

Hi, Compton,

I wrote some proof-of-concept code to make the text and icons on a transparent blurred window easier to read by making them opaque.

The code adds a series of conditional statements to the shader used for rendering window contents, just like the flag --glx-fshader-win switch does. The shader sets the alpha value to 1 unless the pixel is of the "background color" obtained from GTK, which in many cases are equal to the background color of menus. This makes the contents on a transparent blurred window easier to read, as is illustrated below:
Example 1

This is a proof of concept since it still contains many issues that have to be resolved but I do not know the solution right now.

  1. Without the knowledge on which pixels belong to the content and which belong to the background, the conditionals would fail to make the content 100% opaque if the content has the same color as the background.
  2. Due to the same reason, this approach does not work well with anti-aliased fonts.
  3. If content below a transparent menu/dock is updated, artifacts will appear on the transparent menu/dock.

Please let me know how this could be made more useful.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant