slider.qss 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. QSlider:horizontal {
  2. min-height: 24px;
  3. }
  4. QSlider::groove:horizontal {
  5. height: 4px;
  6. background-color: rgba(0, 0, 0, 100);
  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(222, 222, 222);
  16. width: 20px;
  17. min-height: 24px;
  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.48 --ThemeColorPrimary,
  23. stop:0.55 rgb(255, 255, 255),
  24. stop:1 rgb(255, 255, 255));
  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.55 --ThemeColorPrimary,
  30. stop:0.65 rgb(255, 255, 255),
  31. stop:1 rgb(255, 255, 255));
  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(255, 255, 255),
  38. stop:1 rgb(255, 255, 255));
  39. }
  40. QSlider::groove:horizontal:disabled {
  41. background-color: rgba(0, 0, 0, 75);
  42. }
  43. QSlider::handle:horizontal:disabled {
  44. background-color: #808080;
  45. border: 5px solid #cccccc;
  46. }
  47. QSlider:vertical {
  48. min-width: 24px;
  49. }
  50. QSlider::groove:vertical {
  51. width: 4px;
  52. background-color: rgba(0, 0, 0, 100);
  53. border-radius: 2px;
  54. }
  55. QSlider::add-page:vertical {
  56. background: --ThemeColorPrimary;
  57. width: 4px;
  58. border-radius: 2px;
  59. }
  60. QSlider::handle:vertical {
  61. border: 1px solid rgb(222, 222, 222);
  62. height: 20px;
  63. min-width: 24px;
  64. margin: 0 -9px;
  65. border-radius: 11px;
  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.48 --ThemeColorPrimary,
  69. stop:0.55 rgb(255, 255, 255),
  70. stop:1 rgb(255, 255, 255));
  71. }
  72. QSlider::handle:vertical:hover {
  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.55 --ThemeColorPrimary,
  76. stop:0.65 rgb(255, 255, 255),
  77. stop:1 rgb(255, 255, 255));
  78. }
  79. QSlider::handle:vertical:pressed {
  80. background-color: qradialgradient(spread:pad, cx:0.5, cy:0.5, radius:0.5, fx:0.5, fy:0.5,
  81. stop:0 --ThemeColorPrimary,
  82. stop:0.4 --ThemeColorPrimary,
  83. stop:0.5 rgb(255, 255, 255),
  84. stop:1 rgb(255, 255, 255));
  85. }
  86. QSlider::groove:vertical:disabled {
  87. background-color: rgba(0, 0, 0, 75);
  88. }
  89. QSlider::handle:vertical:disabled {
  90. background-color: #808080;
  91. border: 5px solid #cccccc;
  92. }