From a2fdb55384b1e717a8d5e304c0b237f85faa0768 Mon Sep 17 00:00:00 2001 From: nana-4 Date: Tue, 3 Sep 2019 01:34:05 +0900 Subject: [PATCH 1/3] Adwaita: Fix broken osd popover style Apply %osd to child arrow and contents instead of parent popover. https://gitlab.gnome.org/GNOME/gtk/issues/2061 --- gtk/theme/Adwaita/_common.scss | 75 ++++++++++++++++------------------ 1 file changed, 35 insertions(+), 40 deletions(-) diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss index d5945fdca3..0432b2a243 100644 --- a/gtk/theme/Adwaita/_common.scss +++ b/gtk/theme/Adwaita/_common.scss @@ -2187,59 +2187,54 @@ menuitem { popover.background { background-color: transparent; - padding: 0px; -} -popover.menu>arrow, -popover>arrow { - background-color: $popover_bg_color; - border: 1px solid $borders_color; -} - -popover>contents { - padding: 8px; - background-color: $popover_bg_color; - border: 1px solid $borders_color; - margin: 0px; -} - -popover.background>contents { - - background-color: $popover_bg_color; - box-shadow: 0 1px 2px transparentize(black, 0.7); - .csd &, & { + > arrow, + > contents { + background-color: $popover_bg_color; border: 1px solid $borders_color; + box-shadow: 0 1px 2px transparentize(black, 0.7); + + &:backdrop { + background-color: $backdrop_bg_color; + border-color: $backdrop_borders_color; + box-shadow: none; + } + } + + > contents { + padding: 8px; border-radius: $popover_radius; + + > list, + > .view, + > toolbar { + border-style: none; + background-color: transparent; + } + + separator { margin: 3px; } + + list separator { margin: 0; } } - &:backdrop { - background-color: $backdrop_bg_color; - box-shadow: none; - } - - > list, - > .view, - > toolbar { - border-style: none; + .osd &, + &.touch-selection, + &.magnifier { background-color: transparent; - } - .csd &, & { - &.touch-selection, - &.magnifier { + > arrow, + > contents { @extend %osd; border: 1px solid transparentize(white, 0.9); - - button { @extend %osd_button }; + box-shadow: none; } - - &.osd { @extend %osd; } } - separator { margin: 3px; } - - list separator { margin: 0px; } + &.touch-selection, + &.magnifier { + button { @extend %osd_button; } + } } From b9d8eb54b7c629a6a5bf420fc306f92cceca8ce2 Mon Sep 17 00:00:00 2001 From: nana-4 Date: Tue, 3 Sep 2019 01:43:41 +0900 Subject: [PATCH 2/3] Adwaita: Don't inherit font style to popover https://gitlab.gnome.org/GNOME/gtk/issues/2061 --- gtk/theme/Adwaita/_common.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss index 0432b2a243..929861fa6a 100644 --- a/gtk/theme/Adwaita/_common.scss +++ b/gtk/theme/Adwaita/_common.scss @@ -2187,6 +2187,7 @@ menuitem { popover.background { background-color: transparent; + font: initial; // Decouple the font of popovers from their entry/textview > arrow, > contents { From 3eec90cdc03fec88e237f671d4f13bd761ea24f8 Mon Sep 17 00:00:00 2001 From: nana-4 Date: Tue, 3 Sep 2019 01:44:55 +0900 Subject: [PATCH 3/3] node editor: Avoid inheriting textview styles ...to its descendant selectors Without ">", "text" style is propagated to entry in the emoji chooser. https://gitlab.gnome.org/GNOME/gtk/issues/2061 --- demos/node-editor/node-editor-application.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/demos/node-editor/node-editor-application.c b/demos/node-editor/node-editor-application.c index d4d65f964f..fd80787ce2 100644 --- a/demos/node-editor/node-editor-application.c +++ b/demos/node-editor/node-editor-application.c @@ -26,9 +26,9 @@ static const char *css = "textview.editor {" " color: rgb(192, 197, 206);" -" caret-color: white;" +" caret-color: currentColor;" "}" -"textview.editor text {" +"textview.editor > text {" " background-color: rgb(43, 48, 59);" "}" ;