I'm using Xubuntu 19.04 and sometimes when I click around in GTK apps I can see a dotted outline around elements such as buttons. I understand this is here for people who want to use a keyboard to navigate around an app, but I never do that and I hate the way it looks.

Is there a way I can disable this, maybe by adding something to my ~/.config/gtk-3.0/gtk.css file?

I did have a brief look around and I tried to add this to it:

gtk_widget_get_can_focus (GtkWidget *button);

but I've had no luck. I'm assuming it's really not the right way to do it, and probably not even the right use of the command.

Any help with this would be seriously appreciated. It's driving me insane!

Screenshot example:

Example of the dotted outline

  • 2
    Please post a screenshot. Your description could be several different things. – theGtknerd May 9 '19 at 0:48
  • +1 for screenshot to illustrate the exact issue. Mention the gtk3 theme.When do the dotted lines appear? – DK Bose May 9 '19 at 1:02
  • 1
    Multiple GTK themes, for example "Materia" and "Matcha", and specifically on GTK buttons! For example "Cancel and Ok" buttons. Although I'll add a screenshot too. – KUPOinyourWINDOW May 9 '19 at 1:08

Create ~/.config/gtk-3.0/gtk.css and include this line:

* { outline-width: 0px; }

or this line:

* { outline: none; }

That should do it. You may need to switch away from the current gtk3 theme to another and back for the change to take effect. On some systems, a log out and log in maybe needed.






| improve this answer | |
  • 1
    That worked perfectly, I had to log out and in for it to take effect. Thank you so much! – KUPOinyourWINDOW May 9 '19 at 2:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.