slider.qss 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. QSlider:horizontal {
  2. min-height: 24px;
  3. }
  4. QSlider::groove:horizontal {
  5. height: 4px;
  6. background-color: rgb(158, 159, 159);
  7. border-radius: 2px;
  8. }
  9. QSlider::sub-page:horizontal {
  10. background: --ThemeColorPrimary;
  11. height: 4px;
  12. border-radius: 2px;
  13. }
  14. QSlider::handle:horizontal {
  15. border: 1px solid rgb(58, 58, 58);
  16. width: 21px;
  17. min-height: 22px;
  18. margin: -9px 0;
  19. border-radius: 11px;
  20. background-color: qradialgradient(spread:pad, cx:0.5, cy:0.5, radius:0.5, fx:0.5, fy:0.5,
  21. stop:0 --ThemeColorPrimary,
  22. stop:0.5 --ThemeColorPrimary,
  23. stop:0.6 rgb(69, 69, 69),
  24. stop:1 rgb(69, 69, 69));
  25. }
  26. QSlider::handle:horizontal:hover {
  27. background-color: qradialgradient(spread:pad, cx:0.5, cy:0.5, radius:0.5, fx:0.5, fy:0.5,
  28. stop:0 --ThemeColorPrimary,
  29. stop:0.6 --ThemeColorPrimary,
  30. stop:0.7 rgb(69, 69, 69),
  31. stop:1 rgb(69, 69, 69));
  32. }
  33. QSlider::handle:horizontal:pressed {
  34. background-color: qradialgradient(spread:pad, cx:0.5, cy:0.5, radius:0.5, fx:0.5, fy:0.5,
  35. stop:0 --ThemeColorPrimary,
  36. stop:0.4 --ThemeColorPrimary,
  37. stop:0.5 rgb(69, 69, 69),
  38. stop:1 rgb(69, 69, 69));
  39. }
  40. QSlider:vertical {
  41. min-width: 24px;
  42. }
  43. QSlider::groove:vertical {
  44. width: 4px;
  45. background-color: rgb(158, 159, 159);
  46. border-radius: 2px;
  47. }
  48. QSlider::add-page:vertical {
  49. background: --ThemeColorPrimary;
  50. width: 4px;
  51. border-radius: 2px;
  52. }
  53. QSlider::handle:vertical {
  54. border: 1px solid rgb(58, 58, 58);
  55. height: 20px;
  56. min-width: 22px;
  57. margin: 0 -9px;
  58. border-radius: 11px;
  59. background-color: qradialgradient(spread:pad, cx:0.5, cy:0.5, radius:0.5, fx:0.5, fy:0.5,
  60. stop:0 --ThemeColorPrimary,
  61. stop:0.5 --ThemeColorPrimary,
  62. stop:0.6 rgb(69, 69, 69),
  63. stop:1 rgb(69, 69, 69));
  64. }
  65. QSlider::handle:vertical:hover {
  66. background-color: qradialgradient(spread:pad, cx:0.5, cy:0.5, radius:0.5, fx:0.5, fy:0.5,
  67. stop:0 --ThemeColorPrimary,
  68. stop:0.6 --ThemeColorPrimary,
  69. stop:0.7 rgb(69, 69, 69),
  70. stop:1 rgb(69, 69, 69));
  71. }
  72. QSlider::handle:vertical:pressed {
  73. background-color: qradialgradient(spread:pad, cx:0.5, cy:0.5, radius:0.5, fx:0.5, fy:0.5,
  74. stop:0 --ThemeColorPrimary,
  75. stop:0.4 --ThemeColorPrimary,
  76. stop:0.5 rgb(69, 69, 69),
  77. stop:1 rgb(69, 69, 69));
  78. }