material.css.template 31 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348
  1. /* ------------------------------------------------------------------------ */
  2. /* QtMaterial - https://github.com/UN-GCPDS/qt-material
  3. /* By Yeison Cardona - GCPDS
  4. /* ------------------------------------------------------------------------ */
  5. *{
  6. color: {{secondaryTextColor}};
  7. font-family: {{font_family}};
  8. {% if font_size %}
  9. font-size: {{font_size|density(density_scale, density_interval=1)}}px;
  10. {% else %}
  11. font-size: {{13|density(density_scale, density_interval=1)}}px;
  12. {% endif %}
  13. {% if line_height %}
  14. line-height: {{line_height|density(density_scale, density_interval=8)}}px;
  15. {% else %}
  16. line-height: {{13|density(density_scale, density_interval=8)}}px;
  17. {% endif %}
  18. selection-background-color: {{primaryLightColor}};
  19. selection-color: {{primaryTextColor}};
  20. }
  21. *:focus {
  22. outline: none;
  23. }
  24. /* ------------------------------------------------------------------------ */
  25. /* Custom colors */
  26. .danger{
  27. color: {{danger}};
  28. background-color: transparent;
  29. }
  30. .warning{
  31. color: {{warning}};
  32. background-color: transparent;
  33. }
  34. .success{
  35. color: {{success}};
  36. background-color: transparent;
  37. }
  38. .danger:disabled{
  39. color: {{danger|opacity(0.4)}};
  40. border-color: {{danger|opacity(0.4)}};
  41. }
  42. .warning:disabled{
  43. color: {{warning|opacity(0.4)}};
  44. border-color: {{warning|opacity(0.4)}};
  45. }
  46. .success:disabled{
  47. color: {{success|opacity(0.4)}};
  48. border-color: {{success|opacity(0.4)}};
  49. }
  50. .danger:flat:disabled{
  51. background-color: {{danger|opacity(0.1)}};
  52. }
  53. .warning:flat:disabled{
  54. background-color: {{warning|opacity(0.1)}};
  55. }
  56. .success:flat:disabled{
  57. background-color: {{success|opacity(0.1)}};
  58. }
  59. /* ------------------------------------------------------------------------ */
  60. /* Basic widgets */
  61. QWidget {
  62. background-color: {{secondaryDarkColor}};
  63. }
  64. QGroupBox,
  65. QFrame {
  66. background-color: {{secondaryDarkColor}};
  67. border: 2px solid {{secondaryLightColor}};
  68. border-radius: 4px;
  69. }
  70. QGroupBox.fill_background,
  71. QFrame.fill_background {
  72. background-color: {{secondaryColor}};
  73. border: 2px solid {{secondaryColor}};
  74. border-radius: 4px;
  75. }
  76. QSplitter {
  77. background-color: transparent;
  78. border: none
  79. }
  80. QStatusBar {
  81. color: {{secondaryTextColor}};
  82. background-color: {{secondaryLightColor|opacity(0.2)}};
  83. border-radius: 0px;
  84. }
  85. QScrollArea,
  86. QStackedWidget,
  87. QWidget > QToolBox,
  88. QToolBox > QWidget,
  89. QTabWidget > QWidget {
  90. border: none;
  91. }
  92. QScrollArea {
  93. border: 2px solid {{secondaryLightColor}};
  94. }
  95. QTabWidget::pane {
  96. border: none;
  97. }
  98. /* ------------------------------------------------------------------------ */
  99. /* Inputs */
  100. QDateTimeEdit,
  101. QSpinBox,
  102. QDoubleSpinBox,
  103. QTextEdit,
  104. QLineEdit,
  105. QPushButton {
  106. color: {{primaryColor}};
  107. background-color: {{secondaryDarkColor}};
  108. border: 2px solid {{primaryColor}};
  109. border-radius: 4px;
  110. height: {{36|density(density_scale, border=2)}}px;
  111. }
  112. QDateTimeEdit,
  113. QSpinBox,
  114. QDoubleSpinBox,
  115. QTreeView,
  116. QListView,
  117. QLineEdit,
  118. QComboBox {
  119. padding-left: {{16|density(density_scale)}}px;
  120. border-radius: 0px;
  121. background-color: {{secondaryColor}};
  122. border-width: 0 0 2px 0;
  123. border-radius: 0px;
  124. border-top-left-radius: 4px;
  125. border-top-right-radius: 4px;
  126. height: {{36|density(density_scale, border=2)}}px;
  127. }
  128. QPlainTextEdit {
  129. border-radius: 4px;
  130. padding: {{8|density(density_scale)}}px {{16|density(density_scale)}}px;
  131. background-color: {{secondaryDarkColor}};
  132. border: 2px solid {{secondaryLightColor}};
  133. }
  134. QTextEdit {
  135. padding: {{8|density(density_scale)}}px {{16|density(density_scale)}}px;
  136. border-radius: 4px;
  137. background-color: {{secondaryColor}};
  138. }
  139. QDateTimeEdit:disabled,
  140. QSpinBox:disabled,
  141. QDoubleSpinBox:disabled,
  142. QTextEdit:disabled,
  143. QLineEdit:disabled {
  144. color: {{primaryColor|opacity(0.2)}};
  145. background-color: {{secondaryColor|opacity(0.75)}};
  146. border: 2px solid {{primaryColor|opacity(0.2)}};
  147. border-width: 0 0 2px 0;
  148. padding: 0px {{16|density(density_scale)}}px;
  149. border-radius: 0px;
  150. border-top-left-radius: 4px;
  151. border-top-right-radius: 4px;
  152. height: {{36|density(density_scale, border=2)}}px;
  153. }
  154. /* ------------------------------------------------------------------------ */
  155. /* QComboBox */
  156. QComboBox {
  157. color: {{primaryColor}};
  158. border: 1px solid {{primaryColor}};
  159. border-width: 0 0 2px 0;
  160. background-color: {{secondaryColor}};
  161. border-radius: 0px;
  162. border-top-left-radius: 4px;
  163. border-top-right-radius: 4px;
  164. height: {{36|density(density_scale, border=2)}}px;
  165. }
  166. QComboBox:disabled {
  167. color: {{primaryColor|opacity(0.2)}};
  168. background-color: {{secondaryColor|opacity(0.75)}};
  169. border-bottom: 2px solid {{primaryColor|opacity(0.2)}};
  170. }
  171. QComboBox::drop-down {
  172. border: none;
  173. color: {{primaryColor}};
  174. width: 20px;
  175. }
  176. QComboBox::down-arrow {
  177. image: url(icon:/primary/downarrow.svg);
  178. margin-right: {{12|density(density_scale)}}px;
  179. }
  180. QComboBox::down-arrow:disabled {
  181. image: url(icon:/disabled/downarrow.svg);
  182. margin-right: {{12|density(density_scale)}}px;
  183. }
  184. QComboBox QAbstractItemView {
  185. background-color: {{secondaryColor}};
  186. border: 2px solid {{secondaryLightColor}};
  187. border-radius: 4px;
  188. }
  189. QComboBox[frame='false'] {
  190. color: {{primaryColor}};
  191. background-color: transparent;
  192. border: 1px solid transparent;
  193. }
  194. QComboBox[frame='false']:disabled {
  195. color: {{primaryColor|opacity(0.2)}};
  196. }
  197. /* ------------------------------------------------------------------------ */
  198. /* Spin buttons */
  199. QDateTimeEdit::up-button,
  200. QDoubleSpinBox::up-button,
  201. QSpinBox::up-button {
  202. subcontrol-origin: border;
  203. subcontrol-position: top right;
  204. width: 20px;
  205. image: url(icon:/primary/uparrow.svg);
  206. border-width: 0px;
  207. margin-right: 5px;
  208. }
  209. QDateTimeEdit::up-button:disabled,
  210. QDoubleSpinBox::up-button:disabled,
  211. QSpinBox::up-button:disabled {
  212. image: url(icon:/disabled/uparrow.svg);
  213. }
  214. QDateTimeEdit::down-button,
  215. QDoubleSpinBox::down-button,
  216. QSpinBox::down-button {
  217. subcontrol-origin: border;
  218. subcontrol-position: bottom right;
  219. width: 20px;
  220. image: url(icon:/primary/downarrow.svg);
  221. border-width: 0px;
  222. border-top-width: 0;
  223. margin-right: 5px;
  224. }
  225. QDateTimeEdit::down-button:disabled,
  226. QDoubleSpinBox::down-button:disabled,
  227. QSpinBox::down-button:disabled {
  228. image: url(icon:/disabled/downarrow.svg);
  229. }
  230. /* ------------------------------------------------------------------------ */
  231. /* QPushButton */
  232. QPushButton {
  233. text-transform: uppercase;
  234. margin: 0px;
  235. padding: {{1|density(density_scale)}}px {{16|density(density_scale)}}px;
  236. height: {{36|density(density_scale, border=2)}}px;
  237. {% if button_shape=='default' %}
  238. border-radius: 4px;
  239. {% elif button_shape=='rounded' %}
  240. border-radius: {{36|density(density_scale, border=2, scale=0.5)}}px;
  241. {% endif %}
  242. }
  243. QPushButton:checked,
  244. QPushButton:pressed {
  245. color: {{secondaryDarkColor}};
  246. background-color: {{primaryColor}};
  247. }
  248. QPushButton:hover {
  249. color: {{secondaryDarkColor}};
  250. background-color: {{primaryColor}};
  251. }
  252. QPushButton:flat {
  253. margin: 0px;
  254. color: {{primaryColor}};
  255. border: none;
  256. background-color: transparent;
  257. }
  258. QPushButton:flat:hover {
  259. background-color: {{primaryColor|opacity(0.2)}};
  260. }
  261. QPushButton:flat:pressed,
  262. QPushButton:flat:checked {
  263. background-color: {{primaryColor|opacity(0.1)}};
  264. }
  265. QPushButton:disabled {
  266. color: {{secondaryLightColor|opacity(0.75)}};
  267. background-color: transparent;
  268. border-color: {{secondaryLightColor}};
  269. }
  270. QPushButton:flat:disabled {
  271. color: {{secondaryLightColor|opacity(0.75)}};
  272. background-color: {{secondaryLightColor|opacity(0.25)}};
  273. border: none;
  274. }
  275. QPushButton:disabled {
  276. border: 2px solid {{secondaryLightColor|opacity(0.75)}};
  277. }
  278. QPushButton:checked:disabled {
  279. color: {{secondaryColor}};
  280. background-color: {{secondaryLightColor}};
  281. border-color: {{secondaryLightColor}};
  282. }
  283. /* ------------------------------------------------------------------------ */
  284. /* QTabBar */
  285. QTabBar{
  286. text-transform: uppercase;
  287. font-weight: bold;
  288. }
  289. QTabBar::tab {
  290. color: {{secondaryTextColor}};
  291. border: 0px;
  292. }
  293. QTabBar::tab:bottom,
  294. QTabBar::tab:top{
  295. padding: 0 {{16|density(density_scale)}}px;
  296. height: {{28|density(density_scale)}}px;
  297. }
  298. QTabBar::tab:left,
  299. QTabBar::tab:right{
  300. padding: {{16|density(density_scale)}}px 0;
  301. width: {{28|density(density_scale)}}px;
  302. }
  303. QTabBar::tab:top:selected,
  304. QTabBar::tab:top:hover {
  305. color: {{primaryColor}};
  306. border-bottom: 2px solid {{primaryColor}};
  307. }
  308. QTabBar::tab:bottom:selected,
  309. QTabBar::tab:bottom:hover {
  310. color: {{primaryColor}};
  311. border-top: 2px solid {{primaryColor}};
  312. }
  313. QTabBar::tab:right:selected,
  314. QTabBar::tab:right:hover {
  315. color: {{primaryColor}};
  316. border-left: 2px solid {{primaryColor}};
  317. }
  318. QTabBar::tab:left:selected,
  319. QTabBar::tab:left:hover {
  320. color: {{primaryColor}};
  321. border-right: 2px solid {{primaryColor}};
  322. }
  323. QTabBar QToolButton:hover,
  324. QTabBar QToolButton {
  325. border: 20px;
  326. background-color: {{secondaryDarkColor}};
  327. }
  328. QTabBar QToolButton::up-arrow {
  329. image: url(icon:/disabled/uparrow2.svg);
  330. }
  331. QTabBar QToolButton::up-arrow:hover {
  332. image: url(icon:/primary/uparrow2.svg);
  333. }
  334. QTabBar QToolButton::down-arrow {
  335. image: url(icon:/disabled/downarrow2.svg);
  336. }
  337. QTabBar QToolButton::down-arrow:hover {
  338. image: url(icon:/primary/downarrow2.svg);
  339. }
  340. QTabBar QToolButton::right-arrow {
  341. image: url(icon:/primary/rightarrow2.svg);
  342. }
  343. QTabBar QToolButton::right-arrow:hover {
  344. image: url(icon:/disabled/rightarrow2.svg);
  345. }
  346. QTabBar QToolButton::left-arrow {
  347. image: url(icon:/primary/leftarrow2.svg);
  348. }
  349. QTabBar QToolButton::left-arrow:hover {
  350. image: url(icon:/disabled/leftarrow2.svg);
  351. }
  352. QTabBar::close-button {
  353. image: url(icon:/disabled/tab_close.svg);
  354. }
  355. QTabBar::close-button:hover {
  356. image: url(icon:/primary/tab_close.svg);
  357. }
  358. /* ------------------------------------------------------------------------ */
  359. /* QGroupBox */
  360. QGroupBox {
  361. padding-top: {{font_size/2|density(density_scale)}}px;
  362. margin-top: {{font_size/1.5|density(density_scale)}}px;
  363. line-height: {{font_size}};
  364. text-transform: uppercase;
  365. font-size: {{font_size}};
  366. }
  367. QGroupBox::title {
  368. color: {{secondaryTextColor|opacity(0.4)}};
  369. subcontrol-origin: margin;
  370. subcontrol-position: top left;
  371. left: {{font_size|density(density_scale)}}px;
  372. background-color: {{secondaryDarkColor}};
  373. }
  374. /* ------------------------------------------------------------------------ */
  375. /* QRadioButton and QCheckBox labels */
  376. QRadioButton,
  377. QCheckBox {
  378. spacing: {{12|density(density_scale)}}px;
  379. color: {{secondaryTextColor}};
  380. line-height: 14px;
  381. height: {{36|density(density_scale)}}px;
  382. background-color: transparent;
  383. spacing: 5px;
  384. }
  385. QRadioButton:disabled,
  386. QCheckBox:disabled {
  387. color: {{secondaryTextColor|opacity(0.3)}};
  388. }
  389. /* ------------------------------------------------------------------------ */
  390. /* General Indicators */
  391. QGroupBox::indicator {
  392. width: {{24|density(density_scale)}}px;
  393. height: {{24|density(density_scale)}}px;
  394. border-radius: 3px;
  395. }
  396. QMenu::indicator,
  397. QListView::indicator,
  398. QTableWidget::indicator,
  399. QRadioButton::indicator,
  400. QCheckBox::indicator {
  401. width: {{28|density(density_scale)}}px;
  402. height: {{28|density(density_scale)}}px;
  403. border-radius: 4px;
  404. }
  405. /* ------------------------------------------------------------------------ */
  406. /* QListView Indicator */
  407. QListView::indicator:checked,
  408. QListView::indicator:checked:selected,
  409. QListView::indicator:checked:focus {
  410. image: url(icon:/primary/checklist.svg);
  411. }
  412. QListView::indicator:checked:selected:active {
  413. image: url(icon:/primary/checklist_invert.svg);
  414. }
  415. QListView::indicator:checked:disabled {
  416. image: url(icon:/disabled/checklist.svg);
  417. }
  418. QListView::indicator:indeterminate,
  419. QListView::indicator:indeterminate:selected,
  420. QListView::indicator:indeterminate:focus {
  421. image: url(icon:/primary/checklist_indeterminate.svg);
  422. }
  423. QListView::indicator:indeterminate:selected:active {
  424. image: url(icon:/primary/checklist_indeterminate_invert.svg);
  425. }
  426. QListView::indicator:indeterminate:disabled {
  427. image: url(icon:/disabled/checklist_indeterminate.svg);
  428. }
  429. /* ------------------------------------------------------------------------ */
  430. /* QTableView Indicator */
  431. QTableView::indicator:enabled:checked,
  432. QTableView::indicator:enabled:checked:selected,
  433. QTableView::indicator:enabled:checked:focus {
  434. image: url(icon:/primary/checkbox_checked.svg);
  435. }
  436. QTableView::indicator:checked:selected:active {
  437. image: url(icon:/primary/checkbox_checked_invert.svg);
  438. }
  439. QTableView::indicator:disabled:checked,
  440. QTableView::indicator:disabled:checked:selected,
  441. QTableView::indicator:disabled:checked:focus {
  442. image: url(icon:/disabled/checkbox_checked.svg);
  443. }
  444. QTableView::indicator:enabled:unchecked,
  445. QTableView::indicator:enabled:unchecked:selected,
  446. QTableView::indicator:enabled:unchecked:focus {
  447. image: url(icon:/primary/checkbox_unchecked.svg);
  448. }
  449. QTableView::indicator:unchecked:selected:active {
  450. image: url(icon:/primary/checkbox_unchecked_invert.svg);
  451. }
  452. QTableView::indicator:disabled:unchecked,
  453. QTableView::indicator:disabled:unchecked:selected,
  454. QTableView::indicator:disabled:unchecked:focus {
  455. image: url(icon:/disabled/checkbox_unchecked.svg);
  456. }
  457. QTableView::indicator:enabled:indeterminate,
  458. QTableView::indicator:enabled:indeterminate:selected,
  459. QTableView::indicator:enabled:indeterminate:focus {
  460. image: url(icon:/primary/checkbox_indeterminate.svg);
  461. }
  462. QTableView::indicator:indeterminate:selected:active {
  463. image: url(icon:/primary/checkbox_indeterminate_invert.svg);
  464. }
  465. QTableView::indicator:disabled:indeterminate,
  466. QTableView::indicator:disabled:indeterminate:selected,
  467. QTableView::indicator:disabled:indeterminate:focus {
  468. image: url(icon:/disabled/checkbox_indeterminate.svg);
  469. }
  470. /* ------------------------------------------------------------------------ */
  471. /* QCheckBox and QGroupBox Indicator */
  472. QCheckBox::indicator:checked,
  473. QGroupBox::indicator:checked {
  474. image: url(icon:/primary/checkbox_checked.svg);
  475. }
  476. QCheckBox::indicator:unchecked,
  477. QGroupBox::indicator:unchecked {
  478. image: url(icon:/primary/checkbox_unchecked.svg);
  479. }
  480. QCheckBox::indicator:indeterminate,
  481. QGroupBox::indicator:indeterminate {
  482. image: url(icon:/primary/checkbox_indeterminate.svg);
  483. }
  484. QCheckBox::indicator:checked:disabled,
  485. QGroupBox::indicator:checked:disabled {
  486. image: url(icon:/disabled/checkbox_checked.svg);
  487. }
  488. QCheckBox::indicator:unchecked:disabled,
  489. QGroupBox::indicator:unchecked:disabled {
  490. image: url(icon:/disabled/checkbox_unchecked.svg);
  491. }
  492. QCheckBox::indicator:indeterminate:disabled,
  493. QGroupBox::indicator:indeterminate:disabled {
  494. image: url(icon:/disabled/checkbox_indeterminate.svg);
  495. }
  496. /* ------------------------------------------------------------------------ */
  497. /* QRadioButton Indicator */
  498. QRadioButton::indicator:checked {
  499. image: url(icon:/primary/radiobutton_checked.svg);
  500. }
  501. QRadioButton::indicator:unchecked {
  502. image: url(icon:/primary/radiobutton_unchecked.svg);
  503. }
  504. QRadioButton::indicator:checked:disabled {
  505. image: url(icon:/disabled/radiobutton_checked.svg);
  506. }
  507. QRadioButton::indicator:unchecked:disabled {
  508. image: url(icon:/disabled/radiobutton_unchecked.svg);
  509. }
  510. /* ------------------------------------------------------------------------ */
  511. /* QDockWidget */
  512. QDockWidget {
  513. color: {{secondaryTextColor}};
  514. text-transform: uppercase;
  515. border: 2px solid {{secondaryColor}};
  516. titlebar-close-icon: url(icon:/primary/close.svg);
  517. titlebar-normal-icon: url(icon:/primary/float.svg);
  518. border-radius: 4px;
  519. }
  520. QDockWidget::title {
  521. text-align: left;
  522. padding-left: {{36|density(density_scale)}}px;
  523. padding: 3px;
  524. margin-top: 4px;
  525. }
  526. /* ------------------------------------------------------------------------ */
  527. /* QComboBox indicator */
  528. QComboBox::indicator:checked {
  529. image: url(icon:/primary/checklist.svg);
  530. }
  531. QComboBox::indicator:checked:selected {
  532. image: url(icon:/primary/checklist_invert.svg);
  533. }
  534. /* ------------------------------------------------------------------------ */
  535. /* Menu Items */
  536. QComboBox::item,
  537. QCalendarWidget QMenu::item,
  538. QMenu::item {
  539. {% if QMenu %}
  540. height: {{qmenu_height}}px;
  541. {% else %}
  542. height: {{28|density(density_scale)}}px;
  543. {% endif %}
  544. border: 8px solid transparent;
  545. color: {{secondaryTextColor}};
  546. }
  547. QCalendarWidget QMenu::item,
  548. QMenu::item {
  549. {% if QMenu %}
  550. padding: {{qmenu_padding}};
  551. {% else %}
  552. {% if pyside6 or pyqt6 %}
  553. padding: 0px {{24|density(density_scale)}}px 0px 8px; /* pyside6 or pyqt6 */
  554. {% elif pyqt5 %}
  555. padding: 0px {{24|density(density_scale)}}px 0px 8px; /* pyqt5 */
  556. {% elif pyside2 %}
  557. padding: 0px {{32|density(density_scale)}}px 0px {{32|density(density_scale)}}px; /* pyside2 */
  558. {% endif %}
  559. {% endif %}
  560. }
  561. QComboBox::item:selected,
  562. QCalendarWidget QMenu::item:selected,
  563. QMenu::item:selected {
  564. color: {{primaryTextColor}};
  565. background-color: {{primaryLightColor}};
  566. border-radius: 0px;
  567. }
  568. QComboBox::item:disabled,
  569. QCalendarWidget QMenu::item:disabled,
  570. QMenu::item:disabled {
  571. color: {{secondaryTextColor|opacity(0.3)}};
  572. }
  573. /* ------------------------------------------------------------------------ */
  574. /* QMenu */
  575. QCalendarWidget QMenu,
  576. QMenu {
  577. background-color: {{secondaryColor}};
  578. border: 2px solid {{secondaryLightColor}};
  579. border-radius: 4px;
  580. }
  581. QMenu::separator {
  582. height: 2px;
  583. background-color: {{secondaryLightColor}};
  584. margin-left: 2px;
  585. margin-right: 2px;
  586. }
  587. QMenu::right-arrow{
  588. image: url(icon:/primary/rightarrow.svg);
  589. width: {{16|density(density_scale)}}px;
  590. height: {{16|density(density_scale)}}px;
  591. }
  592. QMenu::right-arrow:selected{
  593. image: url(icon:/disabled/rightarrow.svg);
  594. }
  595. QMenu::indicator:non-exclusive:unchecked {
  596. image: url(icon:/primary/checkbox_unchecked.svg);
  597. }
  598. QMenu::indicator:non-exclusive:unchecked:selected {
  599. image: url(icon:/primary/checkbox_unchecked_invert.svg);
  600. }
  601. QMenu::indicator:non-exclusive:checked {
  602. image: url(icon:/primary/checkbox_checked.svg);
  603. }
  604. QMenu::indicator:non-exclusive:checked:selected {
  605. image: url(icon:/primary/checkbox_checked_invert.svg);
  606. }
  607. QMenu::indicator:exclusive:unchecked {
  608. image: url(icon:/primary/radiobutton_unchecked.svg);
  609. }
  610. QMenu::indicator:exclusive:unchecked:selected {
  611. image: url(icon:/primary/radiobutton_unchecked_invert.svg);
  612. }
  613. QMenu::indicator:exclusive:checked {
  614. image: url(icon:/primary/radiobutton_checked.svg);
  615. }
  616. QMenu::indicator:exclusive:checked:selected {
  617. image: url(icon:/primary/radiobutton_checked_invert.svg);
  618. }
  619. /* ------------------------------------------------------------------------ */
  620. /* QMenuBar */
  621. QMenuBar {
  622. background-color: {{secondaryColor}};
  623. color: {{secondaryTextColor}};
  624. }
  625. QMenuBar::item {
  626. height: {{32|density(density_scale)}}px;
  627. padding: 8px;
  628. background-color: transparent;
  629. color: {{secondaryTextColor}};
  630. }
  631. QMenuBar::item:selected,
  632. QMenuBar::item:pressed {
  633. color: {{primaryTextColor}};
  634. background-color: {{primaryLightColor}};
  635. }
  636. /* ------------------------------------------------------------------------ */
  637. /* QToolBox */
  638. QToolBox::tab {
  639. background-color: {{secondaryColor}};
  640. color: {{secondaryTextColor}};
  641. text-transform: uppercase;
  642. border-radius: 4px;
  643. padding-left: 15px;
  644. }
  645. QToolBox::tab:selected,
  646. QToolBox::tab:hover {
  647. background-color: {{primaryColor|opacity(0.2)}};
  648. }
  649. /* ------------------------------------------------------------------------ */
  650. /* QProgressBar */
  651. QProgressBar {
  652. border-radius: 15px;
  653. background-color: {{secondaryLightColor}};
  654. text-align: center;
  655. color: black;
  656. margin-right:45px;
  657. }
  658. QProgressBar::chunk {
  659. border-radius: 15px;
  660. background-color: {{primaryColor}};
  661. }
  662. /* ------------------------------------------------------------------------ */
  663. /* QScrollBar */
  664. QScrollBar:horizontal {
  665. border: 0;
  666. background: {{secondaryColor}};
  667. height: {{8|density(density_scale)}}px;
  668. }
  669. QScrollBar:vertical {
  670. border: 0;
  671. background: {{secondaryColor}};
  672. width: {{8|density(density_scale)}}px;
  673. }
  674. QScrollBar::handle {
  675. background: {{primaryColor|opacity(0.1)}};
  676. }
  677. QScrollBar::handle:horizontal {
  678. min-width: {{24|density(density_scale)}}px;
  679. }
  680. QScrollBar::handle:vertical {
  681. min-height: {{24|density(density_scale)}}px;
  682. }
  683. QScrollBar::handle:vertical:hover,
  684. QScrollBar::handle:horizontal:hover {
  685. background: {{primaryColor}};
  686. }
  687. QScrollBar::add-line:vertical,
  688. QScrollBar::sub-line:vertical,
  689. QScrollBar::add-line:horizontal,
  690. QScrollBar::sub-line:horizontal {
  691. border: 0;
  692. background: transparent;
  693. width: 0px;
  694. height: 0px;
  695. }
  696. /* ------------------------------------------------------------------------ */
  697. /* QScrollBar-Big */
  698. QScrollBar.big:horizontal {
  699. border: 0;
  700. background: {{secondaryColor}};
  701. height: {{36|density(density_scale)}}px;
  702. }
  703. QScrollBar.big:vertical {
  704. border: 0;
  705. background: {{secondaryColor}};
  706. width: {{36|density(density_scale)}}px;
  707. }
  708. QScrollBar.big::handle,
  709. QScrollBar.big::handle:vertical:hover,
  710. QScrollBar.big::handle:horizontal:hover {
  711. background: {{primaryColor}};
  712. }
  713. QScrollBar.big::handle:horizontal {
  714. min-width: {{24|density(density_scale)}}px;
  715. }
  716. QScrollBar.big::handle:vertical {
  717. min-height: {{24|density(density_scale)}}px;
  718. }
  719. QScrollBar.big::add-line:vertical,
  720. QScrollBar.big::sub-line:vertical,
  721. QScrollBar.big::add-line:horizontal,
  722. QScrollBar.big::sub-line:horizontal {
  723. border: 0;
  724. background: transparent;
  725. width: 0px;
  726. height: 0px;
  727. }
  728. /* ------------------------------------------------------------------------ */
  729. /* QSlider */
  730. QSlider:horizontal {
  731. min-height: {{24|density(density_scale)}}px;
  732. max-height: {{24|density(density_scale)}}px;
  733. }
  734. QSlider:vertical {
  735. min-width: {{24|density(density_scale)}}px;
  736. max-width: {{24|density(density_scale)}}px;
  737. }
  738. QSlider::groove:horizontal {
  739. height: 4px;
  740. background: #393939;
  741. margin: 0 {{12|density(density_scale)}}px;
  742. }
  743. QSlider::groove:vertical {
  744. width: 4px;
  745. background: #393939;
  746. margin: {{12|density(density_scale)}}px 0;
  747. border-radius: {{24|density(density_scale)}}px;
  748. }
  749. QSlider::handle:horizontal {
  750. image: url(icon:/primary/slider.svg);
  751. width: {{24|density(density_scale)}}px;
  752. height: {{24|density(density_scale)}}px;
  753. margin: -{{24|density(density_scale)}}px -{{12|density(density_scale)}}px;
  754. }
  755. QSlider::handle:vertical {
  756. image: url(icon:/primary/slider.svg);
  757. border-radius: {{24|density(density_scale)}}px;
  758. width: {{24|density(density_scale)}}px;
  759. height: {{24|density(density_scale)}}px;
  760. margin: -{{12|density(density_scale)}}px -{{24|density(density_scale)}}px;
  761. }
  762. QSlider::add-page {
  763. background: {{secondaryColor}};
  764. }
  765. QSlider::sub-page {
  766. background: {{primaryColor}};
  767. }
  768. /* ------------------------------------------------------------------------ */
  769. /* QLabel */
  770. QLabel {
  771. border: none;
  772. background: transparent;
  773. color: {{secondaryTextColor}}
  774. }
  775. QLabel:disabled {
  776. color: {{secondaryTextColor|opacity(0.2)}}
  777. }
  778. /* ------------------------------------------------------------------------ */
  779. /* VLines and HLinex */
  780. QFrame[frameShape="4"] {
  781. border-width: 1px 0 0 0;
  782. background: none;
  783. }
  784. QFrame[frameShape="5"] {
  785. border-width: 0 1px 0 0;
  786. background: none;
  787. }
  788. QFrame[frameShape="4"],
  789. QFrame[frameShape="5"] {
  790. border-color: {{secondaryLightColor}};
  791. }
  792. /* ------------------------------------------------------------------------ */
  793. /* QToolBar */
  794. QToolBar {
  795. background: {{secondaryDarkColor}};
  796. border: 0px solid;
  797. }
  798. QToolBar:horizontal {
  799. border-bottom: 1px solid {{secondaryLightColor}};
  800. }
  801. QToolBar:vertical {
  802. border-right: 1px solid {{secondaryLightColor}};
  803. }
  804. QToolBar::handle:horizontal {
  805. image: url(icon:/primary/toolbar-handle-horizontal.svg);
  806. }
  807. QToolBar::handle:vertical {
  808. image: url(icon:/primary/toolbar-handle-vertical.svg);
  809. }
  810. QToolBar::separator:horizontal {
  811. border-right: 1px solid {{secondaryLightColor}};
  812. border-left: 1px solid {{secondaryLightColor}};
  813. width: 1px;
  814. }
  815. QToolBar::separator:vertical {
  816. border-top: 1px solid {{secondaryLightColor}};
  817. border-bottom: 1px solid {{secondaryLightColor}};
  818. height: 1px;
  819. }
  820. /* ------------------------------------------------------------------------ */
  821. /* QToolButton */
  822. QToolButton {
  823. background: {{secondaryDarkColor}};
  824. border: 0px;
  825. height: {{36|density(density_scale)}}px;
  826. margin: 3px;
  827. padding: 3px;
  828. border-right: 12px solid {{secondaryDarkColor}};
  829. border-left: 12px solid {{secondaryDarkColor}};
  830. }
  831. QToolButton:hover {
  832. background: {{secondaryLightColor}};
  833. border-right: 12px solid {{secondaryLightColor}};
  834. border-left: 12px solid {{secondaryLightColor}};
  835. }
  836. QToolButton:pressed {
  837. background: {{secondaryColor}};
  838. border-right: 12px solid {{secondaryColor}};
  839. border-left: 12px solid {{secondaryColor}};
  840. }
  841. QToolButton:checked {
  842. background: {{secondaryLightColor}};
  843. border-left: 12px solid {{secondaryLightColor}};
  844. border-right: 12px solid {{primaryColor}};
  845. }
  846. /* ------------------------------------------------------------------------ */
  847. /* General viewers */
  848. QTableView {
  849. background-color: {{secondaryDarkColor}};
  850. border: 1px solid {{secondaryColor}};
  851. border-radius: 4px;
  852. }
  853. QTreeView,
  854. QListView {
  855. border-radius: 4px;
  856. padding: 4px;
  857. margin: 0px;
  858. border: 0px;
  859. }
  860. QTableView::item,
  861. QTreeView::item,
  862. QListView::item {
  863. padding: 4px;
  864. min-height: {{32|density(density_scale)}}px;
  865. color: {{secondaryTextColor}};
  866. selection-color: {{secondaryTextColor}}; /* For Windows */
  867. border-color: transparent; /* Fix #34 */
  868. }
  869. /* ------------------------------------------------------------------------ */
  870. /* Items Selection */
  871. QTableView::item:selected,
  872. QTreeView::item:selected,
  873. QListView::item:selected {
  874. background-color: {{primaryColor|opacity(0.2)}};
  875. selection-background-color: {{primaryColor|opacity(0.2)}};
  876. color: {{secondaryTextColor}};
  877. selection-color: {{secondaryTextColor}}; /* For Windows */
  878. }
  879. QTableView::item:selected:focus,
  880. QTreeView::item:selected:focus,
  881. QListView::item:selected:focus {
  882. background-color: {{primaryColor}};
  883. selection-background-color: {{primaryColor}};
  884. color: {{primaryTextColor}};
  885. selection-color: {{primaryTextColor}}; /* For Windows */
  886. }
  887. QTableView {
  888. selection-background-color: {{primaryColor|opacity(0.2)}};
  889. }
  890. QTableView:focus {
  891. selection-background-color: {{primaryColor}};
  892. }
  893. QTableView::item:disabled {
  894. color: {{secondaryTextColor|opacity(0.3)}};
  895. selection-color: {{secondaryTextColor|opacity(0.3)}};
  896. background-color: {{secondaryColor}};
  897. selection-background-color: {{secondaryColor}};
  898. }
  899. /* ------------------------------------------------------------------------ */
  900. /* QTreeView */
  901. QTreeView::branch{
  902. background-color: {{secondaryColor}};
  903. }
  904. QTreeView::branch:closed:has-children:has-siblings,
  905. QTreeView::branch:closed:has-children:!has-siblings {
  906. image: url(icon:/primary/branch-closed.svg);
  907. }
  908. QTreeView::branch:open:has-children:!has-siblings,
  909. QTreeView::branch:open:has-children:has-siblings {
  910. image: url(icon:/primary/branch-open.svg);
  911. }
  912. QTreeView::branch:has-siblings:!adjoins-item {
  913. border-image: url(icon:/disabled/vline.svg) 0;
  914. }
  915. QTreeView::branch:has-siblings:adjoins-item {
  916. border-image: url(icon:/disabled/branch-more.svg) 0;
  917. }
  918. QTreeView::branch:!has-children:!has-siblings:adjoins-item,
  919. QTreeView::branch:has-children:!has-siblings:adjoins-item {
  920. border-image: url(icon:/disabled/branch-end.svg) 0;
  921. }
  922. QTreeView QHeaderView::section {
  923. border: none;
  924. }
  925. /* ------------------------------------------------------------------------ */
  926. /* Custom buttons */
  927. QPushButton.danger {
  928. border-color: {{danger}};
  929. color: {{danger}};
  930. }
  931. QPushButton.danger:checked,
  932. QPushButton.danger:pressed {
  933. color: {{secondaryDarkColor}};
  934. background-color: {{danger}};
  935. }
  936. QPushButton.warning{
  937. border-color: {{warning}};
  938. color: {{warning}};
  939. }
  940. QPushButton.warning:checked,
  941. QPushButton.warning:pressed {
  942. color: {{secondaryDarkColor}};
  943. background-color: {{warning}};
  944. }
  945. QPushButton.success {
  946. border-color: {{success}};
  947. color: {{success}};
  948. }
  949. QPushButton.success:checked,
  950. QPushButton.success:pressed {
  951. color: {{secondaryDarkColor}};
  952. background-color: {{success}};
  953. }
  954. QPushButton.danger:flat:hover {
  955. background-color: {{danger|opacity(0.2)}};
  956. }
  957. QPushButton.danger:flat:pressed,
  958. QPushButton.danger:flat:checked {
  959. background-color: {{danger|opacity(0.1)}};
  960. color: {{danger}};
  961. }
  962. QPushButton.warning:flat:hover {
  963. background-color: {{warning|opacity(0.2)}};
  964. }
  965. QPushButton.warning:flat:pressed,
  966. QPushButton.warning:flat:checked {
  967. background-color: {{warning|opacity(0.1)}};
  968. color: {{warning}};
  969. }
  970. QPushButton.success:flat:hover {
  971. background-color: {{success|opacity(0.2)}};
  972. }
  973. QPushButton.success:flat:pressed,
  974. QPushButton.success:flat:checked {
  975. background-color: {{success|opacity(0.1)}};
  976. color: {{success}};
  977. }
  978. /* ------------------------------------------------------------------------ */
  979. /* QTableView */
  980. QTableCornerButton::section {
  981. background-color: {{secondaryColor}};
  982. border-radius: 0px;
  983. border-right: 1px solid;
  984. border-bottom: 1px solid;
  985. border-color: {{secondaryDarkColor}};
  986. }
  987. QTableView {
  988. alternate-background-color: {{secondaryColor|opacity(0.7)}};
  989. }
  990. QHeaderView {
  991. border: none;
  992. }
  993. QHeaderView::section {
  994. color: {{secondaryTextColor|opacity(0.7)}};
  995. text-transform: uppercase;
  996. background-color: {{secondaryColor}};
  997. padding: 0 {{24|density(density_scale)}}px;
  998. height: {{36|density(density_scale)}}px;
  999. border-radius: 0px;
  1000. border-right: 1px solid;
  1001. border-bottom: 1px solid;
  1002. border-color: {{secondaryDarkColor}};
  1003. }
  1004. QHeaderView::section:vertical {
  1005. }
  1006. QHeaderView::section:horizontal {
  1007. }
  1008. /* ------------------------------------------------------------------------ */
  1009. /* QLCDNumber */
  1010. QLCDNumber {
  1011. color: {{primaryColor}};
  1012. background-color:{{primaryColor|opacity(0.1)}};
  1013. border: 1px solid {{primaryColor|opacity(0.3)}};
  1014. border-radius: 4px;
  1015. }
  1016. /* ------------------------------------------------------------------------ */
  1017. /* QCalendarWidget */
  1018. #qt_calendar_prevmonth {
  1019. qproperty-icon: url(icon:/primary/leftarrow.svg);
  1020. }
  1021. #qt_calendar_nextmonth {
  1022. qproperty-icon: url(icon:/primary/rightarrow.svg);
  1023. }
  1024. /* ------------------------------------------------------------------------ */
  1025. /* Inline QLineEdit */
  1026. QTreeView QLineEdit,
  1027. QTableView QLineEdit,
  1028. QListView QLineEdit {
  1029. color: {{secondaryTextColor}};
  1030. background-color: {{secondaryColor}};
  1031. border: 1px solid unset;
  1032. border-radius: unset;
  1033. padding: unset;
  1034. padding-left: unset;
  1035. height: unset;
  1036. border-width: unset;
  1037. border-top-left-radius: unset;
  1038. border-top-right-radius: unset;
  1039. }
  1040. /* ------------------------------------------------------------------------ */
  1041. /* QToolTip */
  1042. QToolTip {
  1043. padding: 4px;
  1044. border: 1px solid {{secondaryDarkColor}};
  1045. border-radius: 4px;
  1046. color: {{secondaryTextColor}};
  1047. background-color: {{secondaryLightColor}};
  1048. }
  1049. /* ------------------------------------------------------------------------ */
  1050. /* QDialog */
  1051. {% if linux %}
  1052. /* linux */
  1053. QDialog QToolButton,
  1054. QDialog QToolButton:hover,
  1055. QDialog QToolButton:pressed,
  1056. QDialog QToolButton:checked {
  1057. border: 0px;
  1058. height: unset;
  1059. margin: unset;
  1060. padding: unset;
  1061. border-right: unset;
  1062. border-left: unset;
  1063. background-color: {{primaryColor}};
  1064. color: {{secondaryTextColor}};
  1065. border-radius: 4px;
  1066. }
  1067. {% endif%}
  1068. QDialog QToolButton:disabled {
  1069. background-color: {{secondaryColor}};
  1070. color: {{secondaryTextColor}}
  1071. }
  1072. /* ------------------------------------------------------------------------ */
  1073. /* Grips */
  1074. QMainWindow::separator:vertical,
  1075. QSplitter::handle:horizontal {
  1076. image: url(icon:/primary/splitter-horizontal.svg);
  1077. }
  1078. QMainWindow::separator:horizontal,
  1079. QSplitter::handle:vertical {
  1080. image: url(icon:/primary/splitter-vertical.svg);
  1081. }
  1082. QSizeGrip {
  1083. image: url(icon:/primary/sizegrip.svg);
  1084. background-color: transparent;
  1085. }
  1086. QMenuBar QToolButton:hover,
  1087. QMenuBar QToolButton:pressed,
  1088. QMenuBar QToolButton {
  1089. border-width: 0;
  1090. border-left: 10px;
  1091. border-image: url(icon:/primary/rightarrow2.svg);
  1092. background-color: transparent;
  1093. }