_menus.scss 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. /*********
  2. * Menus *
  3. *********/
  4. menubar,
  5. .menubar {
  6. background-color: $headerbar_color;
  7. color: $headerbar_fg_color;
  8. padding: 0px;
  9. box-shadow: inset 0 -1px transparentize(black, 0.9);
  10. > item {
  11. min-height: 16px;
  12. padding: 4px 8px;
  13. &:hover { //Seems like it :hover even with keyboard focus
  14. box-shadow: inset 0 -3px $selected_bg_color;
  15. }
  16. &:disabled {
  17. color: $insensitive_fg_color;
  18. box-shadow: none;
  19. }
  20. }
  21. }
  22. menu,
  23. .menu,
  24. .context-menu {
  25. margin: 4px;
  26. padding: 2px 0px;
  27. background-color: $menu_color;
  28. border: 1px solid $borders_color; // adds borders in a non composited env
  29. font: initial;
  30. .csd & { border: none; } // axes borders in a composited env
  31. &:backdrop { background-color: $backdrop_menu_color; }
  32. menuitem {
  33. min-height: 16px;
  34. min-width: 40px;
  35. padding: 4px 6px;
  36. text-shadow: none;
  37. &:hover {
  38. color: $selected_fg_color;
  39. background-color: $selected_bg_color;
  40. }
  41. &:disabled {
  42. color: $insensitive_fg_color;
  43. &:backdrop { color: $backdrop_insensitive_color; }
  44. }
  45. &:backdrop,
  46. &:backdrop:hover {
  47. color: $backdrop_fg_color;
  48. background-color: transparent;
  49. }
  50. // submenu indicators
  51. arrow {
  52. min-height: 16px;
  53. min-width: 16px;
  54. &:dir(ltr) {
  55. -gtk-icon-source: -gtk-icontheme('pan-end-symbolic');
  56. margin-left: 10px;
  57. }
  58. &:dir(rtl) {
  59. -gtk-icon-source:-gtk-icontheme('pan-end-symbolic-rtl');
  60. margin-right: 10px;
  61. }
  62. }
  63. // avoids labels color being overridden, see
  64. // https://bugzilla.gnome.org/show_bug.cgi?id=767058
  65. label { &:dir(rtl), &:dir(ltr) { color: inherit; }}
  66. }
  67. // overflow arrows
  68. > arrow {
  69. @include button(undecorated);
  70. min-height: 16px;
  71. min-width: 16px;
  72. padding: 4px;
  73. background-color: $menu_color;
  74. border-radius: 0;
  75. &.top {
  76. margin-top: -6px;
  77. border-bottom: 1px solid mix($fg_color, $base_color, 10%);
  78. -gtk-icon-source: -gtk-icontheme('pan-up-symbolic');
  79. }
  80. &.bottom {
  81. margin-bottom: -6px;
  82. border-top: 1px solid mix($fg_color, $base_color, 10%);
  83. -gtk-icon-source: -gtk-icontheme('pan-down-symbolic');
  84. }
  85. &:hover { background-color: mix($fg_color, $base_color, 10%); }
  86. &:backdrop { background-color: $backdrop_menu_color; }
  87. &:disabled {
  88. color: transparent;
  89. background-color: transparent;
  90. border-color: transparent ;
  91. }
  92. }
  93. }
  94. menuitem {
  95. accelerator { color: gtkalpha(currentColor,0.55); }
  96. check,
  97. radio {
  98. min-height: 16px;
  99. min-width: 16px;
  100. &:dir(ltr) { margin-right: 7px; }
  101. &:dir(rtl) { margin-left: 7px; }
  102. }
  103. }