From 69f8b4bb7776210faa64dae60d53636b5106d1be Mon Sep 17 00:00:00 2001 From: Lapo Calamandrei Date: Tue, 31 May 2016 20:58:35 +0200 Subject: [PATCH] Adwaita: ensure menuitem labels are not overridden see https://bugzilla.gnome.org/show_bug.cgi?id=767058 --- gtk/theme/Adwaita/_common.scss | 7 ++- gtk/theme/Adwaita/gtk-contained-dark.css | 58 +++++++++++++++++------- gtk/theme/Adwaita/gtk-contained.css | 58 +++++++++++++++++------- 3 files changed, 88 insertions(+), 35 deletions(-) diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss index 5855913d3a..0b37b2bd61 100644 --- a/gtk/theme/Adwaita/_common.scss +++ b/gtk/theme/Adwaita/_common.scss @@ -1855,7 +1855,8 @@ menubar, } menu, -.menu { +.menu, +.context-menu { margin: 4px; padding: 2px 0px; background-color: $menu_color; @@ -1902,6 +1903,10 @@ menu, margin-right: 10px; } } + + // avoids labels color being overridden, see + // https://bugzilla.gnome.org/show_bug.cgi?id=767058 + label { &:dir(rtl), &:dir(ltr) { color: inherit; }} } // overflow arrows diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css index 9a855369fe..80e02c0f56 100644 --- a/gtk/theme/Adwaita/gtk-contained-dark.css +++ b/gtk/theme/Adwaita/gtk-contained-dark.css @@ -2259,52 +2259,71 @@ menubar, box-shadow: none; } menu, -.menu { +.menu, +.context-menu { margin: 4px; padding: 2px 0px; background-color: #262b2d; border: 1px solid #1b1f20; } .csd menu, .csd - .menu { + .menu, .csd + .context-menu { border: none; } menu:backdrop, - .menu:backdrop { + .menu:backdrop, + .context-menu:backdrop { background-color: #282d2f; } menu menuitem, - .menu menuitem { + .menu menuitem, + .context-menu menuitem { min-height: 16px; min-width: 40px; padding: 4px 6px; text-shadow: none; } menu menuitem:hover, - .menu menuitem:hover { + .menu menuitem:hover, + .context-menu menuitem:hover { color: #ffffff; background-color: #215d9c; } menu menuitem:disabled, - .menu menuitem:disabled { + .menu menuitem:disabled, + .context-menu menuitem:disabled { color: #919494; } menu menuitem:disabled:backdrop, - .menu menuitem:disabled:backdrop { + .menu menuitem:disabled:backdrop, + .context-menu menuitem:disabled:backdrop { color: #566164; } menu menuitem:backdrop, menu menuitem:backdrop:hover, .menu menuitem:backdrop, - .menu menuitem:backdrop:hover { + .menu menuitem:backdrop:hover, + .context-menu menuitem:backdrop, + .context-menu menuitem:backdrop:hover { color: #919494; background-color: transparent; } menu menuitem arrow, - .menu menuitem arrow { + .menu menuitem arrow, + .context-menu menuitem arrow { min-height: 16px; min-width: 16px; } menu menuitem arrow:dir(ltr), - .menu menuitem arrow:dir(ltr) { + .menu menuitem arrow:dir(ltr), + .context-menu menuitem arrow:dir(ltr) { -gtk-icon-source: -gtk-icontheme("pan-end-symbolic"); margin-left: 10px; } menu menuitem arrow:dir(rtl), - .menu menuitem arrow:dir(rtl) { + .menu menuitem arrow:dir(rtl), + .context-menu menuitem arrow:dir(rtl) { -gtk-icon-source: -gtk-icontheme("pan-end-symbolic-rtl"); margin-right: 10px; } + menu menuitem label:dir(rtl), menu menuitem label:dir(ltr), + .menu menuitem label:dir(rtl), + .menu menuitem label:dir(ltr), + .context-menu menuitem label:dir(rtl), + .context-menu menuitem label:dir(ltr) { + color: inherit; } menu > arrow, - .menu > arrow { + .menu > arrow, + .context-menu > arrow { border-color: transparent; background-color: transparent; background-image: none; @@ -2317,23 +2336,28 @@ menu, background-color: #262b2d; border-radius: 0; } menu > arrow.top, - .menu > arrow.top { + .menu > arrow.top, + .context-menu > arrow.top { margin-top: -6px; border-bottom: 1px solid #373b3d; -gtk-icon-source: -gtk-icontheme("pan-up-symbolic"); } menu > arrow.bottom, - .menu > arrow.bottom { + .menu > arrow.bottom, + .context-menu > arrow.bottom { margin-bottom: -6px; border-top: 1px solid #373b3d; -gtk-icon-source: -gtk-icontheme("pan-down-symbolic"); } menu > arrow:hover, - .menu > arrow:hover { + .menu > arrow:hover, + .context-menu > arrow:hover { background-color: #373b3d; } menu > arrow:backdrop, - .menu > arrow:backdrop { + .menu > arrow:backdrop, + .context-menu > arrow:backdrop { background-color: #282d2f; } menu > arrow:disabled, - .menu > arrow:disabled { + .menu > arrow:disabled, + .context-menu > arrow:disabled { color: transparent; background-color: transparent; border-color: transparent; } diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css index 4a7ccc779f..75dd87496d 100644 --- a/gtk/theme/Adwaita/gtk-contained.css +++ b/gtk/theme/Adwaita/gtk-contained.css @@ -2272,52 +2272,71 @@ menubar, box-shadow: none; } menu, -.menu { +.menu, +.context-menu { margin: 4px; padding: 2px 0px; background-color: #ffffff; border: 1px solid #b6b6b3; } .csd menu, .csd - .menu { + .menu, .csd + .context-menu { border: none; } menu:backdrop, - .menu:backdrop { + .menu:backdrop, + .context-menu:backdrop { background-color: #fcfcfc; } menu menuitem, - .menu menuitem { + .menu menuitem, + .context-menu menuitem { min-height: 16px; min-width: 40px; padding: 4px 6px; text-shadow: none; } menu menuitem:hover, - .menu menuitem:hover { + .menu menuitem:hover, + .context-menu menuitem:hover { color: #ffffff; background-color: #4a90d9; } menu menuitem:disabled, - .menu menuitem:disabled { + .menu menuitem:disabled, + .context-menu menuitem:disabled { color: #8b8e8f; } menu menuitem:disabled:backdrop, - .menu menuitem:disabled:backdrop { + .menu menuitem:disabled:backdrop, + .context-menu menuitem:disabled:backdrop { color: #c3c3c0; } menu menuitem:backdrop, menu menuitem:backdrop:hover, .menu menuitem:backdrop, - .menu menuitem:backdrop:hover { + .menu menuitem:backdrop:hover, + .context-menu menuitem:backdrop, + .context-menu menuitem:backdrop:hover { color: #8b8e8f; background-color: transparent; } menu menuitem arrow, - .menu menuitem arrow { + .menu menuitem arrow, + .context-menu menuitem arrow { min-height: 16px; min-width: 16px; } menu menuitem arrow:dir(ltr), - .menu menuitem arrow:dir(ltr) { + .menu menuitem arrow:dir(ltr), + .context-menu menuitem arrow:dir(ltr) { -gtk-icon-source: -gtk-icontheme("pan-end-symbolic"); margin-left: 10px; } menu menuitem arrow:dir(rtl), - .menu menuitem arrow:dir(rtl) { + .menu menuitem arrow:dir(rtl), + .context-menu menuitem arrow:dir(rtl) { -gtk-icon-source: -gtk-icontheme("pan-end-symbolic-rtl"); margin-right: 10px; } + menu menuitem label:dir(rtl), menu menuitem label:dir(ltr), + .menu menuitem label:dir(rtl), + .menu menuitem label:dir(ltr), + .context-menu menuitem label:dir(rtl), + .context-menu menuitem label:dir(ltr) { + color: inherit; } menu > arrow, - .menu > arrow { + .menu > arrow, + .context-menu > arrow { border-color: transparent; background-color: transparent; background-image: none; @@ -2330,23 +2349,28 @@ menu, background-color: #ffffff; border-radius: 0; } menu > arrow.top, - .menu > arrow.top { + .menu > arrow.top, + .context-menu > arrow.top { margin-top: -6px; border-bottom: 1px solid #eaebeb; -gtk-icon-source: -gtk-icontheme("pan-up-symbolic"); } menu > arrow.bottom, - .menu > arrow.bottom { + .menu > arrow.bottom, + .context-menu > arrow.bottom { margin-bottom: -6px; border-top: 1px solid #eaebeb; -gtk-icon-source: -gtk-icontheme("pan-down-symbolic"); } menu > arrow:hover, - .menu > arrow:hover { + .menu > arrow:hover, + .context-menu > arrow:hover { background-color: #eaebeb; } menu > arrow:backdrop, - .menu > arrow:backdrop { + .menu > arrow:backdrop, + .context-menu > arrow:backdrop { background-color: #fcfcfc; } menu > arrow:disabled, - .menu > arrow:disabled { + .menu > arrow:disabled, + .context-menu > arrow:disabled { color: transparent; background-color: transparent; border-color: transparent; }