_menu.scss
ASCII text
1/* Popovers/Menus */ 2 3@use "../../../../theme"; 4@use "../../../../theme-color"; 5@use "../../../../st-theme"; 6@use "../../gnome-shell"; 7 8// the popover itself 9.popup-menu-boxpointer { 10-arrow-base: 0; 11-arrow-rise: 0; 12-arrow-border-width: 0; 13-arrow-border-color: transparent; 14-arrow-border-radius: 20px; // This is necessary for the weird bug: materia-theme#296 15-arrow-box-shadow: none; // dreaming bugzilla #689995 16-arrow-background-color: transparent; 17} 18 19// container of the popover menu 20.popup-menu { 21min-width: 15em; 22border-color: transparent; 23color: inherit; 24 25// dunno what that is 26.popup-status-menu-item { 27// font-weight: normal; 28// color: pink; 29} 30 31&.panel-menu { 32-boxpointer-gap: 0; // distance from the panel 33margin-bottom: 1.75em; 34} 35} 36 37.popup-menu-content { 38margin: 8px; 39padding: 8px 0; 40border-radius: theme.$corner-radius; 41box-shadow: theme.$shadow-z4; 42background-color: theme-color.$surface-z8; 43color: theme-color.$on-surface; 44} 45 46// menu items 47.popup-menu-item { 48// min-height: $menuitem-size - 4px * 2; 49spacing: 8px; 50padding: 0; 51transition-duration: st-theme.$duration; 52 53&:ltr { 54padding: 0.4em; 55padding-right: 24px; 56padding-left: 0; 57} 58 59&:rtl { 60padding: 0.4em; 61padding-right: 0; 62padding-left: 24px; 63} 64 65&.selected { 66background-color: theme-color.hover-overlay(theme-color.$on-surface); 67transition-duration: 0ms; 68 69&, 70&:active { 71color: theme-color.$on-surface; 72} 73} 74 75&:active { 76background-color: theme-color.pressed-overlay(theme-color.$on-surface); 77color: theme-color.$on-surface; 78transition-duration: st-theme.$duration-ripple; 79} 80 81&:checked { 82box-shadow: none; 83background-color: theme-color.$selected-overlay; 84font-weight: normal; 85 86&.selected { 87background-color: theme-color.hover-overlay(theme-color.$primary, $on: theme-color.$selected-overlay); 88} 89 90&:active { 91background-color: theme-color.pressed-overlay(theme-color.$primary, $on: theme-color.$selected-overlay); 92} 93} 94 95&:insensitive { 96color: theme-color.disabled(theme-color.$on-surface); 97} 98 99.toggle-switch { 100width: 20px; 101height: 20px; 102background-image: url("assets/menu-item-toggle-off.svg"); 103 104&:checked { 105background-image: url("assets/menu-item-toggle-on.svg"); 106} 107} 108} 109 110// all icons and other graphical elements 111.popup-inactive-menu-item { 112color: theme-color.$on-surface; 113 114&:insensitive { 115color: theme-color.disabled(theme-color.$on-surface); 116} 117} 118 119// symbolic icons in popover 120 121.popup-menu-arrow { 122@if gnome-shell.$version >= 3.32 { 123icon-size: 16px; 124} @else { 125width: 16px; 126height: 16px; 127} 128 129.popup-menu-content & { 130color: theme-color.hint(theme-color.$on-surface); 131} 132} 133 134.popup-menu-icon { 135icon-size: 16px; 136color: theme-color.hint(theme-color.$on-surface); 137} 138 139// popover submenus 140.popup-sub-menu { 141border-top: 0; 142border-bottom: 0; 143padding-bottom: 0; 144box-shadow: none; 145background-color: theme-color.entry-fill(theme-color.$on-surface); 146} 147 148// container for radio and check boxes 149.popup-menu-ornament { 150text-align: right; 151width: 16px; 152height: 16px; 153 154&:ltr { 155text-align: right; 156} 157 158&:rtl { 159text-align: left; 160} 161} 162 163// separator 164@if gnome-shell.$version >= 3.36 { 165.popup-separator-menu-item { 166padding: 0; 167 168.popup-separator-menu-item-separator { 169// -margin-horizontal: 24px; 170height: 1px; // not really the whole box 171margin: 8px 0; 172background-color: theme-color.divider(theme-color.$on-surface); 173 174// submenu separators 175.popup-sub-menu & { 176margin: 8px 0; 177background-color: theme-color.divider(theme-color.$on-surface); 178 179&:ltr { 180margin-right: 32px; 181} 182 183&:rtl { 184margin-left: 32px; 185} 186} 187} 188} 189} @else { 190.popup-separator-menu-item { 191// -margin-horizontal: 24px; 192height: 1px; // not really the whole box 193margin: 8px 64px - 24px; 194border: 0; 195background-color: theme-color.divider(theme-color.$on-surface); 196} 197} 198 199// desktop background menu 200.background-menu { 201-boxpointer-gap: 4px; 202-arrow-rise: 0; // hide the beak on the menu 203} 204 205// system status menu 206.aggregate-menu { 207min-width: 21em; 208 209// lock screen, shutdown, etc. buttons 210.popup-menu-icon { 211padding: 0; 212margin: 0 4px; 213-st-icon-style: symbolic; // >= 3.36 214} 215 216.popup-sub-menu .popup-menu-item > :first-child { 217// account for icons in submenus with padding 218&:ltr { 219padding-left: 16px; 220margin-left: 16px; 221} 222 223&:rtl { 224padding-right: 16px; 225margin-right: 16px; 226} 227} 228} 229 230@if gnome-shell.$version == 3.32 { 231.system-switch-user-submenu-icon { 232icon-size: 16px; 233padding: 0 4px; 234} 235} @else if gnome-shell.$version < 3.32 { 236.system-switch-user-submenu-icon.user-icon { 237icon-size: 20px; 238padding: 0 2px; 239} 240 241.system-switch-user-submenu-icon.default-icon { 242icon-size: 16px; 243padding: 0 4px; 244} 245} 246 247@if gnome-shell.$version < 3.36 { 248.system-menu-action { 249-st-icon-style: symbolic; // >= 3.30 250padding: (theme.$large-size - 16px) / 2; 251border: 0; 252border-radius: theme.$large-size / 2; // wish we could do 50% 253color: theme-color.hint(theme-color.$on-surface); 254transition-duration: st-theme.$duration; 255 256&:hover, 257&:focus { 258padding: (theme.$large-size - 16px) / 2; 259border: 0; 260color: theme-color.hint(theme-color.$on-surface); 261} 262 263&:focus { 264background-color: theme-color.focus-overlay(theme-color.$on-surface); 265} 266 267&:hover { 268background-color: theme-color.hover-overlay(theme-color.$on-surface); 269} 270 271&:active { 272background-color: theme-color.pressed-overlay(theme-color.$on-surface); 273color: theme-color.hint(theme-color.$on-surface); 274transition-duration: st-theme.$duration-ripple; 275} 276 277> StIcon { 278icon-size: 16px; 279} 280} 281} 282