maiself / gnome-shell-extension-invert-color

GNOME Shell extension for inverting the color of windows
MIT License
43 stars 24 forks source link

Option to invert window colors without decorations #9

Open kykc opened 5 years ago

kykc commented 5 years ago

It would be nice to have an option for inverting only window contents without decorations, it would make sense for people (like me) who use themes like Adwaita-Dark.

natask commented 5 years ago

I have looked into this and it is impossible to do with the method used to invert in this extension because the decorations and the actual window content are treated as one block. so implementing the feature you are requesting would require another method. one method I can think of is updating the gnome.css used to render the window but I don't know if that can be made specific to a window. I will look at some source code and search online for inspiration.

maiself commented 5 years ago

Modifying the theme CSS wouldn't be enough, as decorations are rendered by the window manager, which ignores any per app CSS. Worse, client side decorations, which are per app, may be rendered by different widget libraries. In short, there's no simple, noninvasive, reliable or consistent way to single out decorations to selectively apply an effect.

kevinjohncutler commented 5 years ago

Despite the window and its decorations being treated as one block, would it be possible to invert the color of just a subset of that block? If the height of the window titlebar is fixed and the height of the window is known, then it would be easy to define the rectangle covering just the window contents.