_app-grid.scss
ASCII text
1/* App Grid */ 2 3// app icons 4.icon-grid { 5@if $version >= 3.38 { 6row-spacing: 48px; 7column-spacing: 48px; 8max-row-spacing: 96px; 9max-column-spacing: 96px; 10} @else { 11-shell-grid-horizontal-item-size: 136px; 12-shell-grid-vertical-item-size: 136px; 13spacing: 32px; 14 15.overview-icon { 16icon-size: 96px; 17} 18} 19} 20 21@if $version < 3.38 { 22.app-display { 23// spacing: 20px; 24} 25} 26 27/* App Icons */ 28 29// Icon tiles in the app grid 30.app-well-app, 31%app-well-app { 32@extend %overview-icon; 33 34.overview-icon.overview-icon-with-label { 35padding: 8px; 36spacing: 0; 37 38> StBoxLayout { 39spacing: 4px; 40} 41} 42} 43 44/* App Folders */ 45.app-well-app.app-folder { 46@extend %app-well-app; 47border-radius: $corner-radius; // same as .overview-icon 48background-color: transparent; 49} 50 51// expanded folder 52.app-folder-dialog { 53border: 0; 54border-radius: $corner-radius; 55background-color: $surface-z8; 56color: $on-surface; 57 58@if $version >= 3.38 { 59padding: 12px; 60} @else { 61spacing: 12px; 62} 63 64.folder-name-container { 65padding: 24px 36px 0; 66spacing: 12px; 67 68.folder-name-label, 69.folder-name-entry { 70@include type(headline6); 71} 72 73.folder-name-entry { 74width: 300px; 75} 76 77// FIXME: this is to keep the label in sync with the entry 78.folder-name-label { 79padding: 0 8px; 80color: inherit; 81} 82 83.edit-folder-button { 84@extend %button; 85 86width: $medium-size; 87height: $medium-size; 88min-width: 0; 89min-height: 0; 90padding: 0; 91border-radius: $medium-size / 2; 92 93> StIcon { 94icon-size: 16px; 95} 96} 97} 98 99.icon-grid { 100row-spacing: 16px; 101column-spacing: 32px; 102} 103 104.page-indicators { 105margin-bottom: 16px; 106 107.page-indicator { 108padding: 16px 12px; 109} 110} 111 112.app-well-app { 113&:focus { 114.overview-icon { 115background-color: overlay("focus", $on-surface); 116} 117} 118 119&:drop, 120&:hover, 121&:selected { 122.overview-icon { 123background-color: overlay("hover", $on-surface); 124} 125} 126 127&:active, 128&:checked { 129.overview-icon { 130background-color: overlay("pressed", $on-surface); 131} 132} 133} 134} 135 136.app-folder-dialog-container { 137padding: 12px; 138 139@if $version >= 3.38 { 140width: 620px; 141height: 620px; 142} @else { 143width: 800px; 144height: 600px; 145} 146} 147 148@if $version < 3.36 { 149// expanded collection 150.app-folder-popup { 151-arrow-base: 24px; 152-arrow-rise: 12px; 153-arrow-border-radius: $corner-radius; 154-arrow-background-color: fill($on-dark); 155} 156 157.app-folder-popup-bin { 158padding: 6px; 159} 160} 161 162.app-folder-icon { 163padding: 8px; 164spacing-rows: 4px; 165spacing-columns: 4px; 166border-radius: $corner-radius; 167background-color: fill($on-dark); 168 169// HACK: Force icon size to 32px 170> StBin > StIcon { 171padding: 2px; 172} 173} 174 175// Running app indicator (also shown in dash) 176.app-well-app-running-dot { 177height: 2px; 178width: 32px; 179margin-bottom: 0; 180border-radius: 0; 181background-color: $on-dark; 182} 183 184// Rename popup for app folders 185.rename-folder-popup { 186.rename-folder-popup-item { 187spacing: 6px; 188 189&:ltr, 190&:rtl { 191padding: 0 12px; 192} 193} 194} 195 196// right-click app menu 197.app-menu, 198.app-well-menu { 199max-width: 27.25em; 200} 201 202// App Grid pagination indicators 203.page-indicator { 204padding: 15px 20px; 205 206@if $version >= 3.36 { 207.page-indicator-icon { 208width: 12px; 209height: 12px; 210border-radius: 12px; // the same as height&width 211background-color: $on-dark; 212} 213} @else { 214.page-indicator-icon { 215width: 12px; 216height: 12px; 217border: 0; 218border-radius: 12px; 219background-image: none; 220background-color: disabled-hint($on-dark); 221transition-duration: $duration; 222} 223 224&:hover .page-indicator-icon { 225border-color: transparent; 226background-image: none; 227background-color: disabled($on-dark); 228} 229 230&:active .page-indicator-icon { 231margin: 0; 232border: 0; 233background-image: none; 234background-color: hint($on-dark); 235} 236 237&:checked .page-indicator-icon, 238&:checked:active .page-indicator-icon { 239background-image: none; 240background-color: $on-dark; 241transition-duration: 0ms; 242} 243 244&:checked:active { 245background-image: none; 246background-color: transparent; 247} 248} 249} 250 251// Some hacks I don't even know 252$search-display: if($version < 3.34, ".search-display > StBoxLayout,", null); 253$frequent-apps: if($version < 3.38, ".frequent-apps > StBoxLayout,", null); 254 255#{$search-display} 256#{$frequent-apps} 257.all-apps { 258// horizontal padding to make sure scrollbars or dash don't overlap content 259padding: 0 88px 10px; 260} 261 262@if $version < 3.38 { 263// Label when no frequent apps 264.no-frequent-applications-label { 265@extend %overview-status-text; 266} 267} 268 269// shutdown and other actions in the grid 270.system-action-icon { 271icon-size: 48px; 272border-radius: $circular-radius; 273box-shadow: 0 4px 4px rgba(black, .2); // FIXME: this should really have a highlight 274background-color: $grey-900; 275color: on($grey-900); 276} 277 278@if $version < 3.38 { 279/* Frequent | All toggle */ 280 281// container 282.app-view-controls { 283width: 320px; 284padding-bottom: 32px; 285} 286 287// buttons 288.app-view-control { 289margin: 0; 290padding: 0 8px; 291 292&, &:focus, &:hover, &:active, &:checked { 293@include button(flat-normal, $tc: $on-dark); 294} 295 296&:hover { 297background-color: overlay("hover", $on-dark); 298} 299 300&:active { 301background-color: overlay("pressed", $on-dark); 302transition-duration: $duration-ripple; 303} 304 305&:checked { 306box-shadow: inset 0 2px 0 $on-dark; 307background-color: rgba(black, .01); 308color: $on-dark; 309} 310 311&:focus { 312background-color: overlay("focus", $on-dark); 313} 314 315&:first-child { 316border-right-width: 0; 317border-radius: $corner-radius; 318} 319 320&:last-child { 321border-radius: $corner-radius; 322} 323 324&:checked { 325border-radius: 0; 326} 327} 328} 329