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