tree_view.qss 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. QTreeView {
  2. background-color: transparent;
  3. border: none;
  4. border-radius: 5px;
  5. outline: 0;
  6. padding-right: 5px;
  7. font: 13px 'Segoe UI', 'Microsoft YaHei';
  8. selection-background-color: transparent;
  9. }
  10. QTreeView::item {
  11. padding: 4px;
  12. margin-top: 3px;
  13. margin-bottom: 3px;
  14. padding-left: 20px;
  15. border-radius: 5px;
  16. color: white;
  17. }
  18. QTreeView::branch:has-children:!has-siblings:closed,
  19. QTreeView::branch:closed:has-children:has-siblings {
  20. image: url(:/qfluentwidgets/images/tree_view/TreeViewClose_white.svg);
  21. }
  22. QTreeView::branch:open:has-children:!has-siblings,
  23. QTreeView::branch:open:has-children:has-siblings {
  24. image: url(:/qfluentwidgets/images/tree_view/TreeViewOpen_white.svg);
  25. }
  26. QTreeView:disabled {
  27. color: rgba(255, 255, 255, 110);
  28. }
  29. QTreeView::indicator {
  30. width: 18px;
  31. height: 18px;
  32. border-radius: 5px;
  33. border: 1px solid rgb(159, 159, 159);
  34. background-color: rgb(42, 42, 42);
  35. }
  36. QTreeView::indicator:hover {
  37. border: 1px solid rgb(161, 161, 161);
  38. background-color: rgb(56, 56, 56);
  39. }
  40. QTreeView::indicator:pressed {
  41. border: 1px solid rgb(86, 86, 86);
  42. background-color: rgb(62, 62, 62);
  43. }
  44. QTreeView::indicator:checked,
  45. QTreeView::indicator:indeterminate {
  46. background-color: --ThemeColorPrimary;
  47. border: 1px solid --ThemeColorPrimary;
  48. }
  49. QTreeView::indicator:checked {
  50. image: url(:/qfluentwidgets/images/check_box/Accept_black.svg);
  51. }
  52. QTreeView::indicator:indeterminate {
  53. image: url(:/qfluentwidgets/images/check_box/PartialAccept_black.svg);
  54. }
  55. QTreeView::indicator:checked:hover,
  56. QTreeView::indicator:indeterminate:hover {
  57. border: 1px solid --ThemeColorDark1;
  58. background-color: --ThemeColorDark1;
  59. }
  60. QTreeView::indicator:checked:pressed,
  61. QTreeView::indicator:indeterminate:pressed {
  62. border: 1px solid --ThemeColorDark2;
  63. background-color: --ThemeColorDark2;
  64. }
  65. QTreeView::indicator:disabled {
  66. border: 1px solid rgb(82, 82, 82);
  67. background-color: rgb(45, 45, 45);
  68. }
  69. QTreeView::indicator:checked:disabled,
  70. QTreeView::indicator:indeterminate:disabled {
  71. border: 1px solid rgb(82, 82, 82);
  72. background-color: rgb(82, 82, 82);
  73. }
  74. QScrollBar {
  75. background: transparent;
  76. width: 4px;
  77. margin-top: 12px;
  78. margin-bottom: 0;
  79. padding-right: 2px;
  80. }
  81. QScrollBar::sub-line {
  82. background: transparent;
  83. }
  84. QScrollBar::add-line {
  85. background: transparent;
  86. }
  87. QScrollBar::handle {
  88. background: rgb(122, 122, 122);
  89. border: 2px solid rgb(128, 128, 128);
  90. border-radius: 1px;
  91. min-height: 32px;
  92. }
  93. QScrollBar::add-page:vertical,
  94. QScrollBar::sub-page:vertical {
  95. background: none;
  96. }