button.qss 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. PushButton, ToolButton {
  2. color: black;
  3. background: rgba(255, 255, 255, 0.7);
  4. border: 1px solid rgba(0, 0, 0, 0.073);
  5. border-bottom: 1px solid rgba(0, 0, 0, 0.183);
  6. border-radius: 5px;
  7. font: 14px 'Segoe UI', 'Microsoft YaHei';
  8. padding: 5px 12px 6px 12px;
  9. outline: none;
  10. }
  11. ToolButton {
  12. padding: 5px 9px 6px 8px;
  13. }
  14. PushButton[hasIcon=false] {
  15. padding: 5px 12px 6px 12px;
  16. }
  17. PushButton[hasIcon=true] {
  18. padding: 5px 12px 6px 36px;
  19. }
  20. PushButton:hover, ToolButton:hover {
  21. background: rgba(249, 249, 249, 0.5);
  22. }
  23. PushButton:pressed, ToolButton:pressed {
  24. color: rgba(0, 0, 0, 0.63);
  25. background: rgba(249, 249, 249, 0.3);
  26. border-bottom: 1px solid rgba(0, 0, 0, 0.073);
  27. }
  28. PushButton:disabled, ToolButton:disabled {
  29. color: rgba(0, 0, 0, 0.36);
  30. background: rgba(255, 255, 255, 0.3);
  31. border: 1px solid rgba(0, 0, 0, 0.06);
  32. border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  33. }
  34. PrimaryPushButton {
  35. color: white;
  36. background-color: --ThemeColorPrimary;
  37. border: 1px solid --ThemeColorLight1;
  38. border-bottom: 1px solid --ThemeColorDark1;
  39. }
  40. PrimaryPushButton:hover {
  41. background-color: --ThemeColorLight1;
  42. border: 1px solid --ThemeColorLight2;
  43. border-bottom: 1px solid --ThemeColorDark1;
  44. }
  45. PrimaryPushButton:pressed {
  46. color: rgba(255, 255, 255, 0.63);
  47. background-color: --ThemeColorLight3;
  48. border: 1px solid --ThemeColorLight3;
  49. }
  50. PrimaryPushButton:disabled {
  51. color: rgba(255, 255, 255, 0.9);
  52. background-color: rgb(205, 205, 205);
  53. border: 1px solid rgb(205, 205, 205);
  54. }
  55. HyperlinkButton {
  56. font: 14px 'Segoe UI', 'Microsoft YaHei';
  57. padding: 6px 12px 6px 12px;
  58. color: --ThemeColorPrimary;
  59. border: none;
  60. border-radius: 6px;
  61. background-color: transparent;
  62. }
  63. HyperlinkButton:hover {
  64. background-color: rgba(0, 0, 0, 15);
  65. }
  66. HyperlinkButton:pressed {
  67. background-color: rgba(0, 0, 0, 7);
  68. }
  69. HyperlinkButton:disabled {
  70. color: rgba(0, 0, 0, 0.43)
  71. }
  72. RadioButton {
  73. min-height: 24px;
  74. max-height: 24px;
  75. background-color: transparent;
  76. font: 14px 'Segoe UI', 'Microsoft YaHei';
  77. color: black;
  78. }
  79. RadioButton::indicator {
  80. width: 18px;
  81. height: 18px;
  82. border-radius: 11px;
  83. border: 2px solid #999999;
  84. background-color: rgba(0, 0, 0, 5);
  85. margin-right: 4px;
  86. }
  87. RadioButton::indicator:hover {
  88. background-color: rgba(0, 0, 0, 0);
  89. }
  90. RadioButton::indicator:pressed {
  91. border: 2px solid #bbbbbb;
  92. background-color: qradialgradient(spread:pad, cx:0.5, cy:0.5, radius:0.5, fx:0.5, fy:0.5,
  93. stop:0 rgb(255, 255, 255),
  94. stop:0.5 rgb(255, 255, 255),
  95. stop:0.6 rgb(225, 224, 223),
  96. stop:1 rgb(225, 224, 223));
  97. }
  98. RadioButton::indicator:checked {
  99. height: 22px;
  100. width: 22px;
  101. border: none;
  102. border-radius: 11px;
  103. background-color: qradialgradient(spread:pad, cx:0.5, cy:0.5, radius:0.5, fx:0.5, fy:0.5,
  104. stop:0 rgb(255, 255, 255),
  105. stop:0.5 rgb(255, 255, 255),
  106. stop:0.6 --ThemeColorPrimary,
  107. stop:1 --ThemeColorPrimary);
  108. }
  109. RadioButton::indicator:checked:hover {
  110. background-color: qradialgradient(spread:pad, cx:0.5, cy:0.5, radius:0.5, fx:0.5, fy:0.5,
  111. stop:0 rgb(255, 255, 255),
  112. stop:0.6 rgb(255, 255, 255),
  113. stop:0.7 --ThemeColorPrimary,
  114. stop:1 --ThemeColorPrimary);
  115. }
  116. RadioButton::indicator:checked:pressed {
  117. background-color: qradialgradient(spread:pad, cx:0.5, cy:0.5, radius:0.5, fx:0.5, fy:0.5,
  118. stop:0 rgb(255, 255, 255),
  119. stop:0.5 rgb(255, 255, 255),
  120. stop:0.6 --ThemeColorPrimary,
  121. stop:1 --ThemeColorPrimary);
  122. }
  123. RadioButton:disabled {
  124. color: rgba(0, 0, 0, 110);
  125. }
  126. RadioButton::indicator:disabled {
  127. border: 2px solid #bbbbbb;
  128. background-color: rgba(0, 0, 0, 0);
  129. }
  130. TransparentToolButton {
  131. background-color: transparent;
  132. border-radius: 4px;
  133. margin: 0;
  134. }
  135. TransparentToolButton:hover {
  136. background-color: rgba(0, 0, 0, 9);
  137. }
  138. TransparentToolButton:pressed {
  139. background-color: rgba(0, 0, 0, 6);
  140. }