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