1

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

3
  • 2
    Please post a screenshot. Your description could be several different things.
    – theGtknerd
    May 9, 2019 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, 2019 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.
    – Kupo
    May 9, 2019 at 1:08

1 Answer 1

3

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.

Before:

Before

After:

After

References:

1
  • 1
    That worked perfectly, I had to log out and in for it to take effect. Thank you so much!
    – Kupo
    May 9, 2019 at 2:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .