[gnome-builder] gui+editor: Make row close button keep its focus outline
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] gui+editor: Make row close button keep its focus outline
- Date: Wed, 7 Jul 2021 23:21:39 +0000 (UTC)
commit 32567bb88573c14a7a45d04a78b0f2192f249ea2
Author: vanadiae <vanadiae35 gmail com>
Date: Wed Jul 7 12:54:05 2021 +0200
gui+editor: Make row close button keep its focus outline
Currently when navigating in the frame open pages popover or the open pages
in the sidebar, moving the focus on one of the close buttons can be confusing
because the focus outline was disabled, so it appears like the focus was lost
somewhere, even though pressing Enter/Space will close the row.
So to fix this, the CSS that disabled the outline was removed, and the buttons
now have valign=center so that the focus outline stays square with a bit of
padding.
src/libide/editor/ide-editor-sidebar.c | 3 ++-
src/libide/gui/ide-frame-header.c | 1 +
src/libide/themes/themes/shared/shared-editor.css | 1 -
src/libide/themes/themes/shared/shared-layout.css | 1 -
4 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/libide/editor/ide-editor-sidebar.c b/src/libide/editor/ide-editor-sidebar.c
index c0244c609..66f5337d3 100644
--- a/src/libide/editor/ide-editor-sidebar.c
+++ b/src/libide/editor/ide-editor-sidebar.c
@@ -502,12 +502,13 @@ create_open_page_row (gpointer item,
button = g_object_new (GTK_TYPE_BUTTON,
"visible", TRUE,
"hexpand", FALSE,
+ "valign", GTK_ALIGN_CENTER,
NULL);
g_signal_connect_object (button,
"clicked",
G_CALLBACK (ide_editor_sidebar_close_view),
view, 0);
- dzl_gtk_widget_add_style_class (GTK_WIDGET (button), "flat");
+ dzl_gtk_widget_add_style_class (GTK_WIDGET (button), "image-button");
gtk_container_add (GTK_CONTAINER (box), GTK_WIDGET (button));
image = g_object_new (GTK_TYPE_IMAGE,
diff --git a/src/libide/gui/ide-frame-header.c b/src/libide/gui/ide-frame-header.c
index 824fc5efc..a866782b2 100644
--- a/src/libide/gui/ide-frame-header.c
+++ b/src/libide/gui/ide-frame-header.c
@@ -274,6 +274,7 @@ create_document_row (gpointer item,
"icon-name", "window-close-symbolic",
"visible", TRUE,
NULL),
+ "valign", GTK_ALIGN_CENTER,
"visible", TRUE,
NULL);
g_signal_connect_object (close_button,
diff --git a/src/libide/themes/themes/shared/shared-editor.css
b/src/libide/themes/themes/shared/shared-editor.css
index 86652a010..20650c901 100644
--- a/src/libide/themes/themes/shared/shared-editor.css
+++ b/src/libide/themes/themes/shared/shared-editor.css
@@ -31,7 +31,6 @@ ideeditorsidebar list.open-pages row box > button:last-child {
background: none;
box-shadow: none;
border: none;
- outline: none;
padding: 0;
margin: 0 9px 0 6px;
color: @theme_fg_color;
diff --git a/src/libide/themes/themes/shared/shared-layout.css
b/src/libide/themes/themes/shared/shared-layout.css
index 9681788ca..98b236902 100644
--- a/src/libide/themes/themes/shared/shared-layout.css
+++ b/src/libide/themes/themes/shared/shared-layout.css
@@ -65,7 +65,6 @@ popover.title-popover list row button:last-child {
background: none;
box-shadow: none;
border: none;
- outline: none;
padding: 0;
margin: 0 6px;
color: @theme_fg_color;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]