_menus.scss 2.7 KB

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