_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: overlay("focus", $on-surface); 136} 137} 138 139&:drop, 140&:hover, 141&:selected { 142.overview-icon { 143background-color: overlay("hover", $on-surface); 144} 145} 146 147&:active, 148&:checked { 149.overview-icon { 150background-color: overlay("pressed", $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-folder-icon { 184padding: 8px; 185spacing-rows: 4px; 186spacing-columns: 4px; 187border-radius: $corner-radius; 188background-color: fill($on-dark); 189 190// HACK: Force icon size to 32px 191> StBin > StIcon { 192padding: 2px; 193} 194} 195} 196 197// Running app indicator (also shown in dash) 198.app-well-app-running-dot { 199height: 2px; 200width: 32px; 201margin-bottom: 0; 202border-radius: 0; 203background-color: $on-dark; 204} 205 206// Rename popup for app folders 207.rename-folder-popup { 208.rename-folder-popup-item { 209spacing: 6px; 210 211&:ltr, 212&:rtl { 213padding: 0 12px; 214} 215} 216} 217 218// right-click app menu 219.app-menu, 220.app-well-menu { 221max-width: 27.25em; 222} 223 224// App Grid pagination indicators 225.page-indicator { 226@if $version >= 40 { 227padding: 8px 12px 0; 228} @else { 229padding: 16px 20px; 230} 231 232@if $version >= 3.36 { 233.page-indicator-icon { 234width: 12px; 235height: 12px; 236border-radius: 12px; // the same as height&width 237background-color: $on-dark; 238} 239} @else { 240.page-indicator-icon { 241width: 12px; 242height: 12px; 243border: 0; 244border-radius: 12px; 245background-image: none; 246background-color: disabled-hint($on-dark); 247transition-duration: $duration; 248} 249 250&:hover .page-indicator-icon { 251border-color: transparent; 252background-image: none; 253background-color: disabled($on-dark); 254} 255 256&:active .page-indicator-icon { 257margin: 0; 258border: 0; 259background-image: none; 260background-color: hint($on-dark); 261} 262 263&:checked .page-indicator-icon, 264&:checked:active .page-indicator-icon { 265background-image: none; 266background-color: $on-dark; 267transition-duration: 0ms; 268} 269 270&:checked:active { 271background-image: none; 272background-color: transparent; 273} 274} 275} 276 277@if $version >= 40 { 278.apps-scroll-view { 279padding: 0; 280} 281} @else if $version >= 3.38 { 282.all-apps { 283// horizontal padding to make sure scrollbars or dash don't overlap content 284padding: 0 88px 10px; 285} 286} @else if $version >= 3.34 { 287.all-apps, 288.frequent-apps > StBoxLayout { 289// horizontal padding to make sure scrollbars or dash don't overlap content 290padding: 0 88px 10px; 291} 292} @else { 293.search-display > StBoxLayout, 294.all-apps, 295.frequent-apps > StBoxLayout { 296// horizontal padding to make sure scrollbars or dash don't overlap content 297padding: 0 88px 10px; 298} 299} 300 301@if $version < 3.38 { 302// Label when no frequent apps 303.no-frequent-applications-label { 304@extend %overview-status-text; 305} 306} 307 308// shutdown and other actions in the grid 309.system-action-icon { 310icon-size: 48px; 311border-radius: $circular-radius; 312box-shadow: 0 4px 4px rgba(black, .2); // FIXME: this should really have a highlight 313background-color: $grey-900; 314color: on($grey-900); 315} 316 317@if $version >= 40 { 318.page-navigation-hint { 319width: 300px; 320 321&.dnd { 322background: overlay("dragged", $on-system); 323} 324 325&.next:ltr, 326&.previous:rtl { 327background-gradient-start: fill($on-system); 328background-gradient-end: fill($on-system); 329background-gradient-direction: horizontal; 330border-radius: $corner-radius 0 0 $corner-radius; 331} 332 333&.previous:ltr, 334&.next:rtl { 335background-gradient-start: fill($on-system); 336background-gradient-end: fill($on-system); 337background-gradient-direction: horizontal; 338border-radius: 0 $corner-radius $corner-radius 0; 339} 340} 341 342.page-navigation-arrow { 343width: 24px; 344height: 24px; 345margin: 6px; 346} 347} 348 349@if $version < 3.38 { 350/* Frequent | All toggle */ 351 352// container 353.app-view-controls { 354width: 320px; 355padding-bottom: 32px; 356} 357 358// buttons 359.app-view-control { 360margin: 0; 361padding: 0 8px; 362 363&, &:focus, &:hover, &:active, &:checked { 364@include button(flat-normal, $tc: $on-dark); 365} 366 367&:hover { 368background-color: overlay("hover", $on-dark); 369} 370 371&:active { 372background-color: overlay("pressed", $on-dark); 373transition-duration: $duration-ripple; 374} 375 376&:checked { 377box-shadow: inset 0 2px 0 $on-dark; 378background-color: rgba(black, .01); 379color: $on-dark; 380} 381 382&:focus { 383background-color: overlay("focus", $on-dark); 384} 385 386&:first-child { 387border-right-width: 0; 388border-radius: $corner-radius; 389} 390 391&:last-child { 392border-radius: $corner-radius; 393} 394 395&:checked { 396border-radius: 0; 397} 398} 399} 400