Guake / guake

Drop-down terminal for GNOME
https://guake.github.io
GNU General Public License v2.0
4.43k stars 575 forks source link

High contrast window border #1933

Open Lowrida opened 3 years ago

Lowrida commented 3 years ago

I don't know if it is a bug or on purpose, but i noticed that there is no shadow around guake's window frame.. for me that's very annoying! Because of hours of welding in my past i have a slight contrast problem with my eyes and i sometimes can't see the edge of a window. That's why i hate flat themes!! :( I need my borders and shadows to see the depth! Is there a way to get at least a shadow?

Schermafdruk van 2021-10-17 17-08-33

Schermafdruk van 2021-10-17 17-15-32

mlouielu commented 3 years ago

Thank you for the report @Lowrida, accessibility is our top priority to make everyone can use Guake without problem.

I'll take some time to check some UI/UX guideline for this issue, can you also give us more example about other app dealing with this issue?

Thanks.

mlouielu commented 3 years ago

It is possible to add border by the CSS, e.g.

Adiwita

Selection_79d59_2021_10_18_12_13_18

Adiwita w/ dark variant

Selection_ad684_2021_10_18_12_12_58

Davidy22 commented 3 years ago

The drop shadow is done by GTK to the window decorator. Guake disables the window decorator in guake.glade on line 51 to remove the extra pixels on the borders , and the title bar. To bring back the shadows without introducing undesired side effects, we'll need to figure out how to disable the title bar and set window border width to 0 on the base window. Or we could keep those border pixels, maybe they're something we want? For quick demonstration purposes, you can swap the value on line 51 from False to True and see that the shadow is trivially restored, albeit with side effects. I'll see what gtk has for us in terms of more fine grained window controls.

Lowrida commented 3 years ago

I'll take some time to check some UI/UX guideline for this issue, can you also give us more example about other app dealing with this issue?

Thanks.

Thank you. At the moment i can't think of any other application that has the same problem. Mostly GTK apps that don't use the framework of the theme are a bit annoying to work with (like gedit), but i recently found out that with a /home//config/gtk-x.0/gtk.css i can add shadows! So i did and that helped me alot!! But Guake refuses to use these shadow settings.. And it does not have to be a shadow, but a 2px line would also be fine! Maybe as an option in settings..? But i prefer a shadow because it's so much nicer and clear to me which window has focus!

Btw, your example of adding borders, is that also in the css file mentioned above or do i have to put it in a guake.css or..?

mlouielu commented 3 years ago

I'll take some time to check some UI/UX guideline for this issue, can you also give us more example about other app dealing with this issue? Thanks.

Thank you. At the moment i can't think of any other application that has the same problem. Mostly GTK apps that don't use the framework of the theme are a bit annoying to work with (like gedit), but i recently found out that with a /home//config/gtk-x.0/gtk.css i can add shadows! So i did and that helped me alot!! But Guake refuses to use these shadow settings.. And it does not have to be a shadow, but a 2px line would also be fine! Maybe as an option in settings..? But i prefer a shadow because it's so much nicer and clear to me which window has focus!

Can you provide the css you have? It seems the shadow in your figure it set by your css, in my environment (X11 + i3wm) window will only have 2px border (e.g. nautilus, pcmanfm)

Btw, your example of adding borders, is that also in the css file mentioned above or do i have to put it in a guake.css or..?

I'm using GTK_DEBUG=interactive guake to open with GTK inspector, which we can insert CSS into it.

mlouielu commented 3 years ago

The drop shadow is done by GTK to the window decorator. Guake disables the window decorator in guake.glade on line 51 to remove the extra pixels on the borders , and the title bar. To bring back the shadows without introducing undesired side effects, we'll need to figure out how to disable the title bar and set window border width to 0 on the base window. Or we could keep those border pixels, maybe they're something we want? For quick demonstration purposes, you can swap the value on line 51 from False to True and see that the shadow is trivially restored, albeit with side effects. I'll see what gtk has for us in terms of more fine grained window controls.

TBH, I'm not familiar to window decoration, I don't know all the side effect of this option :(

I would prefer to add css file which provide more flexibility to us, and we don't need to deal with window decoration.

Lowrida commented 3 years ago

The theming part of linux can be a hassle and is in my opinion far from perfect.. gtk, qt, metacity.. i'm still learning what to edit and where! There is no unity! /home/user/config/gtk-x-0/gtk,css does not apply changes to guake i just found out. Btw i'm on Linux Mint Cinnamon 19.3 with Muffin as WM.

I added the gtk.css from my /home/user/.theme/Crux/gtk-3.0 folder. But there is also a gtk-3.20 folder with a gtk.css..

gtk.css.zip

Lowrida commented 3 years ago

...Guake disables the window decorator in guake.glade on line 51 to remove the extra pixels on the borders , and the title bar..... For quick demonstration purposes, you can swap the value on line 51 from False to True and see that the shadow is trivially restored, albeit with side effects. I'll see what gtk has for us in terms of more fine grained window controls.

I searched for guake.glade and found one in /usr/share/guake. But on line 51 if have no option to set a frame pixel...

Schermafdruk van 2021-10-18 13-59-24

Davidy22 commented 3 years ago

Finding the switches to turn off all the parts of window decoration that we don't need and then enabling it will give us native drop shadows that'll match the rest of the desktop regardless of what we do, which is nice because it'll auto-match the user's window shadow settings or the user theme. Drawing a line border ourselves may conflict with user default preferences on window borders, where using provided decoration would have just done it for us. Presumably, anyone who's looking for this feature will already have contrasting window borders on the rest of their desktop and the root reason why we have this issue is that Guake currently disables the desktop's window border styles and sticks out for doing so.

The file I'm looking at is this one in the repo. Not sure where it might be on your computer, but I'm testing it by changing the file and reinstalling from source.

Lowrida commented 3 years ago

The file you point to has 75 lines in it. My guake.glade has 361 in it... But my guess is you point to the source folder? There is the same one with indeed on line 51 the toggle for decoration. So change that and recompile?

[edit] I just recompiled and indeed i have a frame and shadow now, but also a titlebar. Looks a little weird, and i can drag the window now.. Fun thing is that resizing the windows with the mouse works again!

Schermafdruk van 2021-10-18 15-52-18

Davidy22 commented 3 years ago

Yeah, that's how I'm testing it.

Lowrida commented 3 years ago

Any idea if this has anything to do with it? And for what can i change 'none' to, to try? Or is this the settings window?

Schermafdruk van 2021-10-18 16-05-59

Lowrida commented 3 years ago

And a typo found.. ;)

Schermafdruk van 2021-10-18 16-11-45

Davidy22 commented 3 years ago

Prefs.glade is preferences, very unrelated. Copy editing is welcome in PRs

Lowrida commented 3 years ago

Copy editing is welcome in PRs

What do you mean by this?

Davidy22 commented 3 years ago

Changes to non-code text

Lowrida commented 3 years ago

And PR's is..? Public Relations? ;)

[edit] never mind, i guess that would be Public Releases

Davidy22 commented 3 years ago

Pull request

Lowrida commented 3 years ago

Ah ok.. sorry if i ask stupid questions, but i'm fairly new to github and how it all works.

Lowrida commented 2 years ago

Is there any progress? btw how do i know if there is a new version ready? Does guake alert me or..?

Davidy22 commented 2 years ago

We'll have a release tagged on this repo, and there'll be a post in the discussion forum. Tested window decorations some amount and still resolving placement issues.

Lowrida commented 1 year ago

I know it is a while back, but is this implemented?