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