| 1 |
@function gtkalpha($c,$a) { |
| 2 |
@return unquote("alpha(#{$c},#{$a})"); |
| 3 |
} |
| 4 |
|
| 5 |
$ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94); |
| 6 |
$backdrop_transition: 200ms ease-out; |
| 7 |
$asset_suffix: if($variant=='dark', '-dark', ''); // use dark assets in dark variant |
| 8 |
$darker_asset_suffix: if($variant=='darker', '-dark', $asset_suffix); |
| 9 |
|
| 10 |
* { |
| 11 |
background-clip: padding-box; |
| 12 |
-GtkToolButton-icon-spacing: 4; |
| 13 |
-GtkTextView-error-underline-color: $error_color; |
| 14 |
|
| 15 |
-GtkScrolledWindow-scrollbar-spacing: 0; |
| 16 |
|
| 17 |
-GtkToolItemGroup-expander-size: 11; |
| 18 |
|
| 19 |
-GtkWidget-text-handle-width: 20; |
| 20 |
-GtkWidget-text-handle-height: 20; |
| 21 |
|
| 22 |
-GtkDialog-button-spacing: 4; |
| 23 |
-GtkDialog-action-area-border: 0; |
| 24 |
|
| 25 |
// We use the outline properties to signal the focus properties |
| 26 |
outline-color: gtkalpha(currentColor, 0.3); |
| 27 |
outline-style: dashed; |
| 28 |
outline-offset: -3px; |
| 29 |
outline-width: 1px; |
| 30 |
-gtk-outline-radius: 2px; |
| 31 |
} |
| 32 |
|
| 33 |
|
| 34 |
// |
| 35 |
// Base States |
| 36 |
// |
| 37 |
.background { |
| 38 |
color: $fg_color; |
| 39 |
background-color: if($transparency == 'true', transparentize($bg_color, 0.001), $bg_color); // without this headerbar transparency doesn't seem to work |
| 40 |
} |
| 41 |
|
| 42 |
*:disabled { -gtk-icon-effect: dim; } |
| 43 |
|
| 44 |
.gtkstyle-fallback { |
| 45 |
background-color: $bg_color; |
| 46 |
color: $fg_color; |
| 47 |
&:hover { |
| 48 |
background-color: lighten($bg_color, 10%); |
| 49 |
color: $fg_color; |
| 50 |
} |
| 51 |
&:active { |
| 52 |
background-color: darken($bg_color, 10%); |
| 53 |
color: $fg_color; |
| 54 |
} |
| 55 |
&:disabled { |
| 56 |
background-color: $insensitive_bg_color; |
| 57 |
color: $insensitive_fg_color; |
| 58 |
} |
| 59 |
&:selected { |
| 60 |
background-color: $selected_bg_color; |
| 61 |
color: $selected_fg_color; |
| 62 |
} |
| 63 |
} |
| 64 |
|
| 65 |
.view, |
| 66 |
%view { |
| 67 |
color: $text_color; |
| 68 |
background-color: $base_color; |
| 69 |
|
| 70 |
&:selected { |
| 71 |
&, &:focus { |
| 72 |
@extend %selected_items; |
| 73 |
border-radius: 2px; |
| 74 |
} |
| 75 |
} |
| 76 |
} |
| 77 |
|
| 78 |
.view, |
| 79 |
textview { |
| 80 |
text { |
| 81 |
@extend %view; |
| 82 |
|
| 83 |
selection { &:focus, & { @extend %selected_items; }} |
| 84 |
} |
| 85 |
} |
| 86 |
|
| 87 |
textview border { background-color: mix($bg_color, $base_color, 50%); } |
| 88 |
|
| 89 |
iconview { @extend .view; } |
| 90 |
|
| 91 |
rubberband, |
| 92 |
.rubberband { |
| 93 |
border: 1px solid darken($selected_bg_color, 10%); |
| 94 |
background-color: transparentize(darken($selected_bg_color, 10%), 0.8); |
| 95 |
} |
| 96 |
|
| 97 |
flowbox { |
| 98 |
rubberband { @extend rubberband } |
| 99 |
|
| 100 |
flowboxchild { |
| 101 |
padding: 3px; |
| 102 |
border-radius: 2px; |
| 103 |
|
| 104 |
&:selected { |
| 105 |
@extend %selected_items; |
| 106 |
|
| 107 |
outline-offset: -2px; |
| 108 |
} |
| 109 |
} |
| 110 |
} |
| 111 |
|
| 112 |
label { |
| 113 |
&.separator { |
| 114 |
@extend .dim-label; |
| 115 |
|
| 116 |
color: $fg_color; |
| 117 |
} |
| 118 |
|
| 119 |
row:selected &, |
| 120 |
&:selected { @extend %nobg_selected_items; } |
| 121 |
|
| 122 |
selection { |
| 123 |
color: $selected_fg_color; |
| 124 |
background-color: $selected_bg_color; |
| 125 |
} |
| 126 |
|
| 127 |
&:disabled { |
| 128 |
color: $insensitive_fg_color; |
| 129 |
|
| 130 |
selection { @extend %selected_items_disabled; } |
| 131 |
} |
| 132 |
} |
| 133 |
|
| 134 |
.dim-label { |
| 135 |
opacity: 0.55; |
| 136 |
} |
| 137 |
|
| 138 |
assistant { |
| 139 |
.sidebar { |
| 140 |
background-color: $base_color; |
| 141 |
border-top: 1px solid $borders_color; |
| 142 |
} |
| 143 |
|
| 144 |
&.csd .sidebar { border-top-style: none; } |
| 145 |
|
| 146 |
.sidebar label { padding: 6px 12px; } |
| 147 |
|
| 148 |
.sidebar label.highlight { |
| 149 |
background-color: $selected_bg_color; |
| 150 |
color: $selected_fg_color; |
| 151 |
} |
| 152 |
} |
| 153 |
|
| 154 |
textview { // This will get overridden by .view, needed by gedit line numbers |
| 155 |
background-color: $base_color; |
| 156 |
} |
| 157 |
|
| 158 |
%osd, .osd { |
| 159 |
color: $osd_fg_color; |
| 160 |
border: none; |
| 161 |
background-color: $osd_bg_color; |
| 162 |
background-clip: padding-box; |
| 163 |
box-shadow: none; |
| 164 |
} |
| 165 |
|
| 166 |
// |
| 167 |
// Spinner Animations |
| 168 |
// |
| 169 |
@keyframes spin { |
| 170 |
to { -gtk-icon-transform: rotate(1turn); } |
| 171 |
} |
| 172 |
|
| 173 |
spinner { |
| 174 |
background: none; |
| 175 |
opacity: 0; // non spinning spinner makes no sense |
| 176 |
-gtk-icon-source: -gtk-icontheme('process-working-symbolic'); |
| 177 |
|
| 178 |
&:checked { |
| 179 |
opacity: 1; |
| 180 |
animation: spin 1s linear infinite; |
| 181 |
|
| 182 |
&:disabled { |
| 183 |
opacity: 0.5; |
| 184 |
} |
| 185 |
} |
| 186 |
} |
| 187 |
|
| 188 |
// |
| 189 |
// Text Entries |
| 190 |
// |
| 191 |
entry { |
| 192 |
min-height: 22px; |
| 193 |
border: 1px solid; |
| 194 |
padding: 2px 8px; |
| 195 |
|
| 196 |
caret-color: currentColor; |
| 197 |
border-radius: 3px; |
| 198 |
transition: all 200ms $ease-out-quad; |
| 199 |
|
| 200 |
&.search { border-radius: 20px; } |
| 201 |
|
| 202 |
@include entry(normal); |
| 203 |
|
| 204 |
image { // icons inside the entry |
| 205 |
color: mix($fg_color,$base_color,80%); |
| 206 |
|
| 207 |
&.left { padding-left: 0; padding-right: 5px; } |
| 208 |
&.right { padding-right: 0; padding-left: 5px; } |
| 209 |
} |
| 210 |
|
| 211 |
&.flat { |
| 212 |
&, &:focus { |
| 213 |
min-height: 0; |
| 214 |
padding: 2px; |
| 215 |
background-image: none; |
| 216 |
border-color: transparent; |
| 217 |
border-radius: 0; |
| 218 |
} |
| 219 |
} |
| 220 |
|
| 221 |
&:focus { |
| 222 |
background-clip: border-box; |
| 223 |
@include entry(focus); |
| 224 |
} |
| 225 |
|
| 226 |
&:disabled { @include entry(insensitive); } |
| 227 |
|
| 228 |
selection { &:focus, & { @extend %selected_items; }} |
| 229 |
|
| 230 |
// error and warning style |
| 231 |
@each $e_type, $e_color, $e_fg_color in (warning, $warning_color, $warning_fg_color), |
| 232 |
(error, $error_color, $error_fg_color), |
| 233 |
// entry.search-missing for Gnome-Builder |
| 234 |
(search-missing, $error_color, $error_fg_color) { |
| 235 |
&.#{$e_type} { |
| 236 |
color: $e_fg_color; |
| 237 |
border-color: if($variant!='dark', $e_color, $entry_border); |
| 238 |
background-color: mix($e_color, $base_color, 60%); |
| 239 |
|
| 240 |
image { color: $e_fg_color; } |
| 241 |
|
| 242 |
&:focus { |
| 243 |
color: $e_fg_color; |
| 244 |
background-color: $e_color; |
| 245 |
box-shadow: none; |
| 246 |
} |
| 247 |
selection, selection:focus { |
| 248 |
background-color: $e_fg_color; |
| 249 |
color: $e_color; |
| 250 |
} |
| 251 |
} |
| 252 |
} |
| 253 |
|
| 254 |
&:drop(active) { |
| 255 |
&:focus, & { |
| 256 |
border-color: $drop_target_color; |
| 257 |
box-shadow: none; |
| 258 |
} |
| 259 |
} |
| 260 |
|
| 261 |
.osd & { |
| 262 |
@include entry(osd); |
| 263 |
&:focus { @include entry(osd-focus); } |
| 264 |
&:disabled { @include entry(osd-insensitive); } |
| 265 |
|
| 266 |
selection { |
| 267 |
&:focus, & { |
| 268 |
color: $selected_bg_color; |
| 269 |
background-color: $selected_fg_color; |
| 270 |
} |
| 271 |
} |
| 272 |
} |
| 273 |
|
| 274 |
progress { |
| 275 |
margin: 0 -6px; |
| 276 |
border-radius: 0; |
| 277 |
border-width: 0 0 2px; |
| 278 |
border-color: $selected_bg_color; |
| 279 |
border-style: solid; |
| 280 |
background-image: none; |
| 281 |
background-color: transparent; |
| 282 |
box-shadow: none; |
| 283 |
} |
| 284 |
|
| 285 |
// linked entries |
| 286 |
.linked:not(.vertical) > &, |
| 287 |
.linked:not(.vertical) > &:focus { @extend %linked; } |
| 288 |
|
| 289 |
.linked.vertical > &, |
| 290 |
.linked.vertical > &:focus { @extend %linked_vertical; } |
| 291 |
} |
| 292 |
|
| 293 |
treeview entry { |
| 294 |
&.flat, & { |
| 295 |
border-radius: 0; |
| 296 |
background-image: none; |
| 297 |
background-color: $base_color; |
| 298 |
|
| 299 |
&:focus { border-color: $selected_bg_color; } |
| 300 |
} |
| 301 |
} |
| 302 |
|
| 303 |
.entry-tag { |
| 304 |
padding: 5px; |
| 305 |
|
| 306 |
margin-top: 1px; |
| 307 |
margin-bottom: 1px; |
| 308 |
|
| 309 |
// side margins: compensate the entry padding with a negative margin |
| 310 |
// then the negative margin itself |
| 311 |
:dir(ltr) & { |
| 312 |
margin-left: 8px; |
| 313 |
margin-right: -6px; |
| 314 |
} |
| 315 |
:dir(rtl) & { |
| 316 |
margin-left: -6px; |
| 317 |
margin-right: 8px; |
| 318 |
} |
| 319 |
|
| 320 |
background-color: $selected_bg_color; |
| 321 |
border-color: transparent; |
| 322 |
color: $selected_fg_color; |
| 323 |
|
| 324 |
:not(:backdrop) &.button:hover { |
| 325 |
color: transparentize($selected_fg_color, 0.3); |
| 326 |
} |
| 327 |
} |
| 328 |
|
| 329 |
// |
| 330 |
// Buttons |
| 331 |
// |
| 332 |
// stuff for .needs-attention |
| 333 |
$_dot_color: $selected_bg_color; |
| 334 |
|
| 335 |
@keyframes needs_attention { |
| 336 |
from { |
| 337 |
background-image: -gtk-gradient(radial, |
| 338 |
center center, 0, |
| 339 |
center center, 0.01, |
| 340 |
to($_dot_color), |
| 341 |
to(transparent)); |
| 342 |
} |
| 343 |
to { |
| 344 |
background-image: -gtk-gradient(radial, |
| 345 |
center center, 0, |
| 346 |
center center, 0.5, |
| 347 |
to($selected_bg_color), |
| 348 |
to(transparent)); |
| 349 |
} |
| 350 |
} |
| 351 |
|
| 352 |
$button_transition: all 200ms $ease-out-quad; |
| 353 |
button { |
| 354 |
min-height: 22px; |
| 355 |
min-width: 20px; |
| 356 |
transition: $button_transition; |
| 357 |
border: 1px solid; |
| 358 |
border-radius: 3px; |
| 359 |
padding: 2px 6px; |
| 360 |
|
| 361 |
@include button(normal); |
| 362 |
|
| 363 |
separator { margin: 4px 1px; } |
| 364 |
|
| 365 |
@at-root %button_basic_flat, |
| 366 |
&.flat { |
| 367 |
@include button(undecorated); |
| 368 |
// to avoid adiacent buttons borders clashing when transitioning, the transition on the normal state is set |
| 369 |
// to none, while it's added back in the hover state, so the button decoration will fade in on hover, but |
| 370 |
// it won't fade out when the pointer leave the button allocation area. To make the transition more evident |
| 371 |
// in this case the duration is increased. |
| 372 |
transition: none; |
| 373 |
|
| 374 |
&:hover { |
| 375 |
transition: $button_transition; |
| 376 |
transition-duration: 350ms; |
| 377 |
|
| 378 |
&:active { transition: $button_transition; } |
| 379 |
} |
| 380 |
} |
| 381 |
|
| 382 |
&:hover { |
| 383 |
@include button(hover); |
| 384 |
-gtk-icon-effect: highlight; |
| 385 |
} |
| 386 |
|
| 387 |
&:active, &:checked { |
| 388 |
@include button(active); |
| 389 |
|
| 390 |
background-clip: if($variant!='dark', border-box, padding-box); |
| 391 |
transition-duration: 50ms; |
| 392 |
|
| 393 |
&:not(:disabled) label:disabled { color: inherit; opacity: 0.6; } |
| 394 |
} |
| 395 |
|
| 396 |
//Webkitgtk workaround start |
| 397 |
&:active { color: $fg_color; } |
| 398 |
&:active:hover, &:checked { color: $selected_fg_color; } |
| 399 |
//Webkitgtk workaround end |
| 400 |
|
| 401 |
@at-root %button_basic_flat, |
| 402 |
&.flat:disabled { @include button(undecorated); } |
| 403 |
|
| 404 |
&:disabled { |
| 405 |
@include button(insensitive); |
| 406 |
|
| 407 |
&:active, &:checked { |
| 408 |
@include button(insensitive-active); |
| 409 |
} |
| 410 |
} |
| 411 |
|
| 412 |
&.image-button { |
| 413 |
min-width: 24px; |
| 414 |
padding-left: 5px; |
| 415 |
padding-right: 5px; |
| 416 |
} |
| 417 |
|
| 418 |
&.text-button { |
| 419 |
padding-left: 12px; |
| 420 |
padding-right: 12px; |
| 421 |
} |
| 422 |
|
| 423 |
&.text-button.image-button { |
| 424 |
padding-left: 5px; |
| 425 |
padding-right: 5px; |
| 426 |
|
| 427 |
label { |
| 428 |
padding-left: 2px; |
| 429 |
padding-right: 2px; |
| 430 |
|
| 431 |
&:first-child { |
| 432 |
padding-left: 7px; |
| 433 |
padding-right: 2px; |
| 434 |
} |
| 435 |
&:last-child { |
| 436 |
padding-right: 7px; |
| 437 |
padding-left: 2px; |
| 438 |
} |
| 439 |
&:only-child { |
| 440 |
padding-left: 7px; |
| 441 |
padding-right: 7px; |
| 442 |
} |
| 443 |
} |
| 444 |
|
| 445 |
&.popup { padding-right: 7px; padding-left: 7px; } |
| 446 |
} |
| 447 |
|
| 448 |
@at-root %button_basic_drop_active, |
| 449 |
&:drop(active) { |
| 450 |
color: $drop_target_color; |
| 451 |
border-color: $drop_target_color; |
| 452 |
box-shadow: none; |
| 453 |
} |
| 454 |
|
| 455 |
// big standalone buttons like in Documents pager |
| 456 |
&.osd { |
| 457 |
color: $osd_fg_color; |
| 458 |
background-color: $osd_bg_color; |
| 459 |
border-color: darken($osd_bg_color, 8%); |
| 460 |
|
| 461 |
&.image-button { |
| 462 |
padding: 0; |
| 463 |
min-height: 36px; |
| 464 |
min-width: 36px; |
| 465 |
} |
| 466 |
|
| 467 |
&:hover { color: $selected_bg_color; } |
| 468 |
&:active, &:checked { @include button(osd-active); } |
| 469 |
&:disabled { @include button(osd-insensitive); } |
| 470 |
} |
| 471 |
|
| 472 |
//overlay / OSD style |
| 473 |
.osd & { |
| 474 |
@include button(osd); |
| 475 |
|
| 476 |
&:hover { @include button(osd-hover); } |
| 477 |
&:active, &:checked { |
| 478 |
background-clip: padding-box; |
| 479 |
@include button(osd-active); |
| 480 |
} |
| 481 |
&:disabled { @include button(osd-insensitive); } |
| 482 |
|
| 483 |
&.flat { |
| 484 |
@include button(undecorated); |
| 485 |
box-shadow: none; |
| 486 |
&:hover { @include button(osd-hover); } |
| 487 |
&:disabled { |
| 488 |
@include button(osd-insensitive); |
| 489 |
background-image: none; |
| 490 |
} |
| 491 |
&:active, &:checked { @include button(osd-active); } |
| 492 |
} |
| 493 |
} |
| 494 |
.osd .linked:not(.vertical):not(.path-bar) > &:hover:not(:checked):not(:active):not(:only-child), |
| 495 |
.osd .linked:not(.vertical):not(.path-bar) > &:hover:not(:checked):not(:active) + &:not(:checked):not(:active) { box-shadow: none; } |
| 496 |
|
| 497 |
// Suggested and Destructive Action buttons |
| 498 |
@each $b_type, $b_color, $b_fg in (suggested-action, $suggested_color, $suggested_fg_color), |
| 499 |
(destructive-action, $destructive_color, $destructive_fg_color) { |
| 500 |
&.#{$b_type} { |
| 501 |
@include button(suggested_destructive, $b_color, $b_fg); |
| 502 |
|
| 503 |
&.flat { |
| 504 |
@include button(undecorated); |
| 505 |
color: $b_color; |
| 506 |
} |
| 507 |
&:hover { |
| 508 |
@include button(suggested_destructive, lighten($b_color, 10%), $b_fg); |
| 509 |
} |
| 510 |
&:active, &:checked { |
| 511 |
@include button(suggested_destructive, darken($b_color, 10%), $b_fg); |
| 512 |
} |
| 513 |
&.flat:disabled { |
| 514 |
@include button(undecorated); |
| 515 |
color: $insensitive_fg_color; |
| 516 |
} |
| 517 |
&:disabled { @include button(insensitive); } |
| 518 |
} |
| 519 |
} |
| 520 |
|
| 521 |
.stack-switcher > & { |
| 522 |
// to position the needs attention dot, padding is added to the button |
| 523 |
// child, a label needs just lateral padding while an icon needs vertical |
| 524 |
// padding added too. |
| 525 |
|
| 526 |
outline-offset: -3px; // needs to be set or it gets overridden by GtkRadioButton outline-offset |
| 527 |
|
| 528 |
> label { |
| 529 |
padding-left: 6px; // label padding |
| 530 |
padding-right: 6px; // |
| 531 |
} |
| 532 |
> image { |
| 533 |
padding-left: 6px; |
| 534 |
padding-right: 6px; |
| 535 |
padding-top: 3px; |
| 536 |
padding-bottom: 3px; |
| 537 |
} |
| 538 |
&.text-button { |
| 539 |
padding-left: 10px; |
| 540 |
padding-right: 10px; |
| 541 |
} |
| 542 |
&.image-button { |
| 543 |
padding-left: 2px; |
| 544 |
padding-right: 2px; |
| 545 |
} |
| 546 |
|
| 547 |
&.needs-attention { |
| 548 |
|
| 549 |
> label, > image { @extend %needs_attention; } |
| 550 |
|
| 551 |
&:active, &:checked { |
| 552 |
> label, > image { |
| 553 |
animation: none; |
| 554 |
background-image: none; |
| 555 |
} |
| 556 |
} |
| 557 |
} |
| 558 |
} |
| 559 |
|
| 560 |
%needs_attention { |
| 561 |
animation: needs_attention 150ms ease-in; |
| 562 |
background-image: -gtk-gradient(radial, |
| 563 |
center center, 0, |
| 564 |
center center, 0.5, |
| 565 |
to($_dot_color), |
| 566 |
to(transparent)); |
| 567 |
background-size: 6px 6px, 6px 6px; |
| 568 |
background-repeat: no-repeat; |
| 569 |
@if $variant != 'dark' { background-position: right 3px, right 4px; } |
| 570 |
@else { background-position: right 3px, right 2px; } |
| 571 |
&:dir(rtl) { |
| 572 |
@if $variant != 'dark' { background-position: left 3px, left 4px; } |
| 573 |
@else { background-position: left 3px, left 2px; } |
| 574 |
} |
| 575 |
} |
| 576 |
|
| 577 |
// hide separators |
| 578 |
&.font, |
| 579 |
&.file { separator { background-color: transparent; }} |
| 580 |
|
| 581 |
//inline-toolbar buttons |
| 582 |
.inline-toolbar &, .inline-toolbar &:backdrop { |
| 583 |
border-radius: 2px; |
| 584 |
border-width: 1px; |
| 585 |
@extend %linked; |
| 586 |
} |
| 587 |
|
| 588 |
.linked:not(.vertical) > &, |
| 589 |
.linked:not(.vertical) > &:hover, |
| 590 |
.linked:not(.vertical) > &:active, |
| 591 |
.linked:not(.vertical) > &:checked { @extend %linked; } |
| 592 |
|
| 593 |
.linked.vertical > &, |
| 594 |
.linked.vertical > &:hover, |
| 595 |
.linked.vertical > &:active, |
| 596 |
.linked.vertical > &:checked { @extend %linked_vertical; } |
| 597 |
} |
| 598 |
|
| 599 |
// all the following is for the +|- buttons on inline toolbars, that way |
| 600 |
// should really be deprecated... |
| 601 |
.inline-toolbar toolbutton > button { // redefining the button look is |
| 602 |
// needed since those are flat... |
| 603 |
@include button(normal); |
| 604 |
&:hover { @include button(hover); } |
| 605 |
&:active, |
| 606 |
&:checked{ @include button(active); } |
| 607 |
&:disabled { @include button(insensitive); } |
| 608 |
&:disabled:active, |
| 609 |
&:disabled:checked { @include button(insensitive-active); } |
| 610 |
} |
| 611 |
|
| 612 |
// More inline toolbar buttons |
| 613 |
toolbar.inline-toolbar toolbutton { |
| 614 |
& > button.flat { @extend %linked_middle; } |
| 615 |
&:first-child > button.flat { @extend %linked_left; } |
| 616 |
&:last-child > button.flat { @extend %linked_right; } |
| 617 |
&:only-child > button.flat { @extend %linked_only_child; } |
| 618 |
} |
| 619 |
|
| 620 |
// Some crazy linking stuff |
| 621 |
@mixin linking_rules($a:0.7, $var:$variant, $vert:'false', $entry_rules:'true', $button_rules:'true', |
| 622 |
$e_border:$entry_border, $b_border:$button_border) { |
| 623 |
|
| 624 |
$_border: if($vert=='false', left, top); |
| 625 |
|
| 626 |
@if $entry_rules=='true' { |
| 627 |
> entry + entry { border-#{$_border}-color: transparentize($e_border, $a); } |
| 628 |
|
| 629 |
> entry.error + entry, |
| 630 |
> entry + entry.error { border-#{$_border}-color: if($var=='light', $error_color, transparentize($e_border, $a)); } |
| 631 |
|
| 632 |
> entry.warning + entry, |
| 633 |
> entry + entry.warning { border-#{$_border}-color: if($var=='light', $warning_color, transparentize($e_border, $a)); } |
| 634 |
|
| 635 |
> entry.error + entry.warning, |
| 636 |
> entry.warning + entry.error { border-#{$_border}-color: if($var=='light', mix($error_color, $warning_color, 50%), transparentize($e_border, $a));} |
| 637 |
|
| 638 |
@each $e_type, $e_color in (':focus',$selected_bg_color), |
| 639 |
(':drop(active)', $drop_target_color), |
| 640 |
('.warning:focus', $warning_color), |
| 641 |
('.error:focus', $error_color) { |
| 642 |
|
| 643 |
> entry + entry#{$e_type}:not(:last-child), |
| 644 |
> entry + entry#{$e_type}:last-child { border-#{$_border}-color: if($var=='light', $e_color, $e_border); } |
| 645 |
|
| 646 |
> entry#{$e_type}:not(:only-child) { |
| 647 |
+ entry, |
| 648 |
+ button, |
| 649 |
+ combobox > box > button.combo { border-#{$_border}-color: if($var=='light', $e_color, $e_border); } |
| 650 |
} |
| 651 |
} |
| 652 |
> button:active + entry, |
| 653 |
> button:checked + entry { border-#{$_border}-color: if($var=='light', $selected_bg_color, $e_border); } |
| 654 |
} |
| 655 |
@if $button_rules=='true' { |
| 656 |
$_uncolored_button: 'button:not(:checked):not(:active):not(.suggested-action):not(.destructive-action)'; |
| 657 |
|
| 658 |
> button + button { border-#{$_border}-style: none; } |
| 659 |
|
| 660 |
> #{$_uncolored_button}:hover:not(:only-child), |
| 661 |
> #{$_uncolored_button}:hover + #{$_uncolored_button} { box-shadow: inset if($vert=='false', 1px 0, 0 1px) $b_border; } |
| 662 |
|
| 663 |
> #{$_uncolored_button}:disabled:not(:only-child), |
| 664 |
> #{$_uncolored_button}:disabled + #{$_uncolored_button}:not(:hover) { box-shadow: inset if($vert=='false', 1px 0, 0 1px) transparentize($b_border, 0.5); } |
| 665 |
|
| 666 |
> button:active + #{$_uncolored_button}:hover, |
| 667 |
> button:checked + #{$_uncolored_button}:hover, |
| 668 |
> button.suggested-action + #{$_uncolored_button}:hover, |
| 669 |
> button.destructive-action + #{$_uncolored_button}:hover, |
| 670 |
> entry + #{$_uncolored_button}:hover:not(:only-child), |
| 671 |
|
| 672 |
> #{$_uncolored_button}:first-child:disabled, |
| 673 |
> #{$_uncolored_button}:disabled + #{$_uncolored_button}:disabled, |
| 674 |
> #{$_uncolored_button}:first-child:hover, |
| 675 |
> button:active + #{$_uncolored_button}:disabled, |
| 676 |
> button:checked + #{$_uncolored_button}:disabled, |
| 677 |
> button.suggested-action + #{$_uncolored_button}:disabled, |
| 678 |
> button.destructive-action + #{$_uncolored_button}:disabled, |
| 679 |
> entry + #{$_uncolored_button}:disabled:not(:only-child), { box-shadow: none; } |
| 680 |
} |
| 681 |
} |
| 682 |
|
| 683 |
// special case, because path-bars are bugged |
| 684 |
@mixin pathbar_linking_rules($sep_color:if($variant!='dark', transparentize($button_border, 0.6), transparentize($button_border, 0.5))) { |
| 685 |
|
| 686 |
> button + button { border-left-style: none; } |
| 687 |
|
| 688 |
> button:hover:not(:checked):not(:active):not(:only-child) { |
| 689 |
|
| 690 |
&:hover { |
| 691 |
box-shadow: inset 1px 0 $sep_color, |
| 692 |
inset -1px 0 $sep_color; |
| 693 |
} |
| 694 |
&:first-child:hover { box-shadow: inset -1px 0 $sep_color; } |
| 695 |
&:last-child:hover { box-shadow: inset 1px 0 $sep_color; } |
| 696 |
} |
| 697 |
} |
| 698 |
|
| 699 |
// Apply the rules defined above |
| 700 |
.linked:not(.vertical) { |
| 701 |
&:not(.path-bar) { @include linking_rules(); } |
| 702 |
&.path-bar { @include pathbar_linking_rules(); } |
| 703 |
} |
| 704 |
|
| 705 |
.linked.vertical { @include linking_rules($vert:'true'); } |
| 706 |
|
| 707 |
%linked_middle { |
| 708 |
border-radius: 0; |
| 709 |
border-right-style: none; |
| 710 |
-gtk-outline-radius: 0; |
| 711 |
} |
| 712 |
|
| 713 |
%linked_left { |
| 714 |
border-top-left-radius: 3px; |
| 715 |
border-bottom-left-radius: 3px; |
| 716 |
border-top-right-radius: 0; |
| 717 |
border-bottom-right-radius: 0; |
| 718 |
border-right-style: none; |
| 719 |
-gtk-outline-top-left-radius: 2px; |
| 720 |
-gtk-outline-bottom-left-radius: 2px; |
| 721 |
-gtk-outline-top-right-radius: 0; |
| 722 |
-gtk-outline-bottom-right-radius: 0; |
| 723 |
} |
| 724 |
|
| 725 |
%linked_right { |
| 726 |
border-top-left-radius: 0; |
| 727 |
border-bottom-left-radius: 0; |
| 728 |
border-top-right-radius: 3px; |
| 729 |
border-bottom-right-radius: 3px; |
| 730 |
border-right-style: solid; |
| 731 |
-gtk-outline-top-left-radius: 0; |
| 732 |
-gtk-outline-bottom-left-radius: 0; |
| 733 |
-gtk-outline-top-right-radius: 2px; |
| 734 |
-gtk-outline-bottom-right-radius: 2px; |
| 735 |
} |
| 736 |
|
| 737 |
%linked_only_child { |
| 738 |
border-radius: 3px; |
| 739 |
border-style: solid; |
| 740 |
-gtk-outline-radius: 2px; |
| 741 |
} |
| 742 |
|
| 743 |
%linked { |
| 744 |
@extend %linked_middle; |
| 745 |
|
| 746 |
&:first-child { @extend %linked_left; } |
| 747 |
&:last-child { @extend %linked_right; } |
| 748 |
&:only-child { @extend %linked_only_child; } |
| 749 |
} |
| 750 |
|
| 751 |
// Other widgets let CSS give the order, so 1st/last child are at text start/end |
| 752 |
%linked_flippable { |
| 753 |
@extend %linked_middle; |
| 754 |
|
| 755 |
&:dir(ltr) { |
| 756 |
&:first-child { @extend %linked_left; } |
| 757 |
&:last-child { @extend %linked_right; } |
| 758 |
} |
| 759 |
|
| 760 |
&:dir(rtl) { |
| 761 |
&:first-child { @extend %linked_right; } |
| 762 |
&:last-child { @extend %linked_left; } |
| 763 |
} |
| 764 |
|
| 765 |
&:only-child { @extend %linked_only_child; } |
| 766 |
} |
| 767 |
|
| 768 |
%linked_vertical_middle { |
| 769 |
border-radius: 0; |
| 770 |
border-bottom-style: none; |
| 771 |
-gtk-outline-radius: 0; |
| 772 |
} |
| 773 |
|
| 774 |
%linked_vertical_top { |
| 775 |
border-top-left-radius: 3px; |
| 776 |
border-top-right-radius: 3px; |
| 777 |
-gtk-outline-top-left-radius: 2px; |
| 778 |
-gtk-outline-top-right-radius: 2px; |
| 779 |
} |
| 780 |
|
| 781 |
%linked_vertical_bottom { |
| 782 |
border-bottom-style: solid; |
| 783 |
border-bottom-left-radius: 3px; |
| 784 |
border-bottom-right-radius: 3px; |
| 785 |
-gtk-outline-bottom-left-radius: 2px; |
| 786 |
-gtk-outline-bottom-right-radius: 2px; |
| 787 |
} |
| 788 |
|
| 789 |
%linked_vertical_only_child { |
| 790 |
border-radius: 3px; |
| 791 |
border-style: solid; |
| 792 |
-gtk-outline-radius: 2px; |
| 793 |
} |
| 794 |
|
| 795 |
%linked_vertical{ |
| 796 |
@extend %linked_vertical_middle; |
| 797 |
|
| 798 |
&:first-child { @extend %linked_vertical_top; } |
| 799 |
&:last-child { @extend %linked_vertical_bottom; } |
| 800 |
&:only-child { @extend %linked_vertical_only_child; } |
| 801 |
} |
| 802 |
|
| 803 |
%undecorated_button { |
| 804 |
border-color: transparent; |
| 805 |
background-color: transparent; |
| 806 |
background-image: none; |
| 807 |
box-shadow: none; |
| 808 |
} |
| 809 |
|
| 810 |
// menu buttons |
| 811 |
menuitem.button.flat, |
| 812 |
modelbutton.flat { |
| 813 |
transition: none; |
| 814 |
min-height: 24px; |
| 815 |
padding-left: 8px; |
| 816 |
padding-right: 8px; |
| 817 |
outline-offset: -3px; |
| 818 |
border-radius: 2px; |
| 819 |
|
| 820 |
@extend %undecorated_button; |
| 821 |
|
| 822 |
&:hover, &:active, &:selected { &, arrow { @extend %selected_items; } } |
| 823 |
&:checked { color: $fg_color; } |
| 824 |
|
| 825 |
// FIXME: temporary workaround |
| 826 |
check:last-child, |
| 827 |
radio:last-child { margin-left: 8px; } |
| 828 |
|
| 829 |
check:first-child, |
| 830 |
radio:first-child { margin-right: 8px; } |
| 831 |
} |
| 832 |
|
| 833 |
modelbutton.flat arrow { |
| 834 |
&.left { -gtk-icon-source: -gtk-icontheme("pan-start-symbolic"); } |
| 835 |
&.right { -gtk-icon-source: -gtk-icontheme("pan-end-symbolic"); } |
| 836 |
} |
| 837 |
|
| 838 |
// |
| 839 |
// Links |
| 840 |
// |
| 841 |
%link, |
| 842 |
*:link { |
| 843 |
color: $link_color; |
| 844 |
|
| 845 |
&:visited { |
| 846 |
color: $link_visited_color; |
| 847 |
*:selected & { color: mix($selected_fg_color, $selected_bg_color, 60%); } |
| 848 |
} |
| 849 |
&:hover { |
| 850 |
color: lighten($link_color,10%); |
| 851 |
*:selected & { color: mix($selected_fg_color, $selected_bg_color, 90%); } |
| 852 |
} |
| 853 |
&:active { |
| 854 |
color: $link_color; |
| 855 |
*:selected & { color: mix($selected_fg_color, $selected_bg_color, 80%); } |
| 856 |
} |
| 857 |
|
| 858 |
@at-root %link_selected, |
| 859 |
&:selected, |
| 860 |
*:selected & { color: mix($selected_fg_color, $selected_bg_color, 80%); } |
| 861 |
} |
| 862 |
|
| 863 |
button:link, button:visited { |
| 864 |
@extend %undecorated_button; |
| 865 |
@extend %link; |
| 866 |
|
| 867 |
&:hover, &:active, &:checked { |
| 868 |
@extend %undecorated_button; |
| 869 |
} |
| 870 |
> label { |
| 871 |
@extend %link; |
| 872 |
|
| 873 |
text-decoration-line: underline; |
| 874 |
} |
| 875 |
} |
| 876 |
|
| 877 |
// |
| 878 |
// Spinbuttons |
| 879 |
// |
| 880 |
spinbutton { |
| 881 |
|
| 882 |
&:drop(active) { box-shadow: none; } |
| 883 |
|
| 884 |
button:active { color: $selected_fg_color; } |
| 885 |
&:disabled { color: $insensitive_fg_color; } |
| 886 |
|
| 887 |
&:not(.vertical) { |
| 888 |
entry { min-width: 28px; } |
| 889 |
|
| 890 |
button, entry { @extend %linked; } |
| 891 |
|
| 892 |
&:dir(ltr) entry, |
| 893 |
&:dir(rtl) button.up { border-radius: 3px 0 0 3px; } |
| 894 |
|
| 895 |
> button + button { border-left-style: none; } |
| 896 |
|
| 897 |
> button:hover:not(:active), |
| 898 |
> button:hover + button { box-shadow: inset 1px 0 $button_border; } |
| 899 |
|
| 900 |
> button:disabled + button:not(:disabled):not(:active):not(:checked):not(:hover), |
| 901 |
> button:not(:disabled):not(:active):not(:checked):not(:hover) + button:disabled { box-shadow: inset 1px 0 transparentize($button_border, 0.5); } |
| 902 |
|
| 903 |
> button:first-child:hover:not(:active), |
| 904 |
> button.up:dir(rtl):hover:not(:active), |
| 905 |
> entry + button:not(:active):hover { box-shadow: none; } |
| 906 |
|
| 907 |
> entry:focus + button { border-left-color: if($variant!='dark', $selected_bg_color, $entry_border); } |
| 908 |
|
| 909 |
> entry:drop(active) + button { border-left-color: $drop_target_color; } |
| 910 |
|
| 911 |
.osd & { |
| 912 |
> button:hover:not(:active), |
| 913 |
> button:hover + button { box-shadow: inset 1px 0 $osd_button_border; } |
| 914 |
|
| 915 |
> button:first-child:hover:not(:active), |
| 916 |
> button.up:dir(rtl):hover:not(:active), |
| 917 |
> entry + button:not(:active):hover { box-shadow: none; } |
| 918 |
|
| 919 |
> entry:focus + button { border-left-color: $osd_button_border; } |
| 920 |
} |
| 921 |
} |
| 922 |
&.vertical { |
| 923 |
button, entry { |
| 924 |
padding-left: 4px; |
| 925 |
padding-right: 4px; |
| 926 |
min-width: 0; |
| 927 |
|
| 928 |
@extend %linked_vertical; |
| 929 |
} |
| 930 |
|
| 931 |
button.up { border-radius: 3px 3px 0 0; } |
| 932 |
|
| 933 |
> entry:focus + button { border-top-color: if($variant!='dark', $selected_bg_color, $entry_border); } |
| 934 |
|
| 935 |
> entry:drop(active) + button { border-top-color: $drop_target_color; } |
| 936 |
} |
| 937 |
} |
| 938 |
|
| 939 |
// |
| 940 |
// Comboboxes |
| 941 |
// |
| 942 |
combobox { |
| 943 |
button.combo { |
| 944 |
min-width: 0; // otherwise the arrow placement is unsymmetric |
| 945 |
padding-left: 8px; // |
| 946 |
padding-right: 8px // |
| 947 |
} |
| 948 |
arrow { |
| 949 |
-gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); |
| 950 |
min-height: 16px; |
| 951 |
min-width: 16px; |
| 952 |
} |
| 953 |
|
| 954 |
&:drop(active) button.combo { @extend %button_basic_drop_active; } |
| 955 |
|
| 956 |
.linked:not(.vertical) > & > box > button.combo { |
| 957 |
// the combobox is a composite widget so the way we do button linking doesn't |
| 958 |
// work, special case needed. |
| 959 |
&:dir(ltr), |
| 960 |
&:dir(rtl) { @extend %linked_middle; } // specificity bump |
| 961 |
} |
| 962 |
|
| 963 |
.linked:not(.vertical) > &:first-child > box > button.combo { @extend %linked_left; } |
| 964 |
.linked:not(.vertical) > &:last-child > box > button.combo { @extend %linked_right; } |
| 965 |
.linked:not(.vertical) > &:only-child > box > button.combo { @extend %linked_only_child; } |
| 966 |
|
| 967 |
.linked.vertical > & > box > button.combo { @extend %linked_vertical_middle; } |
| 968 |
.linked.vertical > &:first-child > box > button.combo { @extend %linked_vertical_top; } |
| 969 |
.linked.vertical > &:last-child > box > button.combo { @extend %linked_vertical_bottom; } |
| 970 |
.linked.vertical > &:only-child > box > button.combo { @extend %linked_vertical_only_child; } |
| 971 |
} |
| 972 |
|
| 973 |
// |
| 974 |
// Toolbars |
| 975 |
// |
| 976 |
toolbar { |
| 977 |
-GtkWidget-window-dragging: true; |
| 978 |
padding: 4px; |
| 979 |
background-color: $bg_color; |
| 980 |
|
| 981 |
separator { background: none; } |
| 982 |
&.horizontal separator { margin: 0 6px; } |
| 983 |
&.vertical separator { margin: 6px 0; } |
| 984 |
|
| 985 |
.osd & { background-color: transparent; } |
| 986 |
|
| 987 |
&.osd { |
| 988 |
padding: 7px; |
| 989 |
border: 1px solid transparentize(black, 0.5); |
| 990 |
border-radius: 3px; |
| 991 |
background-color: transparentize($osd_bg_color, 0.1); |
| 992 |
|
| 993 |
&.left, |
| 994 |
&.right, |
| 995 |
&.top, |
| 996 |
&.bottom { border-radius: 0; } // positional classes for `attached` osd toolbars |
| 997 |
|
| 998 |
&.top { border-width: 0 0 1px 0; } |
| 999 |
&.bottom { border-width: 1px 0 0 0; } |
| 1000 |
&.left { border-width: 0 1px 0 0; } |
| 1001 |
&.right { border-width: 0 0 0 1px; } |
| 1002 |
} |
| 1003 |
|
| 1004 |
&:not(.inline-toolbar) { |
| 1005 |
switch, |
| 1006 |
scale, |
| 1007 |
entry, |
| 1008 |
spinbutton, |
| 1009 |
button { |
| 1010 |
margin-right: 1px; |
| 1011 |
margin-bottom: 1px; |
| 1012 |
} |
| 1013 |
.linked > button, |
| 1014 |
.linked > entry { margin-right:0; } |
| 1015 |
} |
| 1016 |
} |
| 1017 |
|
| 1018 |
.primary-toolbar:not(.libreoffice-toolbar) { // LO messes up the toolbar styling, so exclude LO toolbars |
| 1019 |
&, & toolbar { |
| 1020 |
color: $header_fg; |
| 1021 |
background-color: opacify($header_bg, 1); |
| 1022 |
box-shadow: none; |
| 1023 |
border-width: 0 0 1px 0; |
| 1024 |
border-style: solid; |
| 1025 |
border-image: linear-gradient(to bottom, opacify($header_bg, 1), |
| 1026 |
darken($header_bg, 7%)) 1 0 1 0; //temporary hack for rhythmbox 3.1 |
| 1027 |
|
| 1028 |
//&:backdrop { background-color: opacify($header_bg_backdrop, 1); } |
| 1029 |
|
| 1030 |
separator { @extend %header_separator; } |
| 1031 |
} |
| 1032 |
} |
| 1033 |
|
| 1034 |
.primary-toolbar { @extend %header_widgets; } |
| 1035 |
|
| 1036 |
.inline-toolbar { |
| 1037 |
@extend toolbar; |
| 1038 |
background-color: darken($bg_color, 3%); |
| 1039 |
border-style: solid; |
| 1040 |
border-color: $borders_color; |
| 1041 |
border-width: 0 1px 1px; |
| 1042 |
padding: 3px; |
| 1043 |
border-radius: 0 0 3px 3px; |
| 1044 |
} |
| 1045 |
|
| 1046 |
searchbar > revealer > box { |
| 1047 |
background-color: $bg_color; |
| 1048 |
border-style: solid; |
| 1049 |
border-color: $borders_color; |
| 1050 |
border-width: 0 0 1px; |
| 1051 |
|
| 1052 |
// workaround: undo the GtkContainer:border-width and use CSS padding instead |
| 1053 |
margin: -6px; |
| 1054 |
padding: 6px; |
| 1055 |
} |
| 1056 |
|
| 1057 |
actionbar > revealer > box { |
| 1058 |
padding: 6px; |
| 1059 |
border-top: 1px solid $borders_color; |
| 1060 |
background-color: darken($bg_color, 3%); |
| 1061 |
} |
| 1062 |
|
| 1063 |
// |
| 1064 |
// Headerbars |
| 1065 |
// |
| 1066 |
$_header_radius: if($variant=='light' or $variant=='lighter', 4px, 3px); |
| 1067 |
|
| 1068 |
headerbar, |
| 1069 |
%titlebar { |
| 1070 |
|
| 1071 |
min-height: 42px; |
| 1072 |
padding: 0 7px; |
| 1073 |
|
| 1074 |
border-width: 0 0 1px; |
| 1075 |
border-style: solid; |
| 1076 |
border-color: opacify($header_border, 1); |
| 1077 |
|
| 1078 |
color: $header_fg; |
| 1079 |
background-color: opacify($header_bg, 1); |
| 1080 |
box-shadow: inset 0 1px lighten($header_bg, 3%); |
| 1081 |
|
| 1082 |
.csd & { // Transparent header-bars only in csd windows |
| 1083 |
background-color: $header_bg; |
| 1084 |
border-color: $header_border; |
| 1085 |
} |
| 1086 |
|
| 1087 |
&:backdrop { |
| 1088 |
transition: $backdrop_transition; |
| 1089 |
|
| 1090 |
color: transparentize($header_fg, 0.3); |
| 1091 |
background-color: opacify($header_bg_backdrop, 1); |
| 1092 |
|
| 1093 |
.csd & { background-color: $header_bg_backdrop; } |
| 1094 |
} |
| 1095 |
|
| 1096 |
.title { |
| 1097 |
padding-left: 12px; |
| 1098 |
padding-right: 12px; |
| 1099 |
} |
| 1100 |
|
| 1101 |
.subtitle { |
| 1102 |
font-size: smaller; |
| 1103 |
padding-left: 12px; |
| 1104 |
padding-right: 12px; |
| 1105 |
@extend .dim-label; |
| 1106 |
} |
| 1107 |
|
| 1108 |
// Selectionmode |
| 1109 |
.selection-mode &, |
| 1110 |
&.selection-mode { |
| 1111 |
color: $selection_mode_fg; |
| 1112 |
background-color: $selection_mode_bg; |
| 1113 |
border-color: darken($selection_mode_bg, 4%); |
| 1114 |
box-shadow: none; |
| 1115 |
|
| 1116 |
&:backdrop { |
| 1117 |
background-color: $selection_mode_bg; |
| 1118 |
color: transparentize($selection_mode_fg, 0.4); |
| 1119 |
} |
| 1120 |
|
| 1121 |
.subtitle:link { @extend %link_selected; } |
| 1122 |
|
| 1123 |
.selection-menu { |
| 1124 |
box-shadow: none; |
| 1125 |
padding-left: 10px; |
| 1126 |
padding-right: 10px; |
| 1127 |
GtkArrow { -GtkArrow-arrow-scaling: 1; } |
| 1128 |
.arrow { |
| 1129 |
-gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); |
| 1130 |
} |
| 1131 |
} |
| 1132 |
.maximized & { background-color: opacify($selection_mode_bg, 1); } |
| 1133 |
} |
| 1134 |
|
| 1135 |
// squared corners when the window is maximized, tiled, or fullscreen |
| 1136 |
.tiled &, |
| 1137 |
.tiled-top &, |
| 1138 |
.tiled-right &, |
| 1139 |
.tiled-bottom &, |
| 1140 |
.tiled-left &, |
| 1141 |
.maximized &, |
| 1142 |
.fullscreen & { |
| 1143 |
&:backdrop, & { |
| 1144 |
border-radius: 0; |
| 1145 |
} |
| 1146 |
} |
| 1147 |
|
| 1148 |
.maximized & { |
| 1149 |
background-color: opacify($header_bg, 1); |
| 1150 |
border-color: opacify($header_border, 1); |
| 1151 |
|
| 1152 |
&:backdrop { background-color: opacify($header_bg_backdrop, 1); } |
| 1153 |
} |
| 1154 |
|
| 1155 |
&.default-decoration, |
| 1156 |
.csd &.default-decoration, // needed under wayland, since all gtk3 windows are csd windows |
| 1157 |
&.default-decoration:backdrop, |
| 1158 |
.csd &.default-decoration:backdrop { |
| 1159 |
min-height: 28px; |
| 1160 |
padding: 0 3px; |
| 1161 |
background-color: opacify($header_bg, 1); |
| 1162 |
border-bottom-width: 0; |
| 1163 |
|
| 1164 |
.maximized & { background-color: opacify($header_bg, 1); } |
| 1165 |
} |
| 1166 |
|
| 1167 |
separator.titlebutton { @extend %header_separator; } |
| 1168 |
} |
| 1169 |
|
| 1170 |
.titlebar, |
| 1171 |
.background .titlebar { |
| 1172 |
border-radius: $_header_radius $_header_radius 0 0; |
| 1173 |
} |
| 1174 |
|
| 1175 |
.background.tiled .titlebar, |
| 1176 |
.background.tiled-top .titlebar, |
| 1177 |
.background.tiled-right .titlebar, |
| 1178 |
.background.tiled-bottom .titlebar, |
| 1179 |
.background.tiled-left .titlebar, |
| 1180 |
.background.maximized .titlebar, |
| 1181 |
.background.solid-csd .titlebar { |
| 1182 |
&:backdrop, & { |
| 1183 |
border-top-left-radius: 0; |
| 1184 |
border-top-right-radius: 0; |
| 1185 |
} |
| 1186 |
} |
| 1187 |
|
| 1188 |
headerbar { |
| 1189 |
@extend %header_widgets; |
| 1190 |
|
| 1191 |
entry, button, separator { |
| 1192 |
margin-top: 6px; |
| 1193 |
margin-bottom: 6px; |
| 1194 |
} |
| 1195 |
|
| 1196 |
// Fixes split headerbars |
| 1197 |
separator:first-child + &, |
| 1198 |
&:first-child { |
| 1199 |
&, &:backdrop { |
| 1200 |
border-top-left-radius: $_header_radius; |
| 1201 |
|
| 1202 |
.tiled &, |
| 1203 |
.tiled-top &, |
| 1204 |
.tiled-right &, |
| 1205 |
.tiled-bottom &, |
| 1206 |
.tiled-left &, |
| 1207 |
.maximized &, |
| 1208 |
.fullscreen & { border-radius: 0; } |
| 1209 |
} |
| 1210 |
} |
| 1211 |
|
| 1212 |
&:last-child { |
| 1213 |
&, &:backdrop { |
| 1214 |
border-top-right-radius: $_header_radius; |
| 1215 |
|
| 1216 |
.tiled &, |
| 1217 |
.tiled-top &, |
| 1218 |
.tiled-right &, |
| 1219 |
.tiled-bottom &, |
| 1220 |
.tiled-left &, |
| 1221 |
.maximized &, |
| 1222 |
.fullscreen & { border-radius: 0; } |
| 1223 |
} |
| 1224 |
} |
| 1225 |
|
| 1226 |
window stack & { // tackles the stacked headerbars case |
| 1227 |
&:first-child, &:last-child { |
| 1228 |
&:backdrop, & { |
| 1229 |
border-top-left-radius: $_header_radius; |
| 1230 |
border-top-right-radius: $_header_radius; |
| 1231 |
} |
| 1232 |
} |
| 1233 |
} |
| 1234 |
|
| 1235 |
window.tiled &, |
| 1236 |
window.tiled-top &, |
| 1237 |
window.tiled-right &, |
| 1238 |
window.tiled-bottom &, |
| 1239 |
window.tiled-left &, |
| 1240 |
window.maximized &, |
| 1241 |
window.fullscreen &, |
| 1242 |
window.solid-csd & { |
| 1243 |
&, &:backdrop { |
| 1244 |
&, |
| 1245 |
&:first-child, |
| 1246 |
&:last-child, |
| 1247 |
&:only-child { |
| 1248 |
border-top-left-radius: 0; |
| 1249 |
border-top-right-radius: 0; |
| 1250 |
} |
| 1251 |
} |
| 1252 |
} |
| 1253 |
} |
| 1254 |
|
| 1255 |
// Fixes split headerbars too |
| 1256 |
.titlebar:not(headerbar) { |
| 1257 |
window > &, |
| 1258 |
window.csd > & { |
| 1259 |
&, &:backdrop { |
| 1260 |
padding: 0; |
| 1261 |
background: none; |
| 1262 |
border: none; |
| 1263 |
box-shadow: none; |
| 1264 |
} |
| 1265 |
} |
| 1266 |
|
| 1267 |
> separator { background-image: _solid($header_border); } |
| 1268 |
|
| 1269 |
@extend %titlebar; |
| 1270 |
} |
| 1271 |
|
| 1272 |
.csd headerbar headerbar, |
| 1273 |
.csd headerbar headerbar:backdrop { |
| 1274 |
background-color: transparent; |
| 1275 |
} |
| 1276 |
|
| 1277 |
%header_separator { |
| 1278 |
min-width: 1px; |
| 1279 |
min-height: 1px; |
| 1280 |
background: none; |
| 1281 |
border-width: 0 1px; |
| 1282 |
border-image: linear-gradient(to bottom, |
| 1283 |
transparentize($header_fg, 1) 25%, |
| 1284 |
transparentize($header_fg, 0.65) 25%, |
| 1285 |
transparentize($header_fg, 0.65) 75%, |
| 1286 |
transparentize($header_fg, 1) 75%) 0 1/0 1px stretch; |
| 1287 |
|
| 1288 |
&:backdrop { opacity: 0.6; } |
| 1289 |
} |
| 1290 |
|
| 1291 |
%header_widgets { |
| 1292 |
|
| 1293 |
// Headerbar Entries |
| 1294 |
entry { |
| 1295 |
@include entry(header-normal); |
| 1296 |
|
| 1297 |
&:backdrop { opacity: 0.85; } |
| 1298 |
|
| 1299 |
&:focus { |
| 1300 |
@include entry(header-focus); |
| 1301 |
background-clip: if($variant=='light' or $variant=='lighter', border-box, padding-box); |
| 1302 |
|
| 1303 |
image { color: $selected_fg_color; } |
| 1304 |
} |
| 1305 |
&:disabled { @include entry(header-insensitive); } |
| 1306 |
|
| 1307 |
selection:focus { |
| 1308 |
background-color: $selected_fg_color; |
| 1309 |
color: $selected_bg_color; |
| 1310 |
} |
| 1311 |
|
| 1312 |
progress { |
| 1313 |
border-color: $selected_bg_color; |
| 1314 |
background-image: none; |
| 1315 |
background-color: transparent; |
| 1316 |
} |
| 1317 |
|
| 1318 |
@each $e_type, $e_color, $e_fg_color in (warning, $warning_color, $warning_fg_color), |
| 1319 |
(error, $error_color, $error_fg_color) { |
| 1320 |
&.#{$e_type} { |
| 1321 |
color: $e_fg_color; |
| 1322 |
border-color: if($variant=='light' or $variant=='lighter', $e_color, $header_entry_border); |
| 1323 |
background-color: mix($e_color, $header_bg, 60%); |
| 1324 |
|
| 1325 |
&:focus { |
| 1326 |
color: $e_fg_color; |
| 1327 |
background-color: $e_color; |
| 1328 |
} |
| 1329 |
selection, selection:focus { |
| 1330 |
background-color: $e_fg_color; |
| 1331 |
color: $e_color; |
| 1332 |
} |
| 1333 |
} |
| 1334 |
} |
| 1335 |
} |
| 1336 |
|
| 1337 |
// Headerbar Buttons |
| 1338 |
button { |
| 1339 |
|
| 1340 |
@include button(header-normal); |
| 1341 |
|
| 1342 |
&:backdrop { opacity: 0.7; } |
| 1343 |
|
| 1344 |
&:hover { @include button(header-hover); } |
| 1345 |
&:active, &:checked { |
| 1346 |
@include button(header-active); |
| 1347 |
background-clip: if($variant=='light' or $variant=='lighter', border-box, padding-box); |
| 1348 |
} |
| 1349 |
&:disabled { @include button(header-insensitive); } |
| 1350 |
&:disabled:active, &:disabled:checked { @include button(header-insensitive-active); } |
| 1351 |
} |
| 1352 |
|
| 1353 |
.selection-mode & button, |
| 1354 |
&.selection-mode button { |
| 1355 |
|
| 1356 |
&, &.flat { |
| 1357 |
@include button(undecorated); |
| 1358 |
color: $selection_mode_fg; |
| 1359 |
background-color: transparentize($selection_mode_fg, 1); |
| 1360 |
} |
| 1361 |
&:hover { @extend %selected_button_normal; } |
| 1362 |
&:active, &:checked { @extend %selected_button_active; } |
| 1363 |
|
| 1364 |
&:disabled { |
| 1365 |
@extend %selected_button_flat_disabled; |
| 1366 |
|
| 1367 |
&:checked, &:active { @extend %selected_button_disabled_active; } |
| 1368 |
} |
| 1369 |
} |
| 1370 |
|
| 1371 |
// Linking stuff |
| 1372 |
|
| 1373 |
// Disconnect linked buttons |
| 1374 |
.linked:not(.vertical):not(.path-bar):not(.stack-switcher) { |
| 1375 |
button:not(:last-child):not(:only-child) { margin-right: 1px; } |
| 1376 |
} |
| 1377 |
|
| 1378 |
// Reset buttons |
| 1379 |
.linked:not(.vertical):not(.path-bar) > button { |
| 1380 |
&, &:hover, &:active, &:checked, &:disabled { |
| 1381 |
border-radius: 3px; |
| 1382 |
border-style: solid; |
| 1383 |
} |
| 1384 |
} |
| 1385 |
.linked:not(.vertical):not(.path-bar) { |
| 1386 |
$_uncolored_button: 'button:not(:checked):not(:active):not(.suggested-action):not(.destructive-action)'; |
| 1387 |
|
| 1388 |
> #{$_uncolored_button}:hover:not(:only-child), |
| 1389 |
> #{$_uncolored_button}:hover + #{$_uncolored_button}, |
| 1390 |
> #{$_uncolored_button}:disabled:not(:only-child), |
| 1391 |
> #{$_uncolored_button}:disabled + #{$_uncolored_button}:not(:hover) { box-shadow: none; } |
| 1392 |
} |
| 1393 |
|
| 1394 |
// special case for path-bars and stack-switchers |
| 1395 |
.linked:not(.vertical):not(.path-bar).stack-switcher, |
| 1396 |
.linked:not(.vertical).path-bar { |
| 1397 |
|
| 1398 |
> button { |
| 1399 |
@include button(header-hover); |
| 1400 |
|
| 1401 |
&:hover { background-color: lighten($header_button_bg, 15%); } |
| 1402 |
&:active, &:checked { @include button(header-active); } |
| 1403 |
&:disabled { color: transparentize($header_fg, 0.4); } |
| 1404 |
|
| 1405 |
&, &:hover, &:active, &:checked, &:disabled { @extend %linked; } |
| 1406 |
} |
| 1407 |
@include pathbar_linking_rules($sep_color:$header_button_border); |
| 1408 |
} |
| 1409 |
|
| 1410 |
// use linking rules for entries only |
| 1411 |
.linked:not(.vertical):not(.path-bar) { |
| 1412 |
@include linking_rules( $a:0.5, |
| 1413 |
$var:if($variant=='light' or $variant=='lighter', 'light', 'dark'), |
| 1414 |
$button_rules:'false', |
| 1415 |
$e_border:$header_entry_border, |
| 1416 |
$b_border:$header_button_border ); |
| 1417 |
} |
| 1418 |
|
| 1419 |
// Headerbar Suggested and Destructive Action buttons |
| 1420 |
@each $b_type, $b_color, $b_fg in (suggested-action, $suggested_color, $suggested_fg_color), |
| 1421 |
(destructive-action, $destructive_color, $destructive_fg_color) { |
| 1422 |
button.#{$b_type} { |
| 1423 |
@include button(suggested_destructive, $b_color, $b_fg); |
| 1424 |
|
| 1425 |
&.flat { |
| 1426 |
@include button(undecorated); |
| 1427 |
color: $b_color; |
| 1428 |
} |
| 1429 |
&:hover { |
| 1430 |
@include button(suggested_destructive, lighten($b_color, 10%), $b_fg); |
| 1431 |
} |
| 1432 |
&:active, &:checked { |
| 1433 |
@include button(suggested_destructive, darken($b_color, 10%), $b_fg); |
| 1434 |
} |
| 1435 |
&.flat:disabled, |
| 1436 |
&:disabled { @include button(header-insensitive); } |
| 1437 |
} |
| 1438 |
button.#{$b_type}:backdrop, |
| 1439 |
button.#{$b_type}:backdrop { |
| 1440 |
opacity: 0.8; |
| 1441 |
} |
| 1442 |
} |
| 1443 |
|
| 1444 |
// Headerbar Spinbuttons |
| 1445 |
spinbutton:not(.vertical) { |
| 1446 |
&:focus { |
| 1447 |
color: $selected_fg_color; |
| 1448 |
caret-color: $selected_fg_color; |
| 1449 |
} |
| 1450 |
button { |
| 1451 |
&,&:disabled { @include button(header-hover); } |
| 1452 |
|
| 1453 |
&:hover { background-color: lighten($header_button_bg, 15%); } |
| 1454 |
&:active, &:checked { @include button(header-active); } |
| 1455 |
&:disabled { color: transparentize($header_fg, 0.4); } |
| 1456 |
} |
| 1457 |
|
| 1458 |
> button + button { border-left-style: none; } |
| 1459 |
|
| 1460 |
> button:hover:not(:active), |
| 1461 |
> button:hover + button { box-shadow: inset 1px 0 $header_button_border; } |
| 1462 |
|
| 1463 |
> button:disabled + button:not(:disabled):not(:active):not(:checked):not(:hover), |
| 1464 |
> button:not(:disabled):not(:active):not(:checked):not(:hover) + button:disabled { box-shadow: inset 1px 0 $header_button_border; } |
| 1465 |
|
| 1466 |
> button:first-child:hover:not(:active), |
| 1467 |
> entry + button:not(:active):hover { box-shadow: none; } |
| 1468 |
|
| 1469 |
> entry:focus + button { border-left-color: if($variant=='light' or $variant=='lighter', $selected_bg_color, $header_entry_border); } |
| 1470 |
} |
| 1471 |
|
| 1472 |
// Headerbar ComboBoxes |
| 1473 |
combobox { |
| 1474 |
&:disabled { color: transparentize($header_fg, 0.6); } |
| 1475 |
|
| 1476 |
> .linked > button.combo { |
| 1477 |
@include entry(header-normal); |
| 1478 |
|
| 1479 |
&:hover { @include entry(header-focus); box-shadow: none; } |
| 1480 |
&:disabled { @include entry(header-insensitive); } |
| 1481 |
} |
| 1482 |
|
| 1483 |
> .linked > entry.combo { |
| 1484 |
&:dir(ltr) { |
| 1485 |
border-right-style: none; |
| 1486 |
|
| 1487 |
&:focus { box-shadow: none; } |
| 1488 |
@if $variant=='light' or $variant=='lighter' { &:focus { box-shadow: 1px 0 $selected_bg_color; } } |
| 1489 |
} |
| 1490 |
&:dir(rtl) { |
| 1491 |
border-left-style: none; |
| 1492 |
|
| 1493 |
&:focus { box-shadow: none; } |
| 1494 |
@if $variant=='light' or $variant=='lighter' { &:focus { box-shadow: -1px 0 $selected_bg_color; } } |
| 1495 |
} |
| 1496 |
} |
| 1497 |
> .linked > button.combo { |
| 1498 |
&:dir(ltr) { |
| 1499 |
&, &:hover, &:active, &:checked, &:disabled { |
| 1500 |
border-top-left-radius: 0; |
| 1501 |
border-bottom-left-radius: 0; |
| 1502 |
} |
| 1503 |
} |
| 1504 |
&:dir(rtl) { |
| 1505 |
&, &:hover, &:active, &:checked, &:disabled { |
| 1506 |
border-top-right-radius: 0; |
| 1507 |
border-bottom-right-radius: 0; |
| 1508 |
} |
| 1509 |
} |
| 1510 |
} |
| 1511 |
} |
| 1512 |
|
| 1513 |
// Headerbar Switches |
| 1514 |
switch { |
| 1515 |
&:backdrop { opacity: 0.75; } |
| 1516 |
} |
| 1517 |
|
| 1518 |
progressbar { |
| 1519 |
trough { background-color: if($variant=='light', opacify($header_button_border, 0.05), $header_button_border); } |
| 1520 |
|
| 1521 |
&:backdrop { opacity: 0.75; } |
| 1522 |
} |
| 1523 |
|
| 1524 |
// Headerbar Scale |
| 1525 |
scale { |
| 1526 |
$_trough_bg: if($variant=='light' or $variant=='lighter', opacify($header_button_border, 0.05), $header_button_border); |
| 1527 |
|
| 1528 |
&:backdrop { opacity: 0.75; } |
| 1529 |
|
| 1530 |
slider { |
| 1531 |
$_slider_border: if($variant=='light' or $variant=='lighter', opacify($header_button_border, 0.2), opacify($header_button_border, 0.3)); |
| 1532 |
$_slider_bg: if($variant=='light' or $variant=='lighter', opacify($header_button_bg,1), lighten(opacify($header_bg,1), 10%)); |
| 1533 |
|
| 1534 |
background-color: $_slider_bg; |
| 1535 |
border-color: $_slider_border; |
| 1536 |
|
| 1537 |
&:hover { |
| 1538 |
background-color: lighten($_slider_bg, 5%); |
| 1539 |
border-color: $_slider_border; |
| 1540 |
} |
| 1541 |
&:active { |
| 1542 |
background-color: $selected_bg_color; |
| 1543 |
border-color: $selected_bg_color; |
| 1544 |
} |
| 1545 |
&:disabled { |
| 1546 |
background-color: mix($_slider_bg, $header_bg, 70%); |
| 1547 |
border-color: $_slider_border; |
| 1548 |
} |
| 1549 |
} |
| 1550 |
trough { |
| 1551 |
background-color: $_trough_bg; |
| 1552 |
|
| 1553 |
&:disabled { background-color: if($variant=='light' or $variant=='lighter', transparentize($_trough_bg, 0.05), transparentize($_trough_bg, 0.1)); } |
| 1554 |
} |
| 1555 |
} |
| 1556 |
} |
| 1557 |
|
| 1558 |
// |
| 1559 |
// Pathbars |
| 1560 |
// |
| 1561 |
|
| 1562 |
// GtkPathBar does not work with just .linked, so we must override that. But we |
| 1563 |
// can’t simply remove .linked from the widget as that might break other themes. |
| 1564 |
// Note also we select on filechooser to avoid interfering with NautilusPathBar. |
| 1565 |
filechooser .path-bar.linked > button { |
| 1566 |
@extend %linked_flippable; |
| 1567 |
} |
| 1568 |
|
| 1569 |
.path-bar button { |
| 1570 |
&.text-button, &.image-button, & { |
| 1571 |
padding-left: 6px; |
| 1572 |
padding-right: 6px; |
| 1573 |
} |
| 1574 |
|
| 1575 |
&.text-button.image-button label { padding-left: 0; padding-right: 0; } |
| 1576 |
|
| 1577 |
&.text-button.image-button, & { |
| 1578 |
label:last-child { padding-right: 10px; } |
| 1579 |
label:first-child { padding-left: 10px; } |
| 1580 |
} |
| 1581 |
|
| 1582 |
&.slider-button, |
| 1583 |
&:not(.image-button):not(.text-button) { |
| 1584 |
padding-left: 1px; |
| 1585 |
padding-right: 1px; |
| 1586 |
} |
| 1587 |
|
| 1588 |
image { |
| 1589 |
padding-left: 4px; |
| 1590 |
padding-right: 4px; |
| 1591 |
} |
| 1592 |
} |
| 1593 |
|
| 1594 |
// |
| 1595 |
// Tree Views |
| 1596 |
// |
| 1597 |
treeview.view { |
| 1598 |
@at-root * { |
| 1599 |
-GtkTreeView-horizontal-separator: 4; |
| 1600 |
-GtkTreeView-grid-line-width: 1; |
| 1601 |
-GtkTreeView-grid-line-pattern: ''; |
| 1602 |
-GtkTreeView-tree-line-width: 1; |
| 1603 |
-GtkTreeView-tree-line-pattern: ''; |
| 1604 |
-GtkTreeView-expander-size: 16; |
| 1605 |
} |
| 1606 |
|
| 1607 |
border-left-color: transparentize($fg_color, 0.85); // this is actually the tree lines color, |
| 1608 |
border-top-color: transparentize(black, 0.9); // while this is the grid lines color, better then nothing |
| 1609 |
|
| 1610 |
rubberband { @extend rubberband; } // to avoid borders being overridden by the previously set props |
| 1611 |
|
| 1612 |
acceleditor > label { background-color: $selected_bg_color; } |
| 1613 |
|
| 1614 |
&:selected { |
| 1615 |
&, &:focus { |
| 1616 |
border-radius: 0; |
| 1617 |
border-left-color: mix($selected_fg_color, $selected_bg_color, 50%); |
| 1618 |
border-top-color: transparentize($fg_color, 0.9); // doesn't work unfortunately |
| 1619 |
|
| 1620 |
@extend %selected_items; |
| 1621 |
} |
| 1622 |
} |
| 1623 |
|
| 1624 |
&:disabled { |
| 1625 |
color: $insensitive_fg_color; |
| 1626 |
|
| 1627 |
&:selected { |
| 1628 |
color: mix($selected_fg_color, $selected_bg_color, 40%); |
| 1629 |
} |
| 1630 |
} |
| 1631 |
|
| 1632 |
&.separator { |
| 1633 |
min-height: 2px; |
| 1634 |
color: transparentize(black, 0.9); |
| 1635 |
} |
| 1636 |
|
| 1637 |
&:drop(active) { |
| 1638 |
border-style: solid none; |
| 1639 |
border-width: 1px; |
| 1640 |
border-color: mix($fg_color, $selected_bg_color, 50%); |
| 1641 |
|
| 1642 |
&.after { border-top-style: none; } |
| 1643 |
&.before { border-bottom-style: none; } |
| 1644 |
} |
| 1645 |
|
| 1646 |
&.expander { |
| 1647 |
-gtk-icon-source: -gtk-icontheme('pan-end-symbolic'); |
| 1648 |
|
| 1649 |
&:dir(rtl) { -gtk-icon-source: -gtk-icontheme('pan-end-symbolic-rtl'); } |
| 1650 |
|
| 1651 |
color: mix($fg_color, $base_color, 50%); |
| 1652 |
|
| 1653 |
&:hover { color: $fg_color; } |
| 1654 |
|
| 1655 |
&:selected { |
| 1656 |
color: mix($selected_fg_color, $selected_bg_color, 70%); |
| 1657 |
&:hover { color: $selected_fg_color; } |
| 1658 |
} |
| 1659 |
|
| 1660 |
&:checked { -gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); } |
| 1661 |
} |
| 1662 |
|
| 1663 |
&.progressbar, &.progressbar:focus { // progress bar in treeviews |
| 1664 |
color: $selected_fg_color; |
| 1665 |
border-radius: 3px; |
| 1666 |
background-color: $selected_bg_color; |
| 1667 |
|
| 1668 |
&:selected, &:selected:focus { |
| 1669 |
color: $selected_bg_color; |
| 1670 |
box-shadow: none; |
| 1671 |
background-color: $selected_fg_color; |
| 1672 |
} |
| 1673 |
} |
| 1674 |
&.trough { // progress bar trough in treeviews |
| 1675 |
color: $fg_color; |
| 1676 |
background-color: $button_border; |
| 1677 |
border-radius: 3px; |
| 1678 |
border-width: 0; |
| 1679 |
|
| 1680 |
&:selected, &:selected:focus { |
| 1681 |
color: $selected_fg_color; |
| 1682 |
background-color: transparentize(black, 0.8); |
| 1683 |
border-radius: 3px; |
| 1684 |
border-width: 0; |
| 1685 |
} |
| 1686 |
} |
| 1687 |
|
| 1688 |
header { |
| 1689 |
button { |
| 1690 |
$_column_header_color: mix($fg_color,$base_color,80%); |
| 1691 |
|
| 1692 |
min-height: 0; |
| 1693 |
min-width: 0; |
| 1694 |
padding: 3px 6px; |
| 1695 |
font-weight: bold; |
| 1696 |
|
| 1697 |
color: $_column_header_color; |
| 1698 |
background-color: $base_color; |
| 1699 |
background-image: none; |
| 1700 |
border-style: none solid none none; |
| 1701 |
border-radius: 0; |
| 1702 |
border-image: linear-gradient(to bottom, |
| 1703 |
$base_color 20%, |
| 1704 |
transparentize(if($variant != 'dark', black, white), 0.89) 20%, |
| 1705 |
transparentize(if($variant != 'dark', black, white), 0.89) 80%, |
| 1706 |
$base_color 80%) 0 1 0 0 / 0 1px 0 0 stretch; |
| 1707 |
|
| 1708 |
&:hover { color: $selected_bg_color; } |
| 1709 |
&:active { color: $fg_color; } |
| 1710 |
|
| 1711 |
&:active, &:hover { background-color: $base_color; } |
| 1712 |
&:active:hover { color: $fg_color; } |
| 1713 |
|
| 1714 |
&:disabled { |
| 1715 |
border-color: $bg_color; |
| 1716 |
background-image: none; |
| 1717 |
} |
| 1718 |
&:last-child { |
| 1719 |
border-right-style: none; |
| 1720 |
border-image: none; |
| 1721 |
} |
| 1722 |
} |
| 1723 |
} |
| 1724 |
|
| 1725 |
button.dnd, |
| 1726 |
header.button.dnd { |
| 1727 |
&, &:selected, &:hover, &:active { |
| 1728 |
padding: 0 6px; |
| 1729 |
transition: none; |
| 1730 |
color: $selected_fg_color; |
| 1731 |
background-color: $selected_bg_color; |
| 1732 |
border-radius: 0; |
| 1733 |
border-style: none; |
| 1734 |
} |
| 1735 |
} |
| 1736 |
} |
| 1737 |
|
| 1738 |
// |
| 1739 |
// Menus |
| 1740 |
// |
| 1741 |
menubar, |
| 1742 |
.menubar { |
| 1743 |
-GtkWidget-window-dragging: true; |
| 1744 |
padding: 0px; |
| 1745 |
background-color: opacify($header_bg, 1); |
| 1746 |
color: $header_fg; |
| 1747 |
|
| 1748 |
&:backdrop { |
| 1749 |
color: transparentize($header_fg, 0.3); |
| 1750 |
//background-color: opacify($header_bg_backdrop, 1); |
| 1751 |
} |
| 1752 |
|
| 1753 |
> menuitem { |
| 1754 |
padding: 4px 8px; |
| 1755 |
border: solid transparent; |
| 1756 |
border-width: 0; |
| 1757 |
|
| 1758 |
&:hover { //Seems like it :hover even with keyboard focus |
| 1759 |
background-color: $selected_bg_color; |
| 1760 |
color: $selected_fg_color; |
| 1761 |
} |
| 1762 |
&:disabled { |
| 1763 |
color: transparentize($header_fg, 0.6); |
| 1764 |
border-color: transparent; |
| 1765 |
} |
| 1766 |
} |
| 1767 |
} |
| 1768 |
|
| 1769 |
menu, |
| 1770 |
.menu { |
| 1771 |
$_menu_bg: if($variant!='dark', $base_color, $bg_color); |
| 1772 |
margin: 4px; |
| 1773 |
padding: 0; |
| 1774 |
border-radius: 0; |
| 1775 |
background-color: $_menu_bg; |
| 1776 |
border: 1px solid $borders_color; |
| 1777 |
|
| 1778 |
.csd & { |
| 1779 |
padding: 4px 0px; |
| 1780 |
border-radius: 2px; |
| 1781 |
border: none; |
| 1782 |
} |
| 1783 |
|
| 1784 |
separator, |
| 1785 |
.csd & separator { |
| 1786 |
margin: 2px 0; |
| 1787 |
background-color: $_menu_bg; |
| 1788 |
} |
| 1789 |
|
| 1790 |
menuitem { |
| 1791 |
min-height: 16px; |
| 1792 |
min-width: 40px; |
| 1793 |
padding: 5px; |
| 1794 |
&:hover { |
| 1795 |
color: $selected_fg_color; |
| 1796 |
background-color: $selected_bg_color; |
| 1797 |
} |
| 1798 |
&:disabled { |
| 1799 |
color: $insensitive_fg_color; |
| 1800 |
} |
| 1801 |
|
| 1802 |
//submenu indicators |
| 1803 |
arrow { |
| 1804 |
min-height: 16px; |
| 1805 |
min-width: 16px; |
| 1806 |
|
| 1807 |
&:dir(ltr) { |
| 1808 |
-gtk-icon-source: -gtk-icontheme('pan-end-symbolic'); |
| 1809 |
margin-left: 10px; |
| 1810 |
} |
| 1811 |
&:dir(rtl) { |
| 1812 |
-gtk-icon-source:-gtk-icontheme('pan-end-symbolic-rtl'); |
| 1813 |
margin-right: 10px; |
| 1814 |
} |
| 1815 |
} |
| 1816 |
@at-root menuitem { |
| 1817 |
accelerator { color: gtkalpha(currentColor,0.55); } |
| 1818 |
|
| 1819 |
check, radio { |
| 1820 |
min-height: 16px; |
| 1821 |
min-width: 16px; |
| 1822 |
&:dir(ltr) { margin-right: 6px; margin-left: 2px; } |
| 1823 |
&:dir(rtl) { margin-left: 6px; margin-right: 2px; } |
| 1824 |
} |
| 1825 |
} |
| 1826 |
} |
| 1827 |
// overflow buttons |
| 1828 |
> arrow { |
| 1829 |
@include button(undecorated); |
| 1830 |
min-width: 16px; |
| 1831 |
min-height: 16px; |
| 1832 |
padding: 4px; |
| 1833 |
background-color: $_menu_bg; |
| 1834 |
border-radius: 0; |
| 1835 |
|
| 1836 |
&.top { |
| 1837 |
margin-top: -6px; |
| 1838 |
border-bottom: 1px solid mix($fg_color, $base_color, 10%); |
| 1839 |
-gtk-icon-source: -gtk-icontheme('pan-up-symbolic'); |
| 1840 |
} |
| 1841 |
&.bottom { |
| 1842 |
margin-bottom: -6px; |
| 1843 |
border-top: 1px solid mix($fg_color, $base_color, 10%); |
| 1844 |
-gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); |
| 1845 |
} |
| 1846 |
&:hover { background-color: mix($fg_color, $base_color, 10%); } |
| 1847 |
&:disabled { |
| 1848 |
color: transparent; |
| 1849 |
background-color: transparent; |
| 1850 |
border-color: transparent ; |
| 1851 |
} |
| 1852 |
} |
| 1853 |
} |
| 1854 |
|
| 1855 |
// |
| 1856 |
// Popovers |
| 1857 |
// |
| 1858 |
$_popover_bg: if($variant!='dark', $base_color, $bg_color); |
| 1859 |
|
| 1860 |
popover, |
| 1861 |
popover.background { |
| 1862 |
padding: 2px; |
| 1863 |
border-radius: 3px; |
| 1864 |
background-clip: border-box; |
| 1865 |
background-color: $_popover_bg; |
| 1866 |
|
| 1867 |
box-shadow: 0 2px 6px 1px if($variant!='dark', transparentize(black, 0.93), transparentize(black, 0.65)); |
| 1868 |
|
| 1869 |
.csd &, & { border: 1px solid darken($borders_color, 5%); } |
| 1870 |
|
| 1871 |
& separator { background-color: $_popover_bg; } |
| 1872 |
label.separator { |
| 1873 |
@extend .dim-label; |
| 1874 |
|
| 1875 |
color: $fg_color; |
| 1876 |
} |
| 1877 |
|
| 1878 |
> list, |
| 1879 |
> .view, |
| 1880 |
> toolbar { |
| 1881 |
border-style: none; |
| 1882 |
background-color: transparent; |
| 1883 |
} |
| 1884 |
|
| 1885 |
&, .csd & { |
| 1886 |
&.osd, &.magnifier { @extend %osd; } |
| 1887 |
&.touch-selection { @extend .context-menu } |
| 1888 |
|
| 1889 |
&.osd { @extend %osd; } |
| 1890 |
} |
| 1891 |
} |
| 1892 |
|
| 1893 |
//touch selection handlebars for the Popover.osd above |
| 1894 |
cursor-handle { |
| 1895 |
background-color: transparent; |
| 1896 |
background-image: none; |
| 1897 |
box-shadow: none; |
| 1898 |
border-style: none; |
| 1899 |
&.top { -gtk-icon-source: -gtk-icontheme('selection-start-symbolic'); } |
| 1900 |
&.bottom { -gtk-icon-source: -gtk-icontheme('selection-end-symbolic'); } |
| 1901 |
} |
| 1902 |
|
| 1903 |
// |
| 1904 |
// Notebooks and Tabs |
| 1905 |
// |
| 1906 |
notebook { |
| 1907 |
padding: 0; |
| 1908 |
|
| 1909 |
&.frame { |
| 1910 |
border: 1px solid $borders_color; |
| 1911 |
|
| 1912 |
> header { |
| 1913 |
// ugly hack to hide the borders around the header |
| 1914 |
margin: -1px; |
| 1915 |
&.top { margin-bottom: 0; } |
| 1916 |
&.bottom { margin-top: 0; } |
| 1917 |
&.left { margin-right: 0; } |
| 1918 |
&.right { margin-left: 0; } |
| 1919 |
|
| 1920 |
&.top, &.bottom { padding-left: 0; padding-right: 0; } |
| 1921 |
&.left, &.right { padding-top: 0; padding-bottom: 0; } |
| 1922 |
} |
| 1923 |
} |
| 1924 |
|
| 1925 |
> stack:not(:only-child) { // the :not(:only-child) is for "hidden" notebooks |
| 1926 |
background-color: $base_color; |
| 1927 |
} |
| 1928 |
|
| 1929 |
> header { |
| 1930 |
padding: 2px; |
| 1931 |
background-color: $bg_color; |
| 1932 |
|
| 1933 |
&.top { box-shadow: inset 0 -1px $borders_color; } |
| 1934 |
&.bottom { box-shadow: inset 0 1px $borders_color; } |
| 1935 |
&.right { box-shadow: inset 1px 0 $borders_color; } |
| 1936 |
&.left { box-shadow: inset -1px 0 $borders_color; } |
| 1937 |
|
| 1938 |
@each $_pos, $_bpos in (top, bottom), (bottom, top), (right, left), (left, right) { |
| 1939 |
// sizing and borders |
| 1940 |
&.#{$_pos} { |
| 1941 |
padding-#{$_bpos}: 0; |
| 1942 |
|
| 1943 |
> tabs > tab { |
| 1944 |
padding: 2px 10px; |
| 1945 |
min-width: 20px; |
| 1946 |
min-height: 20px; |
| 1947 |
|
| 1948 |
outline-offset: -4px; |
| 1949 |
|
| 1950 |
border: 1px solid transparent; |
| 1951 |
border-#{$_bpos}: none; |
| 1952 |
|
| 1953 |
// tab overlap |
| 1954 |
+ tab { |
| 1955 |
@if $_pos==top or $_pos==bottom { margin-left: -1px; } |
| 1956 |
@else { margin-top: -1px; } |
| 1957 |
} |
| 1958 |
|
| 1959 |
// tab border radius |
| 1960 |
@if $_pos==top { border-radius: 1px 1px 0 0; } |
| 1961 |
@else if $_pos==bottom { border-radius: 0 0 1px 1px; } |
| 1962 |
@else if $_pos==left { border-radius: 1px 0 0 1px; } |
| 1963 |
@else if $_pos==right { border-radius: 0 1px 1px 0; } |
| 1964 |
} |
| 1965 |
} |
| 1966 |
} |
| 1967 |
// overflow arrows |
| 1968 |
&.top, &.bottom { |
| 1969 |
> tabs > arrow.up { |
| 1970 |
-gtk-icon-source: -gtk-icontheme('pan-end-symbolic'); |
| 1971 |
&:last-child { margin-left: 2px; } |
| 1972 |
} |
| 1973 |
> tabs > arrow.down { |
| 1974 |
-gtk-icon-source: -gtk-icontheme('pan-start-symbolic'); |
| 1975 |
&:first-child { margin-right: 2px; } |
| 1976 |
} |
| 1977 |
} |
| 1978 |
&.left, &.right { |
| 1979 |
> tabs > arrow.up { |
| 1980 |
-gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); |
| 1981 |
&:last-child { margin-top: 2px; } |
| 1982 |
} |
| 1983 |
> tabs > arrow.down { |
| 1984 |
-gtk-icon-source: -gtk-icontheme('pan-up-symbolic'); |
| 1985 |
&:first-child { margin-bottom: 2px; } |
| 1986 |
} |
| 1987 |
} |
| 1988 |
> tabs > arrow { |
| 1989 |
color: $insensitive_fg_color; |
| 1990 |
|
| 1991 |
&:hover { color: mix($fg_color, $insensitive_fg_color, 50%); } |
| 1992 |
&:active { color: $fg_color; } |
| 1993 |
&:disabled { color: transparentize($insensitive_fg_color,0.3); } |
| 1994 |
} |
| 1995 |
|
| 1996 |
// tab colors |
| 1997 |
|
| 1998 |
&.top > tabs > tab:hover:not(:checked) { box-shadow: inset 0 -1px $borders_color; } |
| 1999 |
&.bottom > tabs > tab:hover:not(:checked) { box-shadow: inset 0 1px $borders_color; } |
| 2000 |
&.left > tabs > tab:hover:not(:checked) { box-shadow: inset -1px 0 $borders_color; } |
| 2001 |
&.right > tabs > tab:hover:not(:checked) { box-shadow: inset 1px 0 $borders_color; } |
| 2002 |
|
| 2003 |
> tabs > tab { |
| 2004 |
color: $insensitive_fg_color; |
| 2005 |
background-color: transparentize($base_color, 1); |
| 2006 |
|
| 2007 |
&:hover:not(:checked) { |
| 2008 |
color: mix($fg_color, $insensitive_fg_color, 50%); |
| 2009 |
background-color: transparentize($base_color, 0.5); |
| 2010 |
border-color: $borders_color; |
| 2011 |
} |
| 2012 |
&:checked { |
| 2013 |
color: $fg_color; |
| 2014 |
background-color: $base_color; |
| 2015 |
border-color: $borders_color; |
| 2016 |
} |
| 2017 |
// close button |
| 2018 |
button.flat { |
| 2019 |
min-height: 22px; |
| 2020 |
min-width: 16px; |
| 2021 |
padding: 0; |
| 2022 |
color: mix($bg_color, $fg_color, 35%); |
| 2023 |
|
| 2024 |
&:hover { |
| 2025 |
@extend %undecorated_button; |
| 2026 |
color: lighten(red, 15%); |
| 2027 |
} |
| 2028 |
&:active, &:active:hover { |
| 2029 |
@extend %undecorated_button; |
| 2030 |
color: $selected_bg_color; |
| 2031 |
} |
| 2032 |
} |
| 2033 |
} |
| 2034 |
} |
| 2035 |
} |
| 2036 |
|
| 2037 |
// |
| 2038 |
// Scrollbars |
| 2039 |
// |
| 2040 |
$_scrollbar_bg_color: darken($base_color, 1%); |
| 2041 |
|
| 2042 |
scrollbar { |
| 2043 |
$_slider_min_length: 40px; |
| 2044 |
|
| 2045 |
// disable steppers |
| 2046 |
@at-root * { |
| 2047 |
-GtkScrollbar-has-backward-stepper: false; |
| 2048 |
-GtkScrollbar-has-forward-stepper: false; |
| 2049 |
} |
| 2050 |
|
| 2051 |
background-color: $_scrollbar_bg_color; |
| 2052 |
transition: 300ms $ease-out-quad; |
| 2053 |
|
| 2054 |
// scrollbar border |
| 2055 |
&.top { border-bottom: 1px solid $borders_color; } |
| 2056 |
&.bottom { border-top: 1px solid $borders_color; } |
| 2057 |
&.left { border-right: 1px solid $borders_color; } |
| 2058 |
&.right { border-left: 1px solid $borders_color; } |
| 2059 |
|
| 2060 |
button { border: none; } |
| 2061 |
|
| 2062 |
&.vertical button { |
| 2063 |
&.down { -gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); } |
| 2064 |
&.up { -gtk-icon-source: -gtk-icontheme('pan-up-symbolic'); } |
| 2065 |
} |
| 2066 |
|
| 2067 |
&.horizontal button { |
| 2068 |
&.down { -gtk-icon-source: -gtk-icontheme('pan-end-symbolic'); } |
| 2069 |
&.up { -gtk-icon-source: -gtk-icontheme('pan-start-symbolic'); } |
| 2070 |
} |
| 2071 |
|
| 2072 |
// slider |
| 2073 |
slider { |
| 2074 |
min-width: 6px; |
| 2075 |
min-height: 6px; |
| 2076 |
margin: -1px; |
| 2077 |
border: 4px solid transparent; |
| 2078 |
border-radius: 8px; |
| 2079 |
background-clip: padding-box; |
| 2080 |
background-color: mix($fg_color, $bg_color, 40%); |
| 2081 |
|
| 2082 |
&:hover { background-color: mix($fg_color, $bg_color, 30%); } |
| 2083 |
|
| 2084 |
&:hover:active { background-color: $selected_bg_color;} |
| 2085 |
|
| 2086 |
&:disabled { background-color: transparent; } |
| 2087 |
} |
| 2088 |
|
| 2089 |
&.fine-tune { |
| 2090 |
slider { |
| 2091 |
min-width: 4px; |
| 2092 |
min-height: 4px; |
| 2093 |
} |
| 2094 |
|
| 2095 |
&.horizontal slider { border-width: 5px 4px; } |
| 2096 |
&.vertical slider { border-width: 4px 5px; } |
| 2097 |
} |
| 2098 |
|
| 2099 |
&.overlay-indicator { |
| 2100 |
&:not(.dragging):not(.hovering) { |
| 2101 |
opacity: 0.4; |
| 2102 |
border-color: transparent; |
| 2103 |
background-color: transparent; |
| 2104 |
|
| 2105 |
slider { |
| 2106 |
margin: 0; |
| 2107 |
min-width: 4px; |
| 2108 |
min-height: 4px; |
| 2109 |
background-color: mix($fg_color, $bg_color, 70%); |
| 2110 |
border: 1px solid if($variant != 'dark', transparentize(white, 0.4), transparentize(black, 0.7)); |
| 2111 |
} |
| 2112 |
|
| 2113 |
&.horizontal slider { |
| 2114 |
margin: 0 2px; |
| 2115 |
min-width: $_slider_min_length; |
| 2116 |
} |
| 2117 |
|
| 2118 |
&.vertical slider { |
| 2119 |
margin: 2px 0; |
| 2120 |
min-height: $_slider_min_length; |
| 2121 |
} |
| 2122 |
} |
| 2123 |
|
| 2124 |
&.dragging, |
| 2125 |
&.hovering { opacity: 0.99; } |
| 2126 |
} |
| 2127 |
|
| 2128 |
&.horizontal slider { min-width: $_slider_min_length; } |
| 2129 |
&.vertical slider { min-height: $_slider_min_length; } |
| 2130 |
} |
| 2131 |
|
| 2132 |
treeview ~ scrollbar.vertical { |
| 2133 |
border-top: 1px solid $borders_color; |
| 2134 |
} |
| 2135 |
|
| 2136 |
// |
| 2137 |
// Switches |
| 2138 |
// |
| 2139 |
switch { |
| 2140 |
font-size: 1px; |
| 2141 |
|
| 2142 |
min-width: 52px; |
| 2143 |
min-height: 24px; |
| 2144 |
|
| 2145 |
background-size: 52px 24px; |
| 2146 |
background-repeat: no-repeat; |
| 2147 |
background-position: center center; |
| 2148 |
|
| 2149 |
slider { |
| 2150 |
min-width: 1px; |
| 2151 |
min-height: 1px; |
| 2152 |
} |
| 2153 |
|
| 2154 |
&, slider { |
| 2155 |
border: none; |
| 2156 |
box-shadow: none; |
| 2157 |
} |
| 2158 |
|
| 2159 |
& > image { |
| 2160 |
outline-color: transparent; |
| 2161 |
color: transparent; |
| 2162 |
} |
| 2163 |
} |
| 2164 |
|
| 2165 |
@each $k,$l in ('',''), |
| 2166 |
(':checked','-active'), |
| 2167 |
(':disabled','-insensitive'), |
| 2168 |
(':checked:disabled','-active-insensitive') { |
| 2169 |
|
| 2170 |
// load switch troughs from .png files in assets directory |
| 2171 |
|
| 2172 |
switch#{$k} { |
| 2173 |
background-image: -gtk-scaled(url("assets/switch#{$l}#{$asset_suffix}.png"),url("assets/switch#{$l}#{$asset_suffix}@2.png")); |
| 2174 |
} |
| 2175 |
|
| 2176 |
menuitem:hover switch#{$k}, |
| 2177 |
row:selected switch#{$k}, |
| 2178 |
infobar switch#{$k} { |
| 2179 |
background-image: -gtk-scaled(url("assets/switch#{$l}-selected.png"),url("assets/switch#{$l}[email protected]")); |
| 2180 |
} |
| 2181 |
|
| 2182 |
headerbar switch#{$k}, |
| 2183 |
.primary-toolbar switch#{$k} { |
| 2184 |
background-image: -gtk-scaled(url("assets/switch#{$l}-header#{$darker_asset_suffix}.png"),url("assets/switch#{$l}-header#{$darker_asset_suffix}@2.png")); |
| 2185 |
} |
| 2186 |
} |
| 2187 |
|
| 2188 |
// |
| 2189 |
// Check and Radio items |
| 2190 |
// |
| 2191 |
@each $w,$a in ('check', 'checkbox'), |
| 2192 |
('radio','radio') { |
| 2193 |
|
| 2194 |
//standard checks and radios |
| 2195 |
@each $s,$as in ('','-unchecked'), |
| 2196 |
(':disabled','-unchecked-insensitive'), |
| 2197 |
(':indeterminate', '-mixed'), |
| 2198 |
(':indeterminate:disabled', '-mixed-insensitive'), |
| 2199 |
(':checked', '-checked'), |
| 2200 |
(':checked:disabled','-checked-insensitive') { |
| 2201 |
.#{$w}#{$s}, |
| 2202 |
#{$w}#{$s}, |
| 2203 |
treeview.#{$w}#{$s} { |
| 2204 |
-gtk-icon-source: -gtk-scaled(url("assets/#{$a}#{$as}#{$asset_suffix}.png"), |
| 2205 |
url("assets/#{$a}#{$as}#{$asset_suffix}@2.png")); |
| 2206 |
} |
| 2207 |
|
| 2208 |
.osd, |
| 2209 |
%osd_check_radio { |
| 2210 |
#{$w}#{$s} { |
| 2211 |
-gtk-icon-source: -gtk-scaled(url("assets/#{$a}#{$as}-dark.png"), |
| 2212 |
url("assets/#{$a}#{$as}[email protected]")); |
| 2213 |
} |
| 2214 |
} |
| 2215 |
// the borders of checks and radios are |
| 2216 |
// too similar in luminosity to the selected background color, hence |
| 2217 |
// we need special casing. |
| 2218 |
menuitem #{$w}#{$s}:hover, |
| 2219 |
modelbutton #{$w}#{$s}:hover, |
| 2220 |
modelbutton #{$w}#{$s}:active, |
| 2221 |
.view #{$w}#{$s}:selected, |
| 2222 |
treeview.#{$w}#{$s}:selected, |
| 2223 |
row:selected #{$w}#{$s}, |
| 2224 |
infobar #{$w}#{$s} { |
| 2225 |
-gtk-icon-source: -gtk-scaled(url("assets/#{$a}#{$as}-selected.png"), |
| 2226 |
url("assets/#{$a}#{$as}[email protected]")); |
| 2227 |
} |
| 2228 |
} |
| 2229 |
} |
| 2230 |
|
| 2231 |
// Selectionmode |
| 2232 |
@each $s,$as in ('','-selectionmode'), |
| 2233 |
(':checked', '-checked-selectionmode') { |
| 2234 |
.view.content-view.check#{$s}:not(list) { |
| 2235 |
-gtk-icon-source: -gtk-scaled(url("assets/checkbox#{$as}#{$asset_suffix}.png"), |
| 2236 |
url("assets/checkbox#{$as}#{$asset_suffix}@2.png")); |
| 2237 |
background-color: transparent; |
| 2238 |
} |
| 2239 |
} |
| 2240 |
|
| 2241 |
checkbutton, radiobutton { |
| 2242 |
// this is for a nice focus on check and radios text |
| 2243 |
&.text-button { |
| 2244 |
padding: 2px 0; |
| 2245 |
outline-offset: 0; |
| 2246 |
} |
| 2247 |
|
| 2248 |
label:not(:only-child) { |
| 2249 |
&:first-child { margin-left: 4px; } |
| 2250 |
&:last-child { margin-right: 4px; } |
| 2251 |
} |
| 2252 |
} |
| 2253 |
|
| 2254 |
check, |
| 2255 |
radio { |
| 2256 |
min-width: 16px; |
| 2257 |
min-height: 16px; |
| 2258 |
margin: 0 2px; |
| 2259 |
|
| 2260 |
&:only-child, |
| 2261 |
menu menuitem & { margin: 0; } |
| 2262 |
} |
| 2263 |
|
| 2264 |
// |
| 2265 |
// GtkScale |
| 2266 |
// |
| 2267 |
scale { |
| 2268 |
$_marks_length: 3px; |
| 2269 |
$_marks_distance: 1px; |
| 2270 |
|
| 2271 |
min-height: 15px; |
| 2272 |
min-width: 15px; |
| 2273 |
padding: 3px; |
| 2274 |
|
| 2275 |
&.horizontal { |
| 2276 |
trough { padding: 0 4px; } |
| 2277 |
highlight, fill { margin: 0 -4px; } |
| 2278 |
} |
| 2279 |
|
| 2280 |
&.vertical { |
| 2281 |
trough { padding: 4px 0; } |
| 2282 |
highlight, fill { margin: -4px 0; } |
| 2283 |
} |
| 2284 |
|
| 2285 |
// The slider is inside the trough, negative margin to make it bigger |
| 2286 |
slider { |
| 2287 |
min-height: 15px; |
| 2288 |
min-width: 15px; |
| 2289 |
margin: -6px; |
| 2290 |
} |
| 2291 |
|
| 2292 |
// Click-and-hold the slider to activate |
| 2293 |
&.fine-tune { |
| 2294 |
// Make the trough grow in fine-tune mode |
| 2295 |
slider { margin: -4px; } |
| 2296 |
|
| 2297 |
fill, |
| 2298 |
highlight, |
| 2299 |
trough { |
| 2300 |
border-radius: 5px; |
| 2301 |
-gtk-outline-radius: 7px; |
| 2302 |
} |
| 2303 |
} |
| 2304 |
|
| 2305 |
// Trough |
| 2306 |
trough { |
| 2307 |
$_scale_trough_bg: if($variant != 'dark', $button_border, darken($bg_color, 5%)); |
| 2308 |
|
| 2309 |
outline-offset: 2px; |
| 2310 |
-gtk-outline-radius: 4.5px; |
| 2311 |
|
| 2312 |
border-radius: 2.5px; |
| 2313 |
background-color: $_scale_trough_bg; |
| 2314 |
|
| 2315 |
&:disabled { background-color: transparentize($_scale_trough_bg, 0.45); } |
| 2316 |
|
| 2317 |
//OSD troughs |
| 2318 |
.osd & { |
| 2319 |
background-color: if($variant == 'lighter', $osd_button_border, lighten($osd_bg_color, 7%)); |
| 2320 |
|
| 2321 |
highlight { |
| 2322 |
background-color: $selected_bg_color; |
| 2323 |
|
| 2324 |
&:disabled { } |
| 2325 |
} |
| 2326 |
|
| 2327 |
&:disabled { } |
| 2328 |
} |
| 2329 |
|
| 2330 |
// Troughs in selected list-rows and infobars |
| 2331 |
menuitem:hover &, |
| 2332 |
row:selected &, |
| 2333 |
infobar & { |
| 2334 |
background-color: transparentize(black, 0.8); |
| 2335 |
|
| 2336 |
highlight { |
| 2337 |
background-color: $selected_fg_color; |
| 2338 |
|
| 2339 |
&:disabled { background-color: mix($selected_fg_color, $selected_bg_color, 55%); } |
| 2340 |
} |
| 2341 |
|
| 2342 |
&:disabled { background-color: transparentize(black, 0.9); } |
| 2343 |
} |
| 2344 |
} |
| 2345 |
|
| 2346 |
// The colored part of trough |
| 2347 |
highlight { |
| 2348 |
border-radius: 2.5px; |
| 2349 |
background-color: $selected_bg_color; |
| 2350 |
|
| 2351 |
&:disabled { background-color: transparentize($selected_bg_color, 0.45); } |
| 2352 |
} |
| 2353 |
|
| 2354 |
// this is another differently styled part of the trough, the most relevant use case is for example |
| 2355 |
// in media player to indicate how much video stream as been cached |
| 2356 |
fill { |
| 2357 |
border-radius: 2.5px; |
| 2358 |
background-color: transparentize($selected_bg_color, 0.5); |
| 2359 |
|
| 2360 |
&:disabled { background-color: transparent; } |
| 2361 |
} |
| 2362 |
|
| 2363 |
slider { |
| 2364 |
$_slider_border: if($variant!='dark', transparentize(darken($button_border,25%), 0.5), darken($button_border,2%)); |
| 2365 |
|
| 2366 |
background-color: $button_bg; |
| 2367 |
border: 1px solid $_slider_border; |
| 2368 |
border-radius: 100%; |
| 2369 |
|
| 2370 |
transition: $button_transition; |
| 2371 |
transition-property: background, border; |
| 2372 |
|
| 2373 |
&:hover { background-color: lighten($button_bg, 5%); } |
| 2374 |
|
| 2375 |
&:active { |
| 2376 |
background-clip: border-box; |
| 2377 |
background-color: $selected_bg_color; |
| 2378 |
border-color: $selected_bg_color; |
| 2379 |
} |
| 2380 |
|
| 2381 |
&:disabled { |
| 2382 |
background-color: mix($entry_bg, $bg_color, 55%); |
| 2383 |
border-color: transparentize($_slider_border, 0.2); |
| 2384 |
} |
| 2385 |
|
| 2386 |
// Selected list-row and infobar sliders |
| 2387 |
menuitem:hover &, |
| 2388 |
row:selected &, |
| 2389 |
infobar & { |
| 2390 |
background-clip: border-box; |
| 2391 |
background-color: $selected_fg_color; |
| 2392 |
border-color: $selected_fg_color; |
| 2393 |
|
| 2394 |
&:hover { |
| 2395 |
background-color: mix($selected_fg_color, $selected_bg_color, 85%); |
| 2396 |
border-color: mix($selected_fg_color, $selected_bg_color, 85%); |
| 2397 |
} |
| 2398 |
&:active { |
| 2399 |
background-color: mix($selected_fg_color, $selected_bg_color, 50%); |
| 2400 |
border-color: mix($selected_fg_color, $selected_bg_color, 50%); |
| 2401 |
} |
| 2402 |
&:disabled{ |
| 2403 |
background-color: mix($selected_fg_color, $selected_bg_color, 55%); |
| 2404 |
border-color: mix($selected_fg_color, $selected_bg_color, 55%); |
| 2405 |
} |
| 2406 |
} |
| 2407 |
|
| 2408 |
// OSD sliders |
| 2409 |
.osd & { |
| 2410 |
background-clip: border-box; |
| 2411 |
background-color: $selected_bg_color; |
| 2412 |
border-color: $selected_bg_color; |
| 2413 |
|
| 2414 |
&:hover { |
| 2415 |
background-color: lighten($selected_bg_color, 10%); |
| 2416 |
border-color: lighten($selected_bg_color, 10%) |
| 2417 |
} |
| 2418 |
|
| 2419 |
&:active { |
| 2420 |
background-color: darken($selected_bg_color, 10%); |
| 2421 |
border-color: darken($selected_bg_color, 10%); |
| 2422 |
} |
| 2423 |
|
| 2424 |
&:disabled { } |
| 2425 |
} |
| 2426 |
} |
| 2427 |
|
| 2428 |
value { color: gtkalpha(currentColor, 0.4); } |
| 2429 |
|
| 2430 |
marks { |
| 2431 |
color: gtkalpha(currentColor, 0.4); |
| 2432 |
|
| 2433 |
@each $marks_class, $marks_pos, $marks_margin in (top, top, bottom), |
| 2434 |
(bottom, bottom, top), |
| 2435 |
(top, left, right), |
| 2436 |
(bottom, right, left) { |
| 2437 |
&.#{$marks_class} { |
| 2438 |
margin-#{$marks_margin}: $_marks_distance; |
| 2439 |
margin-#{$marks_pos}: -($_marks_distance + $_marks_length); |
| 2440 |
} |
| 2441 |
} |
| 2442 |
} |
| 2443 |
|
| 2444 |
&.fine-tune marks { |
| 2445 |
@each $marks_class, $marks_pos, $marks_margin in (top, top, bottom), |
| 2446 |
(bottom, bottom, top), |
| 2447 |
(top, left, right), |
| 2448 |
(bottom, right, left) { |
| 2449 |
&.#{$marks_class} { |
| 2450 |
margin-#{$marks_margin}: ($_marks_distance - 1px); |
| 2451 |
margin-#{$marks_pos}: -($_marks_distance + $_marks_length - 2px); |
| 2452 |
} |
| 2453 |
} |
| 2454 |
} |
| 2455 |
&.horizontal { |
| 2456 |
indicator { |
| 2457 |
min-height: $_marks_length; |
| 2458 |
min-width: 1px; |
| 2459 |
} |
| 2460 |
|
| 2461 |
&.fine-tune indicator { min-height: ($_marks_length - 1px); } |
| 2462 |
} |
| 2463 |
&.vertical { |
| 2464 |
indicator { |
| 2465 |
min-height: 1px; |
| 2466 |
min-width: $_marks_length; |
| 2467 |
} |
| 2468 |
|
| 2469 |
&.fine-tune indicator { min-width: ($_marks_length - 1px); } |
| 2470 |
} |
| 2471 |
} |
| 2472 |
|
| 2473 |
|
| 2474 |
// |
| 2475 |
// Progress bars |
| 2476 |
// |
| 2477 |
progressbar { |
| 2478 |
padding: 0; |
| 2479 |
font-size: smaller; |
| 2480 |
color: transparentize($fg_color, 0.3); |
| 2481 |
|
| 2482 |
&.osd { |
| 2483 |
min-width: 3px; |
| 2484 |
min-height: 3px; |
| 2485 |
background-color: transparent; |
| 2486 |
|
| 2487 |
trough { |
| 2488 |
border-style: none; |
| 2489 |
background-color: transparent; |
| 2490 |
box-shadow: none; |
| 2491 |
} |
| 2492 |
} |
| 2493 |
// Moving bit |
| 2494 |
progress { |
| 2495 |
background-color: $selected_bg_color; |
| 2496 |
border: none; |
| 2497 |
border-radius: 3px; |
| 2498 |
box-shadow: none; //needed for clipping |
| 2499 |
|
| 2500 |
row:selected &, |
| 2501 |
infobar & { background-color: $selected_fg_color; } |
| 2502 |
} |
| 2503 |
// Trough |
| 2504 |
trough { |
| 2505 |
border: none; |
| 2506 |
border-radius: 3px; |
| 2507 |
background-color: if($variant != 'dark', $button_border, darken($bg_color, 5%)); |
| 2508 |
|
| 2509 |
row:selected &, |
| 2510 |
infobar & { background-color: transparentize(black, 0.8); } |
| 2511 |
} |
| 2512 |
} |
| 2513 |
|
| 2514 |
// |
| 2515 |
// Level Bar |
| 2516 |
// |
| 2517 |
levelbar { |
| 2518 |
&.horizontal { |
| 2519 |
block { |
| 2520 |
min-height: 1px; |
| 2521 |
} |
| 2522 |
|
| 2523 |
&.discrete block { |
| 2524 |
margin: 0 1px; |
| 2525 |
min-width: 32px; |
| 2526 |
} |
| 2527 |
} |
| 2528 |
|
| 2529 |
&.vertical { |
| 2530 |
block { |
| 2531 |
min-width: 1px; |
| 2532 |
} |
| 2533 |
|
| 2534 |
&.discrete block { |
| 2535 |
margin: 1px 0; |
| 2536 |
min-height: 32px; |
| 2537 |
} |
| 2538 |
} |
| 2539 |
|
| 2540 |
trough { |
| 2541 |
border: none; |
| 2542 |
padding: 3px; |
| 2543 |
border-radius: 3px; |
| 2544 |
background-color: if($variant != 'dark', $button_border, darken($bg_color, 5%)); |
| 2545 |
} |
| 2546 |
|
| 2547 |
block:not(.empty) { |
| 2548 |
border: 1px solid $selected_bg_color; |
| 2549 |
background-color: $selected_bg_color; |
| 2550 |
border-radius: 2px; |
| 2551 |
} |
| 2552 |
block.low { |
| 2553 |
border-color: $warning_color; |
| 2554 |
background-color: $warning_color; |
| 2555 |
} |
| 2556 |
block.high { |
| 2557 |
border-color: $selected_bg_color; |
| 2558 |
background-color: $selected_bg_color; |
| 2559 |
} |
| 2560 |
block.full { |
| 2561 |
border-color: $success_color; |
| 2562 |
background-color: $success_color; |
| 2563 |
} |
| 2564 |
block.empty { |
| 2565 |
background-color: if($variant!='dark', transparentize($fg_color,0.8), $base_color); |
| 2566 |
border-color: if($variant!='dark', transparentize($fg_color,0.8), $base_color); |
| 2567 |
} |
| 2568 |
} |
| 2569 |
|
| 2570 |
// |
| 2571 |
// Print dialog |
| 2572 |
// |
| 2573 |
printdialog { |
| 2574 |
paper { |
| 2575 |
border: 1px solid $borders_color; |
| 2576 |
background: $base_color; |
| 2577 |
padding: 0; |
| 2578 |
} |
| 2579 |
|
| 2580 |
.dialog-action-box { margin: 12px; } |
| 2581 |
} |
| 2582 |
|
| 2583 |
// |
| 2584 |
// Frames |
| 2585 |
// |
| 2586 |
frame > border, |
| 2587 |
.frame { |
| 2588 |
margin: 0; |
| 2589 |
padding: 0; |
| 2590 |
border-radius: 0; |
| 2591 |
border: 1px solid $borders_color; |
| 2592 |
} |
| 2593 |
|
| 2594 |
frame.flat > border, |
| 2595 |
frame > border.flat, |
| 2596 |
.frame.flat { |
| 2597 |
border-style: none; |
| 2598 |
} |
| 2599 |
|
| 2600 |
scrolledwindow { |
| 2601 |
viewport.frame { // avoid double borders when viewport inside scrolled window |
| 2602 |
border-style: none; |
| 2603 |
} |
| 2604 |
|
| 2605 |
// This is used by GtkScrolledWindow, when content is touch-dragged past boundaries. |
| 2606 |
// This draws a box on top of the content, the size changes programmatically. |
| 2607 |
overshoot { |
| 2608 |
&.top { @include overshoot(top); } |
| 2609 |
&.bottom { @include overshoot(bottom); } |
| 2610 |
&.left { @include overshoot(left); } |
| 2611 |
&.right { @include overshoot(right); } |
| 2612 |
} |
| 2613 |
|
| 2614 |
junction { // the small square between two scrollbars |
| 2615 |
border-color: transparent; |
| 2616 |
// the border image is used to add the missing dot between the borders, details, details, details... |
| 2617 |
border-image: linear-gradient(to bottom, $borders_color 1px, transparent 1px) 0 0 0 1 / 0 1px stretch; |
| 2618 |
background-color: $_scrollbar_bg_color; |
| 2619 |
|
| 2620 |
&:dir(rtl) { border-image-slice: 0 1 0 0; } |
| 2621 |
} |
| 2622 |
} |
| 2623 |
|
| 2624 |
//vbox and hbox separators |
| 2625 |
separator { |
| 2626 |
background-color: transparentize(black, 0.9); |
| 2627 |
min-width: 1px; |
| 2628 |
min-height: 1px; |
| 2629 |
} |
| 2630 |
|
| 2631 |
// |
| 2632 |
// Lists |
| 2633 |
// |
| 2634 |
list { |
| 2635 |
background-color: $base_color; |
| 2636 |
border-color: $borders_color; |
| 2637 |
|
| 2638 |
row { padding: 2px; } |
| 2639 |
} |
| 2640 |
|
| 2641 |
row { |
| 2642 |
&:not(:hover) { transition: all 150ms $ease-out-quad; } |
| 2643 |
|
| 2644 |
&:selected { |
| 2645 |
@extend %selected_items; |
| 2646 |
|
| 2647 |
button { @extend %selected_button; } |
| 2648 |
} |
| 2649 |
|
| 2650 |
&.activatable { |
| 2651 |
&.has-open-popup, |
| 2652 |
&:hover { background-color: if($variant != 'dark', transparentize(black, 0.95), transparentize(white, 0.97)); } |
| 2653 |
|
| 2654 |
&:active { color: $fg_color; } |
| 2655 |
&:disabled { |
| 2656 |
color: $insensitive_fg_color; |
| 2657 |
image { color: inherit; } |
| 2658 |
} |
| 2659 |
|
| 2660 |
&:selected { |
| 2661 |
&:active { color: $selected_fg_color; } |
| 2662 |
|
| 2663 |
&.has-open-popup, |
| 2664 |
&:hover { background-color: mix(black, $selected_bg_color, 10%); } |
| 2665 |
} |
| 2666 |
} |
| 2667 |
} |
| 2668 |
|
| 2669 |
// |
| 2670 |
// App Notifications |
| 2671 |
// |
| 2672 |
.app-notification { |
| 2673 |
padding: 10px; |
| 2674 |
color: $dark_sidebar_fg; |
| 2675 |
background-color: $dark_sidebar_bg; |
| 2676 |
background-clip: border-box; |
| 2677 |
border-radius: 0 0 2px 2px; |
| 2678 |
border-width: 0 1px 1px 1px; |
| 2679 |
border-style: solid; |
| 2680 |
border-color: darken($dark_sidebar_bg, 10%); |
| 2681 |
|
| 2682 |
border { border: none; } |
| 2683 |
|
| 2684 |
button { |
| 2685 |
@include button(osd); |
| 2686 |
&.flat { |
| 2687 |
@extend %undecorated_button; |
| 2688 |
border-color: transparentize($selected_bg_color, 1); |
| 2689 |
&:disabled { @extend %undecorated_button; } |
| 2690 |
} |
| 2691 |
&:hover { @include button(osd-hover); } |
| 2692 |
&:active, &:checked { @include button(osd-active); background-clip: padding-box; } |
| 2693 |
&:disabled { @include button(osd-insensitive); |
| 2694 |
} |
| 2695 |
} |
| 2696 |
} |
| 2697 |
|
| 2698 |
// |
| 2699 |
// Expanders |
| 2700 |
// |
| 2701 |
expander { |
| 2702 |
arrow { |
| 2703 |
min-width: 16px; |
| 2704 |
min-height: 16px; |
| 2705 |
-gtk-icon-source: -gtk-icontheme('pan-end-symbolic'); |
| 2706 |
|
| 2707 |
&:dir(rtl) { -gtk-icon-source: -gtk-icontheme('pan-end-symbolic-rtl'); } |
| 2708 |
&:hover { color: lighten($fg_color,30%); } //only lightens the arrow |
| 2709 |
&:checked { -gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); } |
| 2710 |
&:disabled { color: $insensitive_fg_color; } |
| 2711 |
} |
| 2712 |
} |
| 2713 |
|
| 2714 |
// |
| 2715 |
// Calendar |
| 2716 |
// |
| 2717 |
calendar { |
| 2718 |
color: $fg_color; |
| 2719 |
border: 1px solid $borders_color; |
| 2720 |
border-radius: 3px; |
| 2721 |
padding: 2px; |
| 2722 |
|
| 2723 |
&:selected { |
| 2724 |
@extend %selected_items; |
| 2725 |
border-radius: 1.5px; |
| 2726 |
} |
| 2727 |
|
| 2728 |
&.header { |
| 2729 |
color: $fg_color; |
| 2730 |
border: none; |
| 2731 |
} |
| 2732 |
|
| 2733 |
&.button { |
| 2734 |
@extend %undecorated_button; |
| 2735 |
|
| 2736 |
color: transparentize($fg_color,0.55); |
| 2737 |
|
| 2738 |
&:hover { color: $fg_color; } |
| 2739 |
|
| 2740 |
&:disabled { color: $insensitive_fg_color; } |
| 2741 |
} |
| 2742 |
|
| 2743 |
&:indeterminate { color: gtkalpha(currentColor,0.55); } |
| 2744 |
&.highlight { color: $fg_color; } |
| 2745 |
} |
| 2746 |
|
| 2747 |
// |
| 2748 |
// Dialogs |
| 2749 |
// |
| 2750 |
messagedialog { // Message Dialog styling |
| 2751 |
|
| 2752 |
.titlebar { |
| 2753 |
min-height: 20px; |
| 2754 |
background-color: $header_bg; |
| 2755 |
border-bottom: 1px solid darken($header_bg, 7%); |
| 2756 |
} |
| 2757 |
|
| 2758 |
.dialog-action-area button { padding: 8px; min-height: 0; } |
| 2759 |
|
| 2760 |
box.dialog-vbox.vertical { |
| 2761 |
padding-top: 10px; |
| 2762 |
} |
| 2763 |
|
| 2764 |
&.csd { // rounded bottom border styling for csd version |
| 2765 |
&.background { |
| 2766 |
border-bottom-left-radius: 3px; |
| 2767 |
border-bottom-right-radius: 3px; |
| 2768 |
border: none; |
| 2769 |
} |
| 2770 |
.dialog-action-area button { |
| 2771 |
border-bottom-style: none; |
| 2772 |
|
| 2773 |
@extend %middle_button; |
| 2774 |
&:first-child{ @extend %first_button; } |
| 2775 |
&:last-child { @extend %last_button; } |
| 2776 |
&:only-child { @extend %single_button; } |
| 2777 |
} |
| 2778 |
%middle_button { |
| 2779 |
border-radius: 0; |
| 2780 |
border-right-style: none; |
| 2781 |
} |
| 2782 |
%last_button { |
| 2783 |
border-radius: 0 0 3px 0; |
| 2784 |
border-right-style: none; |
| 2785 |
-gtk-outline-bottom-right-radius: 2px; |
| 2786 |
-gtk-outline-top-right-radius: 0px; |
| 2787 |
-gtk-outline-bottom-left-radius: 0px; |
| 2788 |
-gtk-outline-top-left-radius: 0px; |
| 2789 |
} |
| 2790 |
%first_button { |
| 2791 |
border-radius: 0 0 0 3px; |
| 2792 |
border-left-style: none; |
| 2793 |
-gtk-outline-bottom-left-radius: 2px; |
| 2794 |
-gtk-outline-top-left-radius: 0px; |
| 2795 |
-gtk-outline-top-right-radius: 0px; |
| 2796 |
-gtk-outline-bottom-right-radius: 0px; |
| 2797 |
} |
| 2798 |
%single_button { |
| 2799 |
border-radius: 0 0 3px 3px; |
| 2800 |
border-left-style: none; |
| 2801 |
border-right-style: none; |
| 2802 |
-gtk-outline-top-right-radius: 0px; |
| 2803 |
-gtk-outline-top-left-radius: 0px; |
| 2804 |
-gtk-outline-bottom-left-radius: 2px; |
| 2805 |
-gtk-outline-bottom-right-radius: 2px; |
| 2806 |
} |
| 2807 |
} |
| 2808 |
} |
| 2809 |
|
| 2810 |
// |
| 2811 |
// Filechooser |
| 2812 |
// |
| 2813 |
filechooser { |
| 2814 |
#pathbarbox { border-bottom: 1px solid transparentize($borders_color, 0.5); } |
| 2815 |
} |
| 2816 |
|
| 2817 |
filechooserbutton:drop(active) { |
| 2818 |
box-shadow: none; |
| 2819 |
border-color: transparent; |
| 2820 |
} |
| 2821 |
|
| 2822 |
// |
| 2823 |
// Sidebar |
| 2824 |
// |
| 2825 |
.sidebar { |
| 2826 |
border-style: none; |
| 2827 |
background-color: lighten($bg_color, 2%); |
| 2828 |
|
| 2829 |
@at-root %sidebar_left, |
| 2830 |
&:dir(ltr), |
| 2831 |
&.left, |
| 2832 |
&.left:dir(rtl) { |
| 2833 |
border-right: 1px solid $borders_color; |
| 2834 |
border-left-style: none; |
| 2835 |
} |
| 2836 |
|
| 2837 |
@at-root %sidebar_right, |
| 2838 |
&:dir(rtl), |
| 2839 |
&.right { |
| 2840 |
border-left: 1px solid $borders_color; |
| 2841 |
border-right-style: none; |
| 2842 |
} |
| 2843 |
|
| 2844 |
list { background-color: transparent; } |
| 2845 |
|
| 2846 |
paned & { &.left, &.right, &.left:dir(rtl), &:dir(rtl), &:dir(ltr), & { border-style: none; }} |
| 2847 |
} |
| 2848 |
|
| 2849 |
stacksidebar { |
| 2850 |
&.sidebar { |
| 2851 |
&:dir(ltr) list, |
| 2852 |
&.left list, |
| 2853 |
&.left:dir(rtl) list { @extend %sidebar_left; } |
| 2854 |
|
| 2855 |
&:dir(rtl) list, |
| 2856 |
&.right list { @extend %sidebar_right; } |
| 2857 |
} |
| 2858 |
|
| 2859 |
row { |
| 2860 |
padding: 10px 4px; |
| 2861 |
|
| 2862 |
> label { |
| 2863 |
padding-left: 6px; |
| 2864 |
padding-right: 6px; |
| 2865 |
} |
| 2866 |
&.needs-attention > label { |
| 2867 |
@extend %needs_attention; |
| 2868 |
background-size: 6px 6px, 0 0; |
| 2869 |
} |
| 2870 |
} |
| 2871 |
} |
| 2872 |
|
| 2873 |
placessidebar { |
| 2874 |
> viewport.frame { border-style: none; } |
| 2875 |
|
| 2876 |
row { |
| 2877 |
// Needs overriding of the GtkListBoxRow padding |
| 2878 |
min-height: 30px; |
| 2879 |
padding: 0px; |
| 2880 |
// Using margins/padding directly in the SidebarRow |
| 2881 |
// will make the animation of the new bookmark row jump |
| 2882 |
> revealer { |
| 2883 |
padding: 0 10px; |
| 2884 |
} |
| 2885 |
image.sidebar-icon { |
| 2886 |
&:dir(ltr) { padding-right: 8px; } |
| 2887 |
&:dir(rtl) { padding-left: 8px; } |
| 2888 |
} |
| 2889 |
label.sidebar-label { |
| 2890 |
&:dir(ltr) { padding-right: 2px; } |
| 2891 |
&:dir(rtl) { padding-left: 2px; } |
| 2892 |
} |
| 2893 |
@at-root button.sidebar-button { |
| 2894 |
min-width: 22px; |
| 2895 |
min-height: 22px; |
| 2896 |
margin-top: 2px; |
| 2897 |
margin-bottom: 2px; |
| 2898 |
padding: 0; |
| 2899 |
@extend %button_basic_flat; |
| 2900 |
border-radius: 100%; |
| 2901 |
-gtk-outline-radius: 100%; |
| 2902 |
|
| 2903 |
&:not(:hover):not(:active) > image { opacity: 0.5 }; |
| 2904 |
} |
| 2905 |
|
| 2906 |
&.sidebar-placeholder-row { |
| 2907 |
padding: 0 8px; |
| 2908 |
min-height: 2px; |
| 2909 |
background-image: _solid($drop_target_color); |
| 2910 |
background-clip: content-box; |
| 2911 |
} |
| 2912 |
|
| 2913 |
&.sidebar-new-bookmark-row { color: $selected_bg_color; } |
| 2914 |
|
| 2915 |
&:drop(active):not(:disabled) { |
| 2916 |
&, label, image { color: $drop_target_color; } |
| 2917 |
|
| 2918 |
box-shadow: inset 0 1px $drop_target_color, |
| 2919 |
inset 0 -1px $drop_target_color; |
| 2920 |
|
| 2921 |
&:selected { |
| 2922 |
&, label, image { color: $selected_fg_color; } |
| 2923 |
background-color: $drop_target_color; |
| 2924 |
} |
| 2925 |
} |
| 2926 |
} |
| 2927 |
} |
| 2928 |
|
| 2929 |
separator.sidebar { |
| 2930 |
&:dir(ltr), &.left, &.left:dir(rtl), |
| 2931 |
&:dir(rtl), &.right { |
| 2932 |
background-color: $borders_color; |
| 2933 |
border: 0; |
| 2934 |
|
| 2935 |
.titlebar & { |
| 2936 |
background-color: $header_border; |
| 2937 |
margin: 0; |
| 2938 |
} |
| 2939 |
} |
| 2940 |
} |
| 2941 |
|
| 2942 |
// |
| 2943 |
// Placesview |
| 2944 |
// |
| 2945 |
placesview { |
| 2946 |
.server-list-button > image { |
| 2947 |
-gtk-icon-transform: rotate(0turn); |
| 2948 |
} |
| 2949 |
|
| 2950 |
.server-list-button:checked > image { |
| 2951 |
transition: 200ms $ease-out-quad; |
| 2952 |
-gtk-icon-transform: rotate(-0.5turn); |
| 2953 |
} |
| 2954 |
|
| 2955 |
// this selects the "connect to server" label |
| 2956 |
> actionbar > revealer > box > label { |
| 2957 |
padding-left: 8px; |
| 2958 |
padding-right: 8px; |
| 2959 |
} |
| 2960 |
} |
| 2961 |
|
| 2962 |
// |
| 2963 |
// Paned |
| 2964 |
// |
| 2965 |
paned { |
| 2966 |
> separator { |
| 2967 |
min-width: 1px; |
| 2968 |
min-height: 1px; |
| 2969 |
-gtk-icon-source: none; |
| 2970 |
border-style: none; |
| 2971 |
background-color: transparent; |
| 2972 |
background-image: _solid($borders_color); |
| 2973 |
background-size: 1px 1px; |
| 2974 |
|
| 2975 |
&:selected { background-image: _solid($selected_bg_color); } |
| 2976 |
|
| 2977 |
&.wide { |
| 2978 |
min-width: 5px; |
| 2979 |
min-height: 5px; |
| 2980 |
background-color: $bg_color; |
| 2981 |
background-image: _solid($borders_color), _solid($borders_color); |
| 2982 |
background-size: 1px 1px, 1px 1px; |
| 2983 |
} |
| 2984 |
} |
| 2985 |
|
| 2986 |
&.horizontal > separator { |
| 2987 |
background-repeat: repeat-y; |
| 2988 |
&:dir(ltr) { |
| 2989 |
margin: 0 -8px 0 0; |
| 2990 |
padding: 0 8px 0 0; |
| 2991 |
background-position: left; |
| 2992 |
} |
| 2993 |
&:dir(rtl) { |
| 2994 |
margin: 0 0 0 -8px; |
| 2995 |
padding: 0 0 0 8px; |
| 2996 |
background-position: right; |
| 2997 |
} |
| 2998 |
|
| 2999 |
&.wide { |
| 3000 |
margin: 0; |
| 3001 |
padding: 0; |
| 3002 |
background-repeat: repeat-y, repeat-y; |
| 3003 |
background-position: left, right; |
| 3004 |
} |
| 3005 |
} |
| 3006 |
|
| 3007 |
&.vertical > separator { |
| 3008 |
margin: 0 0 -8px 0; |
| 3009 |
padding: 0 0 8px 0; |
| 3010 |
background-repeat: repeat-x; |
| 3011 |
background-position: top; |
| 3012 |
|
| 3013 |
&.wide { |
| 3014 |
margin: 0; |
| 3015 |
padding: 0; |
| 3016 |
background-repeat: repeat-x, repeat-x; |
| 3017 |
background-position: bottom, top; |
| 3018 |
} |
| 3019 |
} |
| 3020 |
} |
| 3021 |
|
| 3022 |
// |
| 3023 |
// GtkInfoBar |
| 3024 |
// |
| 3025 |
infobar { |
| 3026 |
border-style: none; |
| 3027 |
|
| 3028 |
&.info, |
| 3029 |
&.question, |
| 3030 |
&.warning, |
| 3031 |
&.error { |
| 3032 |
background-color: $selected_bg_color; |
| 3033 |
color: $selected_fg_color; |
| 3034 |
caret-color: currentColor; |
| 3035 |
|
| 3036 |
button { @extend %selected_button } |
| 3037 |
|
| 3038 |
selection { |
| 3039 |
color: $selected_bg_color; |
| 3040 |
background-color: $selected_fg_color; |
| 3041 |
} |
| 3042 |
|
| 3043 |
*:link { @extend %link_selected; } |
| 3044 |
} |
| 3045 |
} |
| 3046 |
|
| 3047 |
// |
| 3048 |
// Buttons on selected backgrounds |
| 3049 |
// |
| 3050 |
%selected_button { |
| 3051 |
|
| 3052 |
@at-root %selected_button_normal, & { |
| 3053 |
color: $selected_fg_color; |
| 3054 |
background-color: transparentize($selected_fg_color, 1); |
| 3055 |
border-color: transparentize($selected_fg_color, 0.5); |
| 3056 |
} |
| 3057 |
|
| 3058 |
&.flat { |
| 3059 |
@include button(undecorated); |
| 3060 |
color: $selected_fg_color; |
| 3061 |
background-color: transparentize($selected_fg_color, 1); |
| 3062 |
|
| 3063 |
@at-root %selected_button_flat_disabled, |
| 3064 |
&:disabled { |
| 3065 |
&, label { color: transparentize($selected_fg_color, 0.6); } |
| 3066 |
} |
| 3067 |
} |
| 3068 |
&:hover { |
| 3069 |
color: $selected_fg_color; |
| 3070 |
background-color: transparentize($selected_fg_color, 0.8); |
| 3071 |
border-color: transparentize($selected_fg_color, 0.2); |
| 3072 |
} |
| 3073 |
@at-root %selected_button_active, |
| 3074 |
&:active, &:active:hover, &:checked { |
| 3075 |
color: $selected_bg_color; |
| 3076 |
background-color: $selected_fg_color; |
| 3077 |
border-color: $selected_fg_color; |
| 3078 |
} |
| 3079 |
&:disabled { |
| 3080 |
&, label { color: transparentize($selected_fg_color, 0.5); } |
| 3081 |
background-color: transparentize($selected_fg_color, 1); |
| 3082 |
border-color: transparentize($selected_fg_color, 0.6); |
| 3083 |
|
| 3084 |
@at-root %selected_button_disabled_active, |
| 3085 |
&:active, &:checked { |
| 3086 |
color: $selected_bg_color; |
| 3087 |
background-color: transparentize($selected_fg_color, 0.5); |
| 3088 |
border-color: transparentize($selected_fg_color, 0.6); |
| 3089 |
} |
| 3090 |
} |
| 3091 |
} |
| 3092 |
|
| 3093 |
// |
| 3094 |
// Tooltips |
| 3095 |
// |
| 3096 |
tooltip { |
| 3097 |
&.background { |
| 3098 |
// background-color needs to be set this way otherwise it gets drawn twice |
| 3099 |
// see https://bugzilla.gnome.org/show_bug.cgi?id=736155 for details. |
| 3100 |
background-color: lighten($osd_bg_color, 10%); |
| 3101 |
background-clip: padding-box; |
| 3102 |
|
| 3103 |
label { padding: 4px; } |
| 3104 |
} |
| 3105 |
|
| 3106 |
border-radius: 2px; |
| 3107 |
box-shadow: none; |
| 3108 |
|
| 3109 |
decoration { background-color: transparent; } |
| 3110 |
|
| 3111 |
* { //Yeah this is ugly |
| 3112 |
background-color: transparent; |
| 3113 |
color: $osd_fg_color; // just to be sure |
| 3114 |
} |
| 3115 |
} |
| 3116 |
|
| 3117 |
// |
| 3118 |
// Color Chooser |
| 3119 |
// |
| 3120 |
colorswatch { |
| 3121 |
// This widget is made of two boxes one on top of the other, the lower box is GtkColorSwatch {} the other one |
| 3122 |
// is GtkColorSwatch .overlay {}, GtkColorSwatch has the programmatically set background, so most of the style |
| 3123 |
// is applied to the overlay box. |
| 3124 |
|
| 3125 |
$_colorswatch-radius: 2px; |
| 3126 |
|
| 3127 |
&, &:drop(active) { border-style: none; } |
| 3128 |
|
| 3129 |
// border rounding |
| 3130 |
&.top { |
| 3131 |
border-top-left-radius: $_colorswatch-radius + 0.5px; |
| 3132 |
border-top-right-radius: $_colorswatch-radius + 0.5; |
| 3133 |
|
| 3134 |
overlay { |
| 3135 |
border-top-left-radius: $_colorswatch-radius; |
| 3136 |
border-top-right-radius: $_colorswatch-radius; |
| 3137 |
} |
| 3138 |
} |
| 3139 |
&.bottom { |
| 3140 |
border-bottom-left-radius: $_colorswatch-radius + 0.5px; |
| 3141 |
border-bottom-right-radius: $_colorswatch-radius + 0.5; |
| 3142 |
|
| 3143 |
overlay { |
| 3144 |
border-bottom-left-radius: $_colorswatch-radius; |
| 3145 |
border-bottom-right-radius: $_colorswatch-radius; |
| 3146 |
} |
| 3147 |
} |
| 3148 |
&.left, &:first-child:not(.top) { |
| 3149 |
border-top-left-radius: $_colorswatch_radius + 0.5px; |
| 3150 |
border-bottom-left-radius: $_colorswatch_radius + 0.5px; |
| 3151 |
overlay { |
| 3152 |
border-top-left-radius: $_colorswatch_radius; |
| 3153 |
border-bottom-left-radius: $_colorswatch_radius; |
| 3154 |
} |
| 3155 |
} |
| 3156 |
&.right, &:last-child:not(.bottom) { |
| 3157 |
border-top-right-radius: $_colorswatch_radius + 0.5px; |
| 3158 |
border-bottom-right-radius: $_colorswatch_radius + 0.5px; |
| 3159 |
overlay { |
| 3160 |
border-top-right-radius: $_colorswatch_radius; |
| 3161 |
border-bottom-right-radius: $_colorswatch_radius; |
| 3162 |
} |
| 3163 |
} |
| 3164 |
|
| 3165 |
&.dark { |
| 3166 |
outline-color: transparentize(white, 0.6); |
| 3167 |
|
| 3168 |
overlay { |
| 3169 |
color: transparentize(white, 0.3); |
| 3170 |
&:hover { |
| 3171 |
border-color: if($variant != 'dark', transparentize(black, 0.5), $borders_color); |
| 3172 |
} |
| 3173 |
} |
| 3174 |
} |
| 3175 |
&.light { |
| 3176 |
outline-color: transparentize(black, 0.6); |
| 3177 |
|
| 3178 |
overlay { |
| 3179 |
color: transparentize(black, 0.3); |
| 3180 |
&:hover { |
| 3181 |
border-color: if($variant != 'dark', transparentize(black, 0.7), $borders_color); |
| 3182 |
} |
| 3183 |
} |
| 3184 |
} |
| 3185 |
|
| 3186 |
overlay { |
| 3187 |
border: 1px solid if($variant != 'dark', transparentize(black, 0.85), $borders_color); |
| 3188 |
&:hover { background-color: transparentize(white, 0.8) } |
| 3189 |
} |
| 3190 |
|
| 3191 |
&:disabled { |
| 3192 |
opacity: 0.5; |
| 3193 |
overlay { |
| 3194 |
border-color: transparentize(black, 0.4); |
| 3195 |
box-shadow: none; |
| 3196 |
} |
| 3197 |
} |
| 3198 |
|
| 3199 |
&#add-color-button { |
| 3200 |
border-style: solid; // the borders are drawn by the overlay for standard colorswatches to have them semi |
| 3201 |
border-width: 1px; // translucent on the colored background, here it's not necessary so they need to be set |
| 3202 |
@include button(normal); |
| 3203 |
&:hover { @include button(hover); } |
| 3204 |
overlay { @include button(undecorated); } // reset the overlay to not cover the button style underneath |
| 3205 |
} |
| 3206 |
} |
| 3207 |
|
| 3208 |
button.color { |
| 3209 |
padding: 0; |
| 3210 |
|
| 3211 |
colorswatch:first-child:last-child { |
| 3212 |
&, overlay { |
| 3213 |
margin: 4px; |
| 3214 |
border-radius: 0; |
| 3215 |
} |
| 3216 |
} |
| 3217 |
} |
| 3218 |
|
| 3219 |
// colorscale popup |
| 3220 |
colorchooser .popover.osd { border-radius: 3px; } |
| 3221 |
|
| 3222 |
// |
| 3223 |
// Misc |
| 3224 |
// |
| 3225 |
//content view (grid/list) |
| 3226 |
.content-view { |
| 3227 |
background-color: $base_color; |
| 3228 |
|
| 3229 |
&:hover { -gtk-icon-effect: highlight; } |
| 3230 |
|
| 3231 |
rubberband { @extend rubberband; } |
| 3232 |
} |
| 3233 |
|
| 3234 |
.scale-popup { |
| 3235 |
.osd & { @extend %osd; } |
| 3236 |
|
| 3237 |
button { // +/- buttons on GtkVolumeButton popup |
| 3238 |
&:hover { |
| 3239 |
@include button(hover); |
| 3240 |
} |
| 3241 |
} |
| 3242 |
} |
| 3243 |
|
| 3244 |
// Decouple the font of context menus from their entry/textview |
| 3245 |
.context-menu { font: initial; } |
| 3246 |
.monospace { font-family: Monospace; } |
| 3247 |
|
| 3248 |
// |
| 3249 |
// Shortcuts Help |
| 3250 |
// |
| 3251 |
%button_circular, |
| 3252 |
button.circular, |
| 3253 |
button.circular-button { |
| 3254 |
padding: 0; |
| 3255 |
min-width: 24px; |
| 3256 |
min-height: 24px; |
| 3257 |
padding: 2px; |
| 3258 |
border-radius: 50%; |
| 3259 |
-gtk-outline-radius: 50%; |
| 3260 |
|
| 3261 |
label { padding: 0; } |
| 3262 |
} |
| 3263 |
|
| 3264 |
.keycap { |
| 3265 |
min-width: 16px; |
| 3266 |
min-height: 20px; |
| 3267 |
|
| 3268 |
padding: 3px 6px 4px 6px; |
| 3269 |
|
| 3270 |
color: $fg_color; |
| 3271 |
background-color: $base_color; |
| 3272 |
border: 1px solid $borders_color; |
| 3273 |
border-radius: 2.5px; |
| 3274 |
box-shadow: inset 0px -2px 0px if($variant!='dark', transparentize(black, 0.95), transparentize(black, 0.85)); |
| 3275 |
} |
| 3276 |
|
| 3277 |
stackswitcher button { |
| 3278 |
&.text-button { min-width: 80px; } |
| 3279 |
&.circular { min-width: 0; } |
| 3280 |
} |
| 3281 |
|
| 3282 |
// |
| 3283 |
// Dnd |
| 3284 |
// |
| 3285 |
*:drop(active):focus, |
| 3286 |
*:drop(active) { |
| 3287 |
box-shadow: inset 0 0 0 1px $drop_target_color; |
| 3288 |
} |
| 3289 |
|
| 3290 |
// |
| 3291 |
// Window Decorations |
| 3292 |
// |
| 3293 |
|
| 3294 |
decoration { |
| 3295 |
border-radius: if($variant=='light' or $variant=='lighter', 4px 4px 0 0, 3px 3px 0 0); |
| 3296 |
border-width: 0px; |
| 3297 |
|
| 3298 |
$_wm_border: if($variant!='dark', transparentize(black, 0.9), transparentize(black, 0.45)); |
| 3299 |
|
| 3300 |
box-shadow: 0 0 0 1px if($variant == 'dark' or $variant == 'darker', darken($header_bg, 7%), $_wm_border), |
| 3301 |
0 8px 8px 0 if($variant !='dark', opacify($_wm_border, 0.1), transparentize($_wm_border, 0.2)); |
| 3302 |
|
| 3303 |
// this is used for the resize cursor area |
| 3304 |
margin: 10px; |
| 3305 |
|
| 3306 |
&:backdrop { |
| 3307 |
// the transparent shadow here is to enforce that the shadow extents don't |
| 3308 |
// change when we go to backdrop, to prevent jumping windows |
| 3309 |
box-shadow: 0 0 0 1px if($variant == 'dark' or $variant == 'darker', transparentize(darken($header_bg, 7%), 0.1), $_wm_border), |
| 3310 |
0 8px 8px 0 transparent, |
| 3311 |
0 5px 5px 0 if($variant !='dark', opacify($_wm_border, 0.1), transparentize($_wm_border, 0.2)); |
| 3312 |
|
| 3313 |
transition: $backdrop_transition; |
| 3314 |
} |
| 3315 |
.maximized &, |
| 3316 |
.fullscreen & { |
| 3317 |
border-radius: 0; |
| 3318 |
box-shadow: none; |
| 3319 |
} |
| 3320 |
.tiled &, |
| 3321 |
.tiled-top &, |
| 3322 |
.tiled-right &, |
| 3323 |
.tiled-bottom &, |
| 3324 |
.tiled-left & { |
| 3325 |
border-radius: 0; |
| 3326 |
box-shadow: 0 0 0 1px if($variant == 'dark' or $variant == 'darker', darken($header_bg, 7%), $_wm_border), |
| 3327 |
0 0 0 20px transparent; //transparent control workaround -- GTK issue #3670 |
| 3328 |
|
| 3329 |
&:backdrop { |
| 3330 |
box-shadow: 0 0 0 1px if($variant == 'dark' or $variant == 'darker', darken($header_bg, 7%), $_wm_border), |
| 3331 |
0 0 0 20px transparent; // GTK issue #3670 |
| 3332 |
} |
| 3333 |
} |
| 3334 |
.popup & { |
| 3335 |
box-shadow: none; |
| 3336 |
border-radius: 0; |
| 3337 |
} |
| 3338 |
// server-side decorations as used by mutter |
| 3339 |
.ssd &, |
| 3340 |
.ssd &:backdrop { |
| 3341 |
border-radius: if($variant=='light' or $variant=='lighter', 4px 4px 0 0, 3px 3px 0 0); |
| 3342 |
box-shadow: 0 0 0 1px if($variant == 'dark' or $variant == 'darker', transparentize(black, 0.35), $_wm_border); |
| 3343 |
} |
| 3344 |
.ssd.maximized &, |
| 3345 |
.ssd.maximized &:backdrop { |
| 3346 |
border-radius: 0; |
| 3347 |
box-shadow: none; |
| 3348 |
} |
| 3349 |
|
| 3350 |
.csd.popup & { |
| 3351 |
border-radius: 2px; |
| 3352 |
box-shadow: 0 3px 6px if($variant != 'dark', $_wm_border, transparentize($_wm_border, 0.1)), |
| 3353 |
0 0 0 1px if($variant != 'dark', $_wm_border, darken($bg_color, 10%)); |
| 3354 |
} |
| 3355 |
tooltip.csd & { |
| 3356 |
border-radius: 2px; |
| 3357 |
box-shadow: 0 1px 3px 1px if($variant != 'dark', $_wm_border, transparentize($_wm_border, 0.3)); |
| 3358 |
} |
| 3359 |
messagedialog.csd & { |
| 3360 |
border-radius: 3px; |
| 3361 |
} |
| 3362 |
.solid-csd & { |
| 3363 |
border: 1px solid $borders_color; |
| 3364 |
border-radius: 0; |
| 3365 |
margin: 1px; |
| 3366 |
background-color: $header_bg; |
| 3367 |
box-shadow: none; |
| 3368 |
} |
| 3369 |
} |
| 3370 |
|
| 3371 |
// |
| 3372 |
// Titlebuttons |
| 3373 |
// |
| 3374 |
headerbar, |
| 3375 |
.titlebar { |
| 3376 |
|
| 3377 |
&.default-decoration button.titlebutton { // no vertical padding for ssd buttons |
| 3378 |
padding: 0 4px; // already handled by the titlebar-padding |
| 3379 |
min-width: 0; |
| 3380 |
min-height: 0; |
| 3381 |
margin: 0; |
| 3382 |
} |
| 3383 |
|
| 3384 |
button.titlebutton { |
| 3385 |
padding: 0; |
| 3386 |
min-width: 24px; |
| 3387 |
|
| 3388 |
@include button(undecorated); |
| 3389 |
background-color: transparentize($header_bg, 1); |
| 3390 |
|
| 3391 |
&:hover { |
| 3392 |
@include button(header-hover); |
| 3393 |
} |
| 3394 |
&:active, &:checked { |
| 3395 |
@include button(header-active); |
| 3396 |
} |
| 3397 |
&.close, &.maximize, &.minimize { |
| 3398 |
color: transparent; |
| 3399 |
background-color: transparent; |
| 3400 |
background-position: center; |
| 3401 |
background-repeat: no-repeat; |
| 3402 |
border-width: 0; |
| 3403 |
|
| 3404 |
&:backdrop { opacity: 1; } |
| 3405 |
} |
| 3406 |
// Load png assets for each button |
| 3407 |
@each $k in ('close','maximize', 'minimize') { |
| 3408 |
@each $l, $m in ('',''), (':backdrop','-backdrop'), (':hover','-hover'), (':active','-active') { |
| 3409 |
|
| 3410 |
&.#{$k}#{$l} { background-image: -gtk-scaled(url('assets/titlebutton-#{$k}#{$m}#{$darker_asset_suffix}.png'), |
| 3411 |
url('assets/titlebutton-#{$k}#{$m}#{$darker_asset_suffix}@2.png')); } |
| 3412 |
} |
| 3413 |
} |
| 3414 |
} |
| 3415 |
} |
| 3416 |
|
| 3417 |
// catch all extend |
| 3418 |
%selected_items { |
| 3419 |
background-color: $selected_bg_color; |
| 3420 |
|
| 3421 |
@at-root %nobg_selected_items, & { |
| 3422 |
color: $selected_fg_color; |
| 3423 |
|
| 3424 |
@at-root %selected_items_disabled, |
| 3425 |
&:disabled { color: mix($selected_fg_color, $selected_bg_color, 50%); } |
| 3426 |
} |
| 3427 |
} |