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: 16px 'Segoe UI', 'Microsoft YaHei';
  8. selection-background-color: transparent;
  9. }
  10. QTreeView::item {
  11. padding: 4px;
  12. margin-top: 2px;
  13. margin-bottom: 2px;
  14. padding-left: 20px;
  15. border-radius: 5px;
  16. color: black;
  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_black.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_black.svg);
  25. }
  26. QTreeView:disabled {
  27. color: rgba(0, 0, 0, 110);
  28. }
  29. QTreeView::indicator {
  30. width: 18px;
  31. height: 18px;
  32. border-radius: 5px;
  33. border: 1px solid rgb(135, 135, 135);
  34. background-color: rgb(241, 241, 241);
  35. }
  36. QTreeView::indicator:hover {
  37. border: 1px solid rgb(132, 132, 132);
  38. background-color: rgb(232, 232, 232);
  39. }
  40. QTreeView::indicator:pressed {
  41. border: 1px solid rgb(184, 184, 184);
  42. background-color: rgb(224, 224, 224);
  43. }
  44. QTreeView::indicator:checked,
  45. QTreeView::indicator:indeterminate {
  46. border: 1px solid --ThemeColorPrimary;
  47. background-color: --ThemeColorPrimary;
  48. }
  49. QTreeView::indicator:checked {
  50. image: url(:/qfluentwidgets/images/check_box/Accept_white.svg);
  51. }
  52. QTreeView::indicator:indeterminate {
  53. image: url(:/qfluentwidgets/images/check_box/PartialAccept_white.svg);
  54. }
  55. QTreeView::indicator:checked:hover,
  56. QTreeView::indicator:indeterminate:hover {
  57. border: 1px solid --ThemeColorLight1;
  58. background-color: --ThemeColorLight1;
  59. }
  60. QTreeView::indicator:checked:pressed,
  61. QTreeView::indicator:indeterminate:pressed {
  62. border: 1px solid --ThemeColorLight3;
  63. background-color: --ThemeColorLight3;
  64. }
  65. QTreeView::indicator:disabled {
  66. border: 1px solid #bbbbbb;
  67. background-color: rgb(224, 224, 224);
  68. }
  69. QTreeView::indicator:checked:disabled,
  70. QTreeView::indicator:indeterminate:disabled {
  71. border: 1px solid rgb(199, 199, 199);
  72. background-color: rgb(199, 199, 199);
  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. }