From 95f06f6e7555e63342554bdac13237457248d678 Mon Sep 17 00:00:00 2001 From: "frederik.feichtmeier" Date: Wed, 28 Nov 2018 17:43:55 +0100 Subject: [PATCH 1/2] Add bigger shadow and border-radius to menus Increase the visibility of the box-shadow for menus Introduce a border-radius variable for menus Use this variable for all corners of menus except top for the top menus --- gtk/theme/Adwaita/_common.scss | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss index 679fe2a0f9..4faaf734cf 100644 --- a/gtk/theme/Adwaita/_common.scss +++ b/gtk/theme/Adwaita/_common.scss @@ -6,6 +6,7 @@ $ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94); $asset_suffix: if($variant=='dark', '-dark', ''); $backdrop_transition: 200ms ease-out; $button_transition: all 200ms $ease-out-quad; +$menu_radius: 3px; * { padding: 0; @@ -2008,6 +2009,11 @@ menubar, min-height: 16px; padding: 4px 8px; + menu { + border-radius: 0 0 $menu_radius $menu_radius; + menu { border-radius: $menu_radius; } + } + &:hover { //Seems like it :hover even with keyboard focus box-shadow: inset 0 -3px $selected_bg_color; color: $link_color; @@ -2020,13 +2026,16 @@ menubar, } } +.background.popup { background-color: transparent; } + menu, .menu, .context-menu { // this is not a good solution, commenting out for now margin: 4px; // See https://bugzilla.gnome.org/show_bug.cgi?id=591258 - padding: 2px 0px; + padding: 8px 0px; background-color: $menu_color; border: 1px solid $borders_color; // adds borders in a non composited env + border-radius: $menu_radius; .csd & { border: none; } // axes borders in a composited env @@ -2088,12 +2097,16 @@ menu, &.top { margin-top: -6px; border-bottom: 1px solid mix($fg_color, $base_color, 10%); + border-top-right-radius: $menu_radius; + border-top-left-radius: $menu_radius; -gtk-icon-source: -gtk-icontheme('pan-up-symbolic'); } &.bottom { margin-bottom: -6px; border-top: 1px solid mix($fg_color, $base_color, 10%); + border-bottom-right-radius: $menu_radius; + border-bottom-left-radius: $menu_radius; -gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); } @@ -4408,8 +4421,8 @@ decoration { .ssd & { box-shadow: 0 0 0 1px $_wm_border; } //just doing borders, wm draws actual shadows .csd.popup & { - border-radius: 0; - box-shadow: 0 1px 2px transparentize(black, 0.8), + border-radius: $menu_radius; + box-shadow: 0 1px 5px transparentize(black, 0.7), 0 0 0 1px transparentize($_wm_border, 0.1); } From a6a69dd5679d6f90cb2436d1455e93ffeea5292a Mon Sep 17 00:00:00 2001 From: "frederik.feichtmeier" Date: Fri, 30 Nov 2018 11:54:22 +0100 Subject: [PATCH 2/2] Adapt border-radius and box-shadow of menus to popovers --- gtk/theme/Adwaita/_common.scss | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss index 4faaf734cf..0df11df835 100644 --- a/gtk/theme/Adwaita/_common.scss +++ b/gtk/theme/Adwaita/_common.scss @@ -6,7 +6,7 @@ $ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94); $asset_suffix: if($variant=='dark', '-dark', ''); $backdrop_transition: 200ms ease-out; $button_transition: all 200ms $ease-out-quad; -$menu_radius: 3px; +$menu_radius: 5px; * { padding: 0; @@ -4422,7 +4422,7 @@ decoration { .csd.popup & { border-radius: $menu_radius; - box-shadow: 0 1px 5px transparentize(black, 0.7), + box-shadow: 0 1px 2px transparentize(black, 0.7), 0 0 0 1px transparentize($_wm_border, 0.1); } @@ -4664,4 +4664,4 @@ popover.emoji-completion contents row box { popover.emoji-completion .emoji:hover { background-color: $popover_hover_color; -} +} \ No newline at end of file