From fe65da05beed4fae4556185c1bfe5b15de80c29d Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Sun, 30 Jun 2019 19:47:32 -0300 Subject: [PATCH 1/2] Adwaita: Use $menu_color background in popover.menu GtkPopoverMenus should mimic menus. Commit d936967b7a8 introduced some CSS related to menu popovers, however, it hardcodes 'white' as the background color. That is problematic for the dark theme. Use '$menu_color' instead of 'white', since $menu_color both guarantees menu popovers and menus match, and already handles different colors for dark and light theme variants. --- gtk/theme/Adwaita/_common.scss | 2 +- gtk/theme/Adwaita/gtk-contained-dark.css | 2 +- gtk/theme/Adwaita/gtk-contained.css | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss index 2e257ea625..534592abb7 100644 --- a/gtk/theme/Adwaita/_common.scss +++ b/gtk/theme/Adwaita/_common.scss @@ -4767,7 +4767,7 @@ popover.menu { } &.background contents { - background: white; + background-color: $menu_color; } &.background separator { diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css index dbc07bb542..20c0745d98 100644 --- a/gtk/theme/Adwaita/gtk-contained-dark.css +++ b/gtk/theme/Adwaita/gtk-contained-dark.css @@ -2063,7 +2063,7 @@ popover.menu box.inline-buttons { border-radius: 5px; border-style: none; border popover.menu box.circular-buttons { padding-bottom: 5px; } -popover.menu.background contents { background: white; } +popover.menu.background contents, popover.menu arrow { background-color: #2f2f2f; } popover.menu.background separator { margin: 5px 0px; } diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css index 9b412cf499..43b1a47539 100644 --- a/gtk/theme/Adwaita/gtk-contained.css +++ b/gtk/theme/Adwaita/gtk-contained.css @@ -2079,7 +2079,7 @@ popover.menu box.inline-buttons { border-radius: 5px; border-style: none; border popover.menu box.circular-buttons { padding-bottom: 5px; } -popover.menu.background contents { background: white; } +popover.menu.background contents, popover.menu arrow { background-color: #ffffff; } popover.menu.background separator { margin: 5px 0px; } From b929846cc16a0039bc3a9d10891335dec9e2eb22 Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Sun, 30 Jun 2019 19:51:51 -0300 Subject: [PATCH 2/2] Adwaita: Also apply $color_menu to popover arrows So that popovers and arrows are always in agreement of the background color. --- gtk/theme/Adwaita/_common.scss | 1 + gtk/theme/Adwaita/gtk-contained-dark.css | 2 +- gtk/theme/Adwaita/gtk-contained.css | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss index 534592abb7..ae777dd661 100644 --- a/gtk/theme/Adwaita/_common.scss +++ b/gtk/theme/Adwaita/_common.scss @@ -4766,6 +4766,7 @@ popover.menu { padding-bottom: 5px; } + arrow, &.background contents { background-color: $menu_color; } diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css index 20c0745d98..106ffc7aa3 100644 --- a/gtk/theme/Adwaita/gtk-contained-dark.css +++ b/gtk/theme/Adwaita/gtk-contained-dark.css @@ -2063,7 +2063,7 @@ popover.menu box.inline-buttons { border-radius: 5px; border-style: none; border popover.menu box.circular-buttons { padding-bottom: 5px; } -popover.menu.background contents, popover.menu arrow { background-color: #2f2f2f; } +popover.menu arrow, popover.menu.background contents { background-color: #2f2f2f; } popover.menu.background separator { margin: 5px 0px; } diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css index 43b1a47539..7a29b914a0 100644 --- a/gtk/theme/Adwaita/gtk-contained.css +++ b/gtk/theme/Adwaita/gtk-contained.css @@ -2079,7 +2079,7 @@ popover.menu box.inline-buttons { border-radius: 5px; border-style: none; border popover.menu box.circular-buttons { padding-bottom: 5px; } -popover.menu.background contents, popover.menu arrow { background-color: #ffffff; } +popover.menu arrow, popover.menu.background contents { background-color: #ffffff; } popover.menu.background separator { margin: 5px 0px; }