From 63b12537c142bdb3ccb28a985d388d083f55bf33 Mon Sep 17 00:00:00 2001 From: vinceliuice Date: Mon, 12 Feb 2018 19:07:54 +0800 Subject: [PATCH] Fixed menu bugs --- src/gtk-3.0/gtk-dark.css | 19 +++++++++++++++---- src/gtk-3.0/gtk-light.css | 19 +++++++++++++++---- src/gtk-3.0/sass/_common.scss | 15 ++++++++++----- 3 files changed, 40 insertions(+), 13 deletions(-) diff --git a/src/gtk-3.0/gtk-dark.css b/src/gtk-3.0/gtk-dark.css index 5242204..4d77c0c 100644 --- a/src/gtk-3.0/gtk-dark.css +++ b/src/gtk-3.0/gtk-dark.css @@ -1650,6 +1650,13 @@ popover.background.touch-selection, text-shadow: 0 -1px rgba(255, 255, 255, 0.04), -1px 0px rgba(32, 32, 32, 0.05), 1px 0px rgba(32, 32, 32, 0.05), 0px 1px rgba(32, 32, 32, 0.3), 0px 2px rgba(32, 32, 32, 0.05); border-top: 1px solid transparent; border-bottom: 1px solid #004ecc; } + menu menuitem:hover arrow, + .context-menu menuitem:hover arrow, + popover.touch-selection menuitem:hover arrow, + .csd popover.background.touch-selection menuitem:hover arrow, + .menu menuitem:hover arrow { + color: #ffffff; + -gtk-icon-shadow: none; } menu menuitem:disabled, .context-menu menuitem:disabled, popover.touch-selection menuitem:disabled, @@ -1664,21 +1671,25 @@ popover.background.touch-selection, .csd popover.background.touch-selection menuitem arrow, .menu menuitem arrow { min-height: 16px; - min-width: 16px; } + min-width: 16px; + background-color: transparent; + background-image: none; + border: none; + color: #dedede; } menu menuitem arrow:dir(ltr), .context-menu menuitem arrow:dir(ltr), popover.touch-selection menuitem arrow:dir(ltr), .csd popover.background.touch-selection menuitem arrow:dir(ltr), .menu menuitem arrow:dir(ltr) { -gtk-icon-source: -gtk-icontheme("pan-end-symbolic"); - margin-left: 10px; } + margin-right: 0; } menu menuitem arrow:dir(rtl), .context-menu menuitem arrow:dir(rtl), popover.touch-selection menuitem arrow:dir(rtl), .csd popover.background.touch-selection menuitem arrow:dir(rtl), .menu menuitem arrow:dir(rtl) { -gtk-icon-source: -gtk-icontheme("pan-end-symbolic-rtl"); - margin-right: 10px; } + margin-left: 0; } menuitem accelerator { color: alpha(currentColor,0.55); } menuitem check, menuitem radio { @@ -1710,7 +1721,7 @@ popover.background.touch-selection, popover.touch-selection > arrow.top, .csd popover.touch-selection > arrow.top, .menu > arrow.top { - margin: -28px 1px 0 1px; + margin: -8px 1px 0 1px; border-bottom: 1px solid rgba(255, 255, 255, 0.12); -gtk-icon-source: -gtk-icontheme("pan-up-symbolic"); } menu > arrow.bottom, diff --git a/src/gtk-3.0/gtk-light.css b/src/gtk-3.0/gtk-light.css index cff2667..b2977bb 100644 --- a/src/gtk-3.0/gtk-light.css +++ b/src/gtk-3.0/gtk-light.css @@ -1648,6 +1648,13 @@ popover.background.touch-selection, text-shadow: 0 -1px rgba(255, 255, 255, 0.04), -1px 0px rgba(32, 32, 32, 0.05), 1px 0px rgba(32, 32, 32, 0.05), 0px 1px rgba(32, 32, 32, 0.3), 0px 2px rgba(32, 32, 32, 0.05); border-top: 1px solid transparent; border-bottom: 1px solid #0054da; } + menu menuitem:hover arrow, + .context-menu menuitem:hover arrow, + popover.touch-selection menuitem:hover arrow, + .csd popover.background.touch-selection menuitem:hover arrow, + .menu menuitem:hover arrow { + color: #ffffff; + -gtk-icon-shadow: 0 -1px rgba(255, 255, 255, 0.04), -1px 0px rgba(32, 32, 32, 0.05), 1px 0px rgba(32, 32, 32, 0.05), 0px 1px rgba(32, 32, 32, 0.3), 0px 2px rgba(32, 32, 32, 0.05); } menu menuitem:disabled, .context-menu menuitem:disabled, popover.touch-selection menuitem:disabled, @@ -1662,21 +1669,25 @@ popover.background.touch-selection, .csd popover.background.touch-selection menuitem arrow, .menu menuitem arrow { min-height: 16px; - min-width: 16px; } + min-width: 16px; + background-color: transparent; + background-image: none; + border: none; + color: #242424; } menu menuitem arrow:dir(ltr), .context-menu menuitem arrow:dir(ltr), popover.touch-selection menuitem arrow:dir(ltr), .csd popover.background.touch-selection menuitem arrow:dir(ltr), .menu menuitem arrow:dir(ltr) { -gtk-icon-source: -gtk-icontheme("pan-end-symbolic"); - margin-left: 10px; } + margin-right: 0; } menu menuitem arrow:dir(rtl), .context-menu menuitem arrow:dir(rtl), popover.touch-selection menuitem arrow:dir(rtl), .csd popover.background.touch-selection menuitem arrow:dir(rtl), .menu menuitem arrow:dir(rtl) { -gtk-icon-source: -gtk-icontheme("pan-end-symbolic-rtl"); - margin-right: 10px; } + margin-left: 0; } menuitem accelerator { color: alpha(currentColor,0.55); } menuitem check, menuitem radio { @@ -1708,7 +1719,7 @@ popover.background.touch-selection, popover.touch-selection > arrow.top, .csd popover.touch-selection > arrow.top, .menu > arrow.top { - margin: -28px 1px 0 1px; + margin: -8px 1px 0 1px; border-bottom: 1px solid rgba(0, 0, 0, 0.11); -gtk-icon-source: -gtk-icontheme("pan-up-symbolic"); } menu > arrow.bottom, diff --git a/src/gtk-3.0/sass/_common.scss b/src/gtk-3.0/sass/_common.scss index c379087..0aa7a31 100644 --- a/src/gtk-3.0/sass/_common.scss +++ b/src/gtk-3.0/sass/_common.scss @@ -963,7 +963,7 @@ combobox { } .linked:not(.vertical) > &:first-child > box > button.combo { @extend %linked:first-child; } - .linked:not(.vertical) > &:last-child > box > button.combo { @extend %linked:last-child; arrow { border-radius: 0 $bt_radius $bt_radius 0; }} + .linked:not(.vertical) > &:last-child > box > button.combo { @extend %linked:last-child; arrow { border-radius: 0 $bt_radius $bt_radius 0; } } .linked:not(.vertical) > &:only-child > box > button.combo { @extend %linked:only-child; } .linked.vertical > & > box > button.combo { @extend %linked_vertical_middle; } @@ -1829,6 +1829,7 @@ menu, text-shadow: $text_shadow; border-top: 1px solid transparent; border-bottom: 1px solid darken($selected_bg_color, 10%); + arrow { color: $selected_fg_color; -gtk-icon-shadow: if($variant=='light', $text_shadow, none); } } &:disabled { color: $insensitive_fg_color; @@ -1838,14 +1839,18 @@ menu, arrow { min-height: 16px; min-width: 16px; + background-color: transparent; + background-image: none; + border: none; + color: $fg_color; &:dir(ltr) { -gtk-icon-source: -gtk-icontheme('pan-end-symbolic'); - margin-left: 10px; + margin-right: 0; } &:dir(rtl) { - -gtk-icon-source:-gtk-icontheme('pan-end-symbolic-rtl'); - margin-right: 10px; + -gtk-icon-source: -gtk-icontheme('pan-end-symbolic-rtl'); + margin-left: 0; } } @at-root menuitem { @@ -1872,7 +1877,7 @@ menu, color: $fg_color; &.top { - margin: -28px 1px 0 1px; + margin: -8px 1px 0 1px; border-bottom: 1px solid $borders_color; -gtk-icon-source: -gtk-icontheme('pan-up-symbolic'); }