From 8165616b3c51075da237bb51765cb77d5aa6efdf Mon Sep 17 00:00:00 2001 From: Jakub Steiner Date: Thu, 30 Apr 2020 22:40:21 +0200 Subject: [PATCH] Adwaita: bring more attention to focus change - as discussed in https://gitlab.gnome.org/GNOME/gtk/-/issues/2644 it's desirable to bring attention to what's focused. Instead of pressing `alt` just simply changing focus with `tab` can have a similar effect Extends https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1802 --- gtk/theme/Adwaita/_common.scss | 2 +- gtk/theme/Adwaita/_drawing.scss | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss index 3612b011f9..ba1e6738dd 100644 --- a/gtk/theme/Adwaita/_common.scss +++ b/gtk/theme/Adwaita/_common.scss @@ -3876,7 +3876,7 @@ colorswatch { transition: $focus_transition; - @include focus-ring(); + @include focus-ring($width: 4px, $offset: -2px); &:drop(active), & { border-style: none; } // FIXME: implement a proper drop(active) state diff --git a/gtk/theme/Adwaita/_drawing.scss b/gtk/theme/Adwaita/_drawing.scss index 7e67786f1a..4bb7d97d5c 100644 --- a/gtk/theme/Adwaita/_drawing.scss +++ b/gtk/theme/Adwaita/_drawing.scss @@ -10,11 +10,12 @@ // @mixin focus-ring($target: null, $width: 2px, $offset: -$width, $outer: false) { & #{$target} { - outline: 0 solid $focus_border_color; - outline-offset: if($outer, $offset, $offset + $width); + outline: 0 solid transparent; + outline-offset: if($outer, $offset + 10px, $offset + $width + 10px); } &:focus:focus-visible #{$target} { + outline-color: $focus_border_color; outline-width: $width; outline-offset: $offset; }