Commit 68835b7
committed
rework custom stylesheet loading
Previously, the stylesheet was copied to the user's .config dir, and
this was then loaded as a style (with priority "application").
The user could alter this stylesheet directly.
This stylesheet was called "safeeyes_styles.css".
Now, we split the stylesheets into two:
- The system stylesheet, which is directly loaded with priority
"application".
- The user's stylesheet, if it exists, which is loaded from the .config
dir with priority "user", overriding both the system stylesheet and
any themes the user might have.
This is now called "safeeyes_custom_styles.css".
This means in the future, we can simply add new default styles to the
system stylesheet without breaking the user. Additionally, any styles
loaded with a higher priority than "application" (eg. certain GTK
themes, see slgobinath#687), can now
be overridden by the user's stylesheet.
We also check if the old path ("safeeyes_styles.css") contains an old
default stylesheet. If it does, we delete it.
If it (likely) contains a customized stylesheet, don't delete it, but
warn the user that they should use "safeeyes_custom_styles.css" instead
now.1 parent b379523 commit 68835b7
4 files changed
+50
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
| 133 | + | |
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
327 | 327 | | |
328 | 328 | | |
329 | 329 | | |
330 | | - | |
331 | | - | |
332 | 330 | | |
333 | 331 | | |
334 | 332 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | | - | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
171 | 174 | | |
172 | 175 | | |
173 | 176 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
59 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
60 | 64 | | |
61 | 65 | | |
62 | 66 | | |
| |||
373 | 377 | | |
374 | 378 | | |
375 | 379 | | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
376 | 391 | | |
377 | 392 | | |
378 | 393 | | |
| |||
382 | 397 | | |
383 | 398 | | |
384 | 399 | | |
385 | | - | |
| 400 | + | |
386 | 401 | | |
387 | 402 | | |
388 | 403 | | |
| |||
397 | 412 | | |
398 | 413 | | |
399 | 414 | | |
400 | | - | |
401 | | - | |
402 | 415 | | |
403 | 416 | | |
404 | 417 | | |
405 | 418 | | |
406 | 419 | | |
407 | 420 | | |
408 | 421 | | |
409 | | - | |
| 422 | + | |
410 | 423 | | |
411 | 424 | | |
412 | 425 | | |
413 | 426 | | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
418 | 454 | | |
419 | 455 | | |
420 | 456 | | |
| |||
526 | 562 | | |
527 | 563 | | |
528 | 564 | | |
529 | | - | |
530 | 565 | | |
531 | 566 | | |
532 | 567 | | |
533 | | - | |
534 | 568 | | |
535 | 569 | | |
536 | 570 | | |
537 | | - | |
538 | 571 | | |
539 | 572 | | |
540 | 573 | | |
541 | 574 | | |
542 | | - | |
543 | | - | |
544 | | - | |
545 | | - | |
546 | | - | |
547 | | - | |
548 | | - | |
549 | 575 | | |
550 | 576 | | |
551 | 577 | | |
| |||
0 commit comments