mate-desktop / mate-themes

Official themes for the MATE desktop
https://mate-desktop.org
GNU Lesser General Public License v2.1
76 stars 45 forks source link

the highlighting doesn't work while I press the tab key #156

Closed sc0w closed 7 years ago

sc0w commented 7 years ago

with the tab key, I can't see the highlighting on a lot of buttons, checkboxes, list views, etc etc

The result: it is impossible to work with mate only with keyboard (without mouse)

( mate 1.16 "traditional ok" theme )

I have tested with monitor preferences, pluma preferences...

raveit65 commented 7 years ago

If this info help you, on the master branch with the line you commented on #156 (comment) mate control center is fine on TOK ( outline-width: 1px; )

But the branch dev-keyboard-world have this line too

Yes, outlines is the only element which is working. But you should see the old image in master out of box. https://github.com/mate-desktop/mate-themes/blob/master/desktop-themes/TraditionalOk/gtk-3.0/gtk-widgets-img.css#L651 This indicates that something is wrong here.

raveit65 commented 7 years ago

TOK theme is updated in branch

@sc0w I think you won't like this :-)

PS: changes for TG theme are reverted, i will try to the same here as in TOK theme.

lukefromdc commented 7 years ago

Which buttons in BlackMATE are different than the ones in the logout dialog? The buttons in things like gtk3-widget-factory look the same to me, and toolbar buttons look different because they are styled to show only the icon at the rest state

raveit65 commented 7 years ago

In logout/shutdown dialog or pluma preferences you're using a border-image for button.default https://github.com/mate-desktop/mate-themes/blob/dev-keyboard-world/desktop-themes/BlackMATE/gtk-3.0/gtk-widgets-assets-dark.css#L388 but not for button.focus in ie. caja preferences, mate-appearance-properties and others. You can add button.focus add this point to make all highlighted buttons similar. ... but i didn't test this in all Mate applications. Maybe this causes some fallout. Btw. your fix commits aren't in dev-keyboard-world branch.

raveit65 commented 7 years ago

I guess the missing commits was a side effect of using 'git push -f' before doing a 'git pull', sorry for that. Should i add the changes to existing commit (rebase) or do you want commit again? The links to the commits are fine here in browser.

sc0w commented 7 years ago

@raveit65 thanks, my latest tests on TOK:

screenshot

this rectangle is not complete:

1monitor

but if I resize, is complete

2monitor

before (looks better) :

caja_before

later (looks worst):

caja_later


If I do left click mouse on the icons over the mate panel, it looks with outlines:

1panel

2panel

This doesn't happen on TOK

raveit65 commented 7 years ago

@sc0w

thanks, my latest tests on TOK: on "mate screenshot", "save" always have focus, like the button "unlock" on "mate screensaver"

You will find more applications where one button is always highlight (state focus). Ie. mate-at-properties or others. I think previous gnome devs had a reason to hardcode this in code. If you don't like this you need to change that in application code. Themes are working correct here. But for me it is OK that unlock button have always focus because this what you want to do in 99% of all cases ;-)

this rectangle is not complete:

application bug!

caja with left click mouse:

I can revert this but than you don't see when .caja-canvas-item:selected have focus. I don't like and i don't use this boring theme,.....i do what you want :-)

on Menta theme:

If I do left click mouse on the icons over the mate panel, it looks with outlines:

I don't see that with Menta theme here with gtk+-3.20, if i click on an icon the application opens. I will try to reproduce that with 3.22.

Btw. If you have a bit free time, can you please port caja-actions to GtkApplication? I've no clue to do that and the package is in debian. https://github.com/raveit65/caja-actions

lukefromdc commented 7 years ago

https://github.com/mate-desktop/mate-themes/commit/fce847aacdc23945660a77f45576745618b85540 brings back the BLACKMATE change to move focus outlines inside widgets. I'm guessing a forced update ate the first commit of this.

lukefromdc commented 7 years ago

https://github.com/mate-desktop/mate-themes/commit/b1b72812db41239884f3b5cbd016e831776c4b29 uses the button.default border instead of outlines for most focussed buttons. Toolbar buttons keep their outlines as they are borderless. Code borrowed from my own daily-use theme (UbuntuStudio_Legacy) so I should see any issues with this soon enough

raveit65 commented 7 years ago

@lukefromdc very nice

sc0w commented 7 years ago

@raveit65

I can revert this but than you don't see when .caja-canvas-item:selected have focus.

I have tested the branch dev-keyboard-world without this lines on desktop-themes/TraditionalOk/gtk-3.0/mate-applications.css :

 .caja-canvas-item:selected:focus {
     border-color: alpha(@theme_text_color, 0.6);
     border-style: dashed;
     border-width: 1px;
 }

and I see no difference using the tab key, only the dashed lines, I think it is unnecessary on this case and you can remove it

I don't like and i don't use this boring theme,.....i do what you want :-)

thanks :)

I don't see that with Menta theme here with gtk+-3.20, if i click on an icon the application opens. I will try to reproduce that with 3.22.

I have 3.22.5

Btw. If you have a bit free time, can you please port caja-actions to GtkApplication? I've no clue to do that and the package is in debian. https://github.com/raveit65/caja-actions

I'll try :)

raveit65 commented 7 years ago

Change for canvas-item is reverted in TOK theme. https://github.com/mate-desktop/mate-themes/commit/1adde53945537ef069a313e009aadb97f33bdd10 Adjustment for combobox in caja primary-toolbar. https://github.com/mate-desktop/mate-themes/commit/2418fcd510d5ba6364036dc80dc2257146405e6c I will rebase all later when whole work is done for all themes.

raveit65 commented 7 years ago

another fix https://github.com/mate-desktop/mate-themes/commit/d39911ac3f680dc17c39b1863eda3eb6b272d544

raveit65 commented 7 years ago
  • on Menta theme: If I do left click mouse on the icons over the mate panel, it looks with outlines: 1panel 2panel This doesn't happen on TOK

@sc0w Honestly, i don't see outlines on application buttons on the panel with gtk+-3.22 @lukefromdc Can you reproduce this with Menta or BlueMenta themes?

lukefromdc commented 7 years ago

No outlines on Menta or BlueMenta mate-panel application launchers here, not on hover, not on left-click.

Actually, it seems to me we might have another issue here with mate-panel: I have not been able to figure out a way to get focus on it with tab or arrow keys, not sure if that's just no outlines or actually means no focus. If this means the panel can't be focussed without the mouse, does this also mean people using Orca won't be able to read off the icon and button names, or is that known to work?

raveit65 commented 7 years ago

Oh, i forgot how it works with orca. selecting panels is possible with (crtl+alt)+(tab) or (crtl+alt)+(shift+tab). You see a window with previews at this point. In the panels you can move with tab, shift+tab(back) and arrows. But for me selecting notification-area or clock is confusing for me, but that's another story or bug or i don't know how to use it correctly. Any ways, i see now the outlines for panel elements with Menta themes. A commit for TOK is comming soon.

raveit65 commented 7 years ago

TOK: enable outlines for panel buttons https://github.com/mate-desktop/mate-themes/commit/686953bc4553b07694c995bc2f8aeb103a5a4022 @sc0w please test

sc0w commented 7 years ago

@raveit65

Honestly, i don't see outlines on application buttons on the panel with gtk+-3.22

@lukefromdc

No outlines on Menta or BlueMenta mate-panel application launchers here, not on hover, not on left-click.

weird, now I can't see the outlines on left click

@raveit65

TOK: enable outlines for panel buttons 686953b

yes, it works on TOK, it is usefully with keyboard :+1:

thanks a lot for all your work, when you finish I will test the other themes

raveit65 commented 7 years ago

Nice trick in BlackMate to enable outlines for na-tray applets. thanks @lukefromdc I will use that too for other themes. Digging a bit deeper shows that if any QT-applet in na-tray breaks tabbing there. After i stopped dropbox or kaffeine applet tabbing works well there. The element which draws the outline is window.background from GtkTrayIcon. See this commit for Submarine themes https://github.com/mate-desktop/mate-themes/commit/f53a2efbce25f26575818f6ed2ae76c2356789e5 I would prefer that Gtk+ add a style class there to avoid using this very general selector, but as it is deprecated i am in doubt that this ever will be fixed.

lukefromdc commented 7 years ago

I just found that this can be made to work in compiz, not sure that distros are doing with this as I build a patched compiz from source. In CCSM, the "application switcher" enabled alt-tab type features, you can disable ctrl-alt-tab from "next window(all windows)," which does not include the panel, and use those keys instead for "Next Panel" which expliclity selects between the panel and everything else.

lukefromdc commented 7 years ago

I copied the code from https://github.com/mate-desktop/mate-themes/commit/f53a2efbce25f26575818f6ed2ae76c2356789e5 into UbuntuStudio_Legacy to test it from a known starting point-and found it worked for everything EXCEPT the tray icons. Using window.background to set up almost anything for one application is asking for unintended matches to something else. If something like this turns out to work and be needed, the offending widgets should get a style class so they can be special-cased

lukefromdc commented 7 years ago

Green Submarine itself works, and removing window.background does change the outline back to some previous default. Thus, in tests in my theme it was probably overriden by something. Anyway, this shows the value of a style class on the individual icon windows themselves.

raveit65 commented 7 years ago

I thing that the default outline settings in

* {}

do always match window.background. From logic point it should be save to use.

raveit65 commented 7 years ago

@sc0w https://github.com/mate-desktop/mate-themes/commit/cb57277ef1e750851be9fafa5f3fc5088420841a please test again, we can change the color if you don't like it.

lukefromdc commented 7 years ago

I just found that the workspace switcher draws OVER the widget that gets the outlines, so in any theme that sets a different background than the panel for it, the outline gets covered up and cannot be seen. The only way around it is to get the desired color by using an alpha color over the panel background that adds up to the desired color without getting much over the 35% alpha I had to use in UbuntuStudio_Legacy. The only widgets that can accept a background in between panel and .wnck-pager are shared with all the other plug/socket applets and not separately themable.

sc0w commented 7 years ago

@raveit65 it doesn't work on the tray icons (without cb57277 it works)

btw, why geany have different appearance?

geany preferences (TOK):

geany1

geany2

and the button "ok", it looks different, and we can see if have focus

I remember the button "unlock" on "mate screensaver" ... and other applications ...

raveit65 commented 7 years ago

@sc0w fix for na-tray-applet with TOK https://github.com/mate-desktop/mate-themes/commit/3501a0a743d0423d92bc07493df1193a6a41b297 But question was more if you agree with a blue solid outline for the panel? For me this is better readable for normal and transparent panels.

raveit65 commented 7 years ago

I can't say anything to geany because i can't use gtk3-inspector here. ....maybe a gtk2 application?

sc0w commented 7 years ago

@raveit65

But question was more if you agree with a blue solid outline for the panel?

yes, it looks better :)

I see the workspaces with outlines:

workspaces

the tray icons (the square is not complete): EDIT: I see the same with 3501a0a and without 3501a0a :

tray1

tray2

sc0w commented 7 years ago

@raveit65

I can't say anything to geany because i can't use gtk3-inspector here. ....maybe a gtk2 application?

I see now, yes, gtk2

sc0w commented 7 years ago

@raveit65 , is possible to make the outlines on the mate panel a little fatter?

btw, I try to adapt the TOK changes to TG with this first step:

with https://github.com/mate-desktop/mate-themes/commit/3cee35994e2c1c47320e30dfe45b734a2b338842 and https://github.com/mate-desktop/mate-themes/commit/1adde53945537ef069a313e009aadb97f33bdd10 with the menta colors, I created https://github.com/sc0w/mate-themes/commit/cfff1494749c512c81f4e0dfa6fc81b8f709d6fc

https://github.com/sc0w/mate-themes/tree/dev-keyboard-world

but, I see the panel buttons on caja, like this:

green

and, I am not sure about the colors, @raveit65 @lukefromdc what do you think?

lukefromdc commented 7 years ago

If you want to single out everthing in mate-panel, the .mate-panel-menu-bar style class should so it. Not sure it will cover the tray icons though.

raveit65 commented 7 years ago

@raveit65 , is possible to make the outlines on the mate panel a little fatter?

np, i can use 2px outline-width, commit coming soon.

btw, I try to adapt the TOK changes to TG with this first step: with 3cee359 and 1adde53 with the menta colors, I created sc0w@cfff149 https://github.com/sc0w/mate-themes/tree/dev-keyboard-world but, I see the panel buttons on caja, like this: green and, I am not sure about the colors, @raveit65 @lukefromdc what do you think?

Well, i noticed that too. TG should be a 100% copy in code from TOK , but images like border-mages or others are forked (blue --> green) by hand by @MDykstra some years ago. I am pretty sure we see an effect by different border-image. I wanna be first finished TOK before i am looking for an solution for it. You can try to re-fork the image from TOK and using the color from TG. This is what i would try to do.......

raveit65 commented 7 years ago

If you want to single out everthing in mate-panel, the .mate-panel-menu-bar style class should so it. > Not sure it will cover the tray icons though.

I tried to use a selector from panel first, but it seems that GtkTrayIcon is a single window inside na-tray-applet. Yeah, it's possible to write all in one selector for .mate(gnome)-panel-menu-bar, but personal i like to write every single selector to see what i did in code.

raveit65 commented 7 years ago

https://github.com/mate-desktop/mate-themes/commit/fa16c1d92177b97687b333cc63ad1ccf687c24fe Ignore typo in header, outline-width is 2px. Imo, we should finished TOK commit yet, don't forget it's only linux .......... ;-)

sc0w commented 7 years ago

now the tray icons and the workspaces are ok, and the icons on the panel looks better

sometimes, I have this redraw issue:

tests.zip

try holding down "tab" or "shift+tab" if you see the same

raveit65 commented 7 years ago

the ogv video file have a size of 174,3 kb :-)

sc0w commented 7 years ago

@raveit65

the ogv video file have a size of 174,3 kb :-)

yes, you can't see it?

You can try to re-fork the image from TOK and using the color from TG. This is what i would try to do.......

I did it with same results

The image works on another items, I think in this case it uses another image

green

I think this image doesn't use border-focused.svg

EDIT: I see the same on the unattached buttons. And, with the original TG border-focused.svg file, same results

raveit65 commented 7 years ago

border-focused-ptb.svg was the culprit which is used here https://github.com/mate-desktop/mate-themes/blob/8345c6ac8d178311f1b864ae640ab9d6d9bfd2f6/desktop-themes/TraditionalGreen/gtk-3.0/gtk-widgets-img.css#L684 commit for TG https://github.com/mate-desktop/mate-themes/commit/8345c6ac8d178311f1b864ae640ab9d6d9bfd2f6

sc0w commented 7 years ago

@raveit65 thanks, now on TG all is working, but I have the same redraw issue (https://github.com/mate-desktop/mate-themes/issues/156#issuecomment-271051079 )

I can reproduce it on that panel holding down [shift] + [tab]

and, sometimes, with left click on the items of the panel, with TG or TOK, it looks with outlines, but, I am not sure how to reproduce it

raveit65 commented 7 years ago

Not sure what you mean with redraws. I don't see anything abnormal if i press shift+tab. And holding both keys pressed is a fast repeat here. Can you make a video please?

and, sometimes, with left click on the items of the panel, with TG or TOK, it looks with outlines, but, I am not sure how to reproduce it

That means the button is in focus state and change to focus:checked or focus:active. checked --> button is selected active --> just the moment when you press the button. For some reasons it can happen that a button have focus already and that you see the outline.. I saw that sometimes with clock-applet. This is the logic of GtkButton, and the theme follows only the button state.

sc0w commented 7 years ago

Can you make a video please?

another video (you can see on full screen for better details):

(I only can attach on github shorter videos, so, I uploaded to mega)

https://mega.nz/#!ZJoglaKQ!hl7FnLccMwTWgN6ayJgSE1bG45NyrBoB5aW0ywTq3OY

and some images:

redraw1

Shift + tab

redraw2

and shift+tab again

redraw3

redrawlast

If I put the mouse over the line, it disappears

EDIT: I noticed it happens only if the icon launcher is immediately beside to the menu bar

raveit65 commented 7 years ago

huh, now i understand the issue. There is blue line at the firefox starter but focus is at clock-applet which is the last applet in my panel layout for top panel. Weird, i don't see that with Menta themes or others.

raveit65 commented 7 years ago

Mum said don't use outline-offset greater than -2px for the menubar !!! Fixed with https://github.com/mate-desktop/mate-themes/commit/db169cb76fd650afbd0b560e1ce0faf071febda0 https://github.com/mate-desktop/mate-themes/commit/f8a4d822611a7acd3f8cb9d0abdfa46248702a4c for TOK and TG. .....hope all is alright now.

sc0w commented 7 years ago

@raveit65 perfect!

and now, it looks better :)

raveit65 commented 7 years ago

simple solution for GreenLaguna https://github.com/mate-desktop/mate-themes/commit/11271ca83b52b6f6542dbf57281419c3b9e442ef

raveit65 commented 7 years ago

Ok, i rebased the branched and squashed single commits in one commit per theme. Hope, everything i fine to merge into master and 3.22/3.20 branch.

raveit65 commented 7 years ago

I pushed some corrections for Menta and Submarine themes. I will rebase commits again and merge all to master/3.22/3.20.

raveit65 commented 7 years ago

all done with 3.22.6 and 3.20.15 releases.

lukefromdc commented 7 years ago

I got this done in my own theme as well https://github.com/lukefromdc/gtk-theme-ubuntustudio-legacy A lot of that code was sharable with BlackMATE but there were some differences too. The keyboard navigation support of those themes was basically developed together.