From 63cb21d9e82983e2f306fcbf9df28e05988ddd32 Mon Sep 17 00:00:00 2001 From: vinceliuice Date: Fri, 2 Feb 2018 13:46:53 +0800 Subject: [PATCH] Fixed gnome-shell menu bug --- src/gnome-shell/gnome-shell-dark.css | 26 +++++++++++++------------- src/gnome-shell/gnome-shell-light.css | 26 +++++++++++++------------- src/gnome-shell/sass/_common.scss | 24 ++++++++++++++---------- src/gtk-3.0/gtk-dark.css | 7 +++++-- src/gtk-3.0/gtk-light.css | 7 +++++-- src/gtk-3.0/sass/_applications.scss | 6 ++++-- 6 files changed, 54 insertions(+), 42 deletions(-) diff --git a/src/gnome-shell/gnome-shell-dark.css b/src/gnome-shell/gnome-shell-dark.css index 0752011..bf663f7 100644 --- a/src/gnome-shell/gnome-shell-dark.css +++ b/src/gnome-shell/gnome-shell-dark.css @@ -524,23 +524,23 @@ StScrollBar { /* Popovers/Menus */ .popup-menu { - min-width: 100px; + min-width: 160px; background-color: transparent; } .popup-menu .popup-sub-menu { background-color: rgba(100, 100, 100, 0.45); box-shadow: 0 0 transparent; border-radius: 0 0 3px 3px; } .popup-menu .popup-menu-content { - padding: 4px 0; + padding: 6px 0; margin: 0 2px; } .popup-menu .popup-menu-item { - spacing: 6px; + spacing: 8px; transition-duration: 100ms; border-radius: 3px; } .popup-menu .popup-menu-item:ltr { - padding: 0.4em 20px 0.4em 0; } + padding: 0.4em 24px 0.4em 0; } .popup-menu .popup-menu-item:rtl { - padding: 0.4em 0 0.4em 20px; } + padding: 0.4em 0 0.4em 24px; } .popup-menu .popup-menu-item:checked { background-color: #0062FF; color: rgba(255, 255, 255, 0.85); @@ -572,7 +572,7 @@ StScrollBar { .popup-menu .popup-inactive-menu-item:insensitive { color: rgba(255, 255, 255, 0.5); } .popup-menu.panel-menu { - -boxpointer-gap: 0; + -boxpointer-gap: 4px; margin-bottom: 1.75em; } .popup-menu-ornament { @@ -589,7 +589,7 @@ StScrollBar { -arrow-base: 0; -arrow-rise: 0; -arrow-box-shadow: none; - margin: 4px; + margin: 6px; background-color: rgba(36, 36, 36, 0.9); border-radius: 5px; box-shadow: 0 3px 3px rgba(0, 0, 0, 0.24), 0 3px 3px rgba(0, 0, 0, 0.345); } @@ -1159,14 +1159,14 @@ StScrollBar { min-width: 280px; } .aggregate-menu .popup-menu-icon { padding: 0 4px; } - .aggregate-menu .popup-sub-menu .popup-menu-item :first-child:ltr { + .aggregate-menu .popup-sub-menu .popup-menu-item:ltr { /* 8px spacing + 2*4px padding */ - padding-left: 16px; - margin-left: 1.23077em; } - .aggregate-menu .popup-sub-menu .popup-menu-item :first-child:rtl { + padding-left: 32px; + padding-right: 56px; } + .aggregate-menu .popup-sub-menu .popup-menu-item:rtl { /* 8px spacing + 2*4px padding */ - padding-right: 16px; - margin-right: 1.23077em; } + padding-left: 56px; + padding-right: 32px; } .system-menu-action { color: rgba(255, 255, 255, 0.7); diff --git a/src/gnome-shell/gnome-shell-light.css b/src/gnome-shell/gnome-shell-light.css index ddc86c2..6141334 100644 --- a/src/gnome-shell/gnome-shell-light.css +++ b/src/gnome-shell/gnome-shell-light.css @@ -524,23 +524,23 @@ StScrollBar { /* Popovers/Menus */ .popup-menu { - min-width: 100px; + min-width: 160px; background-color: transparent; } .popup-menu .popup-sub-menu { background-color: rgba(191, 191, 191, 0.45); box-shadow: 0 0 transparent; border-radius: 0 0 3px 3px; } .popup-menu .popup-menu-content { - padding: 4px 0; + padding: 6px 0; margin: 0 2px; } .popup-menu .popup-menu-item { - spacing: 6px; + spacing: 8px; transition-duration: 100ms; border-radius: 3px; } .popup-menu .popup-menu-item:ltr { - padding: 0.4em 20px 0.4em 0; } + padding: 0.4em 24px 0.4em 0; } .popup-menu .popup-menu-item:rtl { - padding: 0.4em 0 0.4em 20px; } + padding: 0.4em 0 0.4em 24px; } .popup-menu .popup-menu-item:checked { background-color: #0e6bff; color: rgba(255, 255, 255, 0.85); @@ -572,7 +572,7 @@ StScrollBar { .popup-menu .popup-inactive-menu-item:insensitive { color: rgba(0, 0, 0, 0.38); } .popup-menu.panel-menu { - -boxpointer-gap: 0; + -boxpointer-gap: 4px; margin-bottom: 1.75em; } .popup-menu-ornament { @@ -589,7 +589,7 @@ StScrollBar { -arrow-base: 0; -arrow-rise: 0; -arrow-box-shadow: none; - margin: 4px; + margin: 6px; background-color: rgba(255, 255, 255, 0.9); border-radius: 5px; box-shadow: 0 3px 3px rgba(0, 0, 0, 0.24), 0 3px 3px rgba(0, 0, 0, 0.345); } @@ -1159,14 +1159,14 @@ StScrollBar { min-width: 280px; } .aggregate-menu .popup-menu-icon { padding: 0 4px; } - .aggregate-menu .popup-sub-menu .popup-menu-item :first-child:ltr { + .aggregate-menu .popup-sub-menu .popup-menu-item:ltr { /* 8px spacing + 2*4px padding */ - padding-left: 16px; - margin-left: 1.23077em; } - .aggregate-menu .popup-sub-menu .popup-menu-item :first-child:rtl { + padding-left: 32px; + padding-right: 56px; } + .aggregate-menu .popup-sub-menu .popup-menu-item:rtl { /* 8px spacing + 2*4px padding */ - padding-right: 16px; - margin-right: 1.23077em; } + padding-left: 56px; + padding-right: 32px; } .system-menu-action { color: rgba(0, 0, 0, 0.54); diff --git a/src/gnome-shell/sass/_common.scss b/src/gnome-shell/sass/_common.scss index 345da7d..f37fb17 100644 --- a/src/gnome-shell/sass/_common.scss +++ b/src/gnome-shell/sass/_common.scss @@ -555,7 +555,7 @@ $slider_color: if($variant == 'light', white, white); /* Popovers/Menus */ .popup-menu { - min-width: 100px; + min-width: 160px; background-color: transparent; .popup-menu-arrow { } //defined globally in the TOP BAR @@ -565,14 +565,14 @@ $slider_color: if($variant == 'light', white, white); border-radius: 0 0 3px 3px; } - .popup-menu-content { padding: 4px 0; margin: 0 2px; } + .popup-menu-content { padding: 6px 0; margin: 0 2px; } .popup-menu-item { - spacing: 6px; + spacing: 8px; transition-duration: $shorter_duration; border-radius: 3px; - &:ltr { padding: 0.4em 20px 0.4em 0; } - &:rtl { padding: 0.4em 0 0.4em 20px; } + &:ltr { padding: 0.4em 24px 0.4em 0; } + &:rtl { padding: 0.4em 0 0.4em 24px; } &:checked { background-color: $primary_color; color: $inverse_fg_color; @@ -610,7 +610,7 @@ $slider_color: if($variant == 'light', white, white); } //.popup-status-menu-item { font-weight: normal; color: pink; } //dunno what that is &.panel-menu { - -boxpointer-gap: 0; + -boxpointer-gap: 4px; margin-bottom: 1.75em; } } @@ -630,7 +630,7 @@ $slider_color: if($variant == 'light', white, white); -arrow-base: 0; -arrow-rise: 0; -arrow-box-shadow: none; //dreaming. bug #689995 - margin: 4px; + margin: 6px; background-color: rgba($base_color, 0.9); border-radius: $bt_radius - 3px; box-shadow: $shadow_2; @@ -1290,11 +1290,15 @@ $slider_color: if($variant == 'light', white, white); .aggregate-menu { min-width: 280px; .popup-menu-icon { padding: 0 4px; } - .popup-sub-menu .popup-menu-item :first-child { + .popup-sub-menu .popup-menu-item { &:ltr { /* 8px spacing + 2*4px padding */ - padding-left: 16px; margin-left: em(16px); } + padding-left: 32px; + padding-right: 56px; + } &:rtl { /* 8px spacing + 2*4px padding */ - padding-right: 16px; margin-right: em(16px); } + padding-left: 56px; + padding-right: 32px; + } } } diff --git a/src/gtk-3.0/gtk-dark.css b/src/gtk-3.0/gtk-dark.css index e01606d..67d64ea 100644 --- a/src/gtk-3.0/gtk-dark.css +++ b/src/gtk-3.0/gtk-dark.css @@ -4005,8 +4005,11 @@ panel-toplevel.background button:not(#tasklist-button), .xfce4-panel.panel butto border-top-right-radius: 0; } .nautilus-window .floating-bar button { border: none; - border-radius: 0; - min-height: 0; } + border-radius: 100px; + min-height: 0; + min-width: 0; + padding: 0; + margin: 0; } .marlin-pathbar.pathbar { border-radius: 3px; diff --git a/src/gtk-3.0/gtk-light.css b/src/gtk-3.0/gtk-light.css index 9c8b88f..6e4dc13 100644 --- a/src/gtk-3.0/gtk-light.css +++ b/src/gtk-3.0/gtk-light.css @@ -4005,8 +4005,11 @@ panel-toplevel.background button:not(#tasklist-button), .xfce4-panel.panel butto border-top-right-radius: 0; } .nautilus-window .floating-bar button { border: none; - border-radius: 0; - min-height: 0; } + border-radius: 100px; + min-height: 0; + min-width: 0; + padding: 0; + margin: 0; } .marlin-pathbar.pathbar { border-radius: 3px; diff --git a/src/gtk-3.0/sass/_applications.scss b/src/gtk-3.0/sass/_applications.scss index 9283eb8..40b4abc 100644 --- a/src/gtk-3.0/sass/_applications.scss +++ b/src/gtk-3.0/sass/_applications.scss @@ -939,9 +939,11 @@ panel-toplevel.background { button { border: none; - border-radius: 0; + border-radius: 100px; min-height: 0; - + min-width: 0; + padding: 0; + margin: 0; @extend %selected-button; } }