Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

633 lines
22KB

  1. /*
  2. * PatchBay Canvas Themes
  3. * Copyright (C) 2010-2019 Filipe Coelho <falktx@falktx.com>
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU General Public License as
  7. * published by the Free Software Foundation; either version 2 of
  8. * the License, or any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * For a full copy of the GNU General Public License see the doc/GPL.txt file.
  16. */
  17. #include "theme.hpp"
  18. //---------------------------------------------------------------------------------------------------------------------
  19. // Imports (Global)
  20. #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
  21. # pragma GCC diagnostic push
  22. # pragma GCC diagnostic ignored "-Wconversion"
  23. # pragma GCC diagnostic ignored "-Weffc++"
  24. # pragma GCC diagnostic ignored "-Wsign-conversion"
  25. #endif
  26. #include <QtGui/QColor>
  27. #include <QtGui/QFont>
  28. #include <QtGui/QPen>
  29. #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
  30. # pragma GCC diagnostic pop
  31. #endif
  32. //---------------------------------------------------------------------------------------------------------------------
  33. struct Theme::PrivateData {
  34. const Theme::List idx;
  35. // Canvas
  36. QColor canvas_bg;
  37. // Boxes
  38. QPen box_pen;
  39. QPen box_pen_sel;
  40. QColor box_bg_1;
  41. QColor box_bg_2;
  42. QColor box_shadow;
  43. // box_header_pixmap
  44. int box_header_height;
  45. int box_header_spacing;
  46. QPen box_text;
  47. QPen box_text_sel;
  48. int box_text_ypos;
  49. QString box_font_name;
  50. int box_font_size;
  51. QFont::Weight box_font_state;
  52. BackgroundType box_bg_type;
  53. bool box_use_icon;
  54. // Ports
  55. QPen port_text;
  56. int port_text_ypos;
  57. // port_bg_pixmap = None;
  58. QString port_font_name;
  59. int port_font_size;
  60. QFont::Weight port_font_state;
  61. PortType port_mode;
  62. QPen port_audio_jack_pen;
  63. QPen port_audio_jack_pen_sel;
  64. QPen port_midi_jack_pen;
  65. QPen port_midi_jack_pen_sel;
  66. QPen port_midi_alsa_pen;
  67. QPen port_midi_alsa_pen_sel;
  68. QPen port_parameter_pen;
  69. QPen port_parameter_pen_sel;
  70. QColor port_audio_jack_bg;
  71. QColor port_audio_jack_bg_sel;
  72. QColor port_midi_jack_bg;
  73. QColor port_midi_jack_bg_sel;
  74. QColor port_midi_alsa_bg;
  75. QColor port_midi_alsa_bg_sel;
  76. QColor port_parameter_bg;
  77. QColor port_parameter_bg_sel;
  78. QColor port_audio_jack_text;
  79. QColor port_audio_jack_text_sel;
  80. QColor port_midi_jack_text;
  81. QColor port_midi_jack_text_sel;
  82. QColor port_midi_alsa_text;
  83. QColor port_midi_alsa_text_sel;
  84. QColor port_parameter_text;
  85. QColor port_parameter_text_sel;
  86. int port_height;
  87. int port_offset;
  88. int port_spacing;
  89. int port_spacingT;
  90. // Lines
  91. QColor line_audio_jack;
  92. QColor line_audio_jack_sel;
  93. QColor line_audio_jack_glow;
  94. QColor line_midi_jack;
  95. QColor line_midi_jack_sel;
  96. QColor line_midi_jack_glow;
  97. QColor line_midi_alsa;
  98. QColor line_midi_alsa_sel;
  99. QColor line_midi_alsa_glow;
  100. QColor line_parameter;
  101. QColor line_parameter_sel;
  102. QColor line_parameter_glow;
  103. QPen rubberband_pen;
  104. QColor rubberband_brush;
  105. //-----------------------------------------------------------------------------------------------------------------
  106. PrivateData(const Theme::List id)
  107. : idx(id),
  108. canvas_bg(),
  109. box_pen(),
  110. box_pen_sel(),
  111. box_bg_1(),
  112. box_bg_2(),
  113. box_shadow(),
  114. box_header_height(),
  115. box_header_spacing(),
  116. box_text(),
  117. box_text_sel(),
  118. box_text_ypos(),
  119. box_font_name(),
  120. box_font_size(),
  121. box_font_state(),
  122. box_bg_type(),
  123. box_use_icon(),
  124. port_text(),
  125. port_text_ypos(),
  126. port_font_name(),
  127. port_font_size(),
  128. port_font_state(),
  129. port_mode(),
  130. port_audio_jack_pen(),
  131. port_audio_jack_pen_sel(),
  132. port_midi_jack_pen(),
  133. port_midi_jack_pen_sel(),
  134. port_midi_alsa_pen(),
  135. port_midi_alsa_pen_sel(),
  136. port_parameter_pen(),
  137. port_parameter_pen_sel(),
  138. port_audio_jack_bg(),
  139. port_audio_jack_bg_sel(),
  140. port_midi_jack_bg(),
  141. port_midi_jack_bg_sel(),
  142. port_midi_alsa_bg(),
  143. port_midi_alsa_bg_sel(),
  144. port_parameter_bg(),
  145. port_parameter_bg_sel(),
  146. port_audio_jack_text(),
  147. port_audio_jack_text_sel(),
  148. port_midi_jack_text(),
  149. port_midi_jack_text_sel(),
  150. port_midi_alsa_text(),
  151. port_midi_alsa_text_sel(),
  152. port_parameter_text(),
  153. port_parameter_text_sel(),
  154. port_height(),
  155. port_offset(),
  156. port_spacing(),
  157. port_spacingT(),
  158. line_audio_jack(),
  159. line_audio_jack_sel(),
  160. line_audio_jack_glow(),
  161. line_midi_jack(),
  162. line_midi_jack_sel(),
  163. line_midi_jack_glow(),
  164. line_midi_alsa(),
  165. line_midi_alsa_sel(),
  166. line_midi_alsa_glow(),
  167. line_parameter(),
  168. line_parameter_sel(),
  169. line_parameter_glow(),
  170. rubberband_pen(),
  171. rubberband_brush()
  172. {
  173. switch (idx)
  174. {
  175. case THEME_MODERN_DARK:
  176. // Canvas
  177. canvas_bg = QColor(0, 0, 0);
  178. // Boxes
  179. box_pen = QPen(QColor(76, 77, 78), 1, Qt::SolidLine);
  180. box_pen_sel = QPen(QColor(206, 207, 208), 1, Qt::DashLine);
  181. box_bg_1 = QColor(32, 34, 35);
  182. box_bg_2 = QColor(43, 47, 48);
  183. box_shadow = QColor(89, 89, 89, 180);
  184. // box_header_pixmap = None;
  185. box_header_height = 24;
  186. box_header_spacing = 0;
  187. box_text = QPen(QColor(240, 240, 240), 0);
  188. box_text_sel = box_text;
  189. box_text_ypos = 16;
  190. box_font_name = "Deja Vu Sans";
  191. box_font_size = 11;
  192. box_font_state = QFont::Bold;
  193. box_bg_type = THEME_BG_GRADIENT;
  194. box_use_icon = true;
  195. // Ports
  196. port_text = QPen(QColor(250, 250, 250), 0);
  197. port_text_ypos = 12;
  198. // port_bg_pixmap = None;
  199. port_font_name = "Deja Vu Sans";
  200. port_font_size = 11;
  201. port_font_state = QFont::Normal;
  202. port_mode = THEME_PORT_POLYGON;
  203. port_audio_jack_pen = QPen(QColor(63, 90, 126), 1);
  204. port_audio_jack_pen_sel = QPen(QColor(63 + 30, 90 + 30, 126 + 30), 1);
  205. port_midi_jack_pen = QPen(QColor(159, 44, 42), 1);
  206. port_midi_jack_pen_sel = QPen(QColor(159 + 30, 44 + 30, 42 + 30), 1);
  207. port_midi_alsa_pen = QPen(QColor(93, 141, 46), 1);
  208. port_midi_alsa_pen_sel = QPen(QColor(93 + 30, 141 + 30, 46 + 30), 1);
  209. port_parameter_pen = QPen(QColor(137, 76, 43), 1);
  210. port_parameter_pen_sel = QPen(QColor(137 + 30, 76 + 30, 43 + 30), 1);
  211. port_audio_jack_bg = QColor(35, 61, 99);
  212. port_audio_jack_bg_sel = QColor(35 + 50, 61 + 50, 99 + 50);
  213. port_midi_jack_bg = QColor(120, 15, 16);
  214. port_midi_jack_bg_sel = QColor(120 + 50, 15 + 50, 16 + 50);
  215. port_midi_alsa_bg = QColor(64, 112, 18);
  216. port_midi_alsa_bg_sel = QColor(64 + 50, 112 + 50, 18 + 50);
  217. port_parameter_bg = QColor(101, 47, 16);
  218. port_parameter_bg_sel = QColor(101 + 50, 47 + 50, 16 + 50);
  219. /*
  220. port_audio_jack_text = port_text;
  221. port_audio_jack_text_sel = port_text;
  222. port_midi_jack_text = port_text;
  223. port_midi_jack_text_sel = port_text;
  224. port_midi_alsa_text = port_text;
  225. port_midi_alsa_text_sel = port_text;
  226. port_parameter_text = port_text;
  227. port_parameter_text_sel = port_text;
  228. */
  229. port_height = 16;
  230. port_offset = 0;
  231. port_spacing = 2;
  232. port_spacingT = 2;
  233. // Lines
  234. line_audio_jack = QColor(63, 90, 126);
  235. line_audio_jack_sel = QColor(63 + 90, 90 + 90, 126 + 90);
  236. line_audio_jack_glow = QColor(100, 100, 200);
  237. line_midi_jack = QColor(159, 44, 42);
  238. line_midi_jack_sel = QColor(159 + 90, 44 + 90, 42 + 90);
  239. line_midi_jack_glow = QColor(200, 100, 100);
  240. line_midi_alsa = QColor(93, 141, 46);
  241. line_midi_alsa_sel = QColor(93 + 90, 141 + 90, 46 + 90);
  242. line_midi_alsa_glow = QColor(100, 200, 100);
  243. line_parameter = QColor(137, 76, 43);
  244. line_parameter_sel = QColor(137 + 90, 76 + 90, 43 + 90);
  245. line_parameter_glow = QColor(166, 133, 133);
  246. rubberband_pen = QPen(QColor(206, 207, 208), 1, Qt::SolidLine);
  247. rubberband_brush = QColor(76, 77, 78, 100);
  248. break;
  249. #if 0
  250. elif idx == THEME_MODERN_DARK_TINY:
  251. # Canvas
  252. canvas_bg = QColor(0, 0, 0)
  253. # Boxes
  254. box_pen = QPen(QColor(76, 77, 78), 1, Qt::SolidLine)
  255. box_pen_sel = QPen(QColor(206, 207, 208), 1, Qt::DashLine)
  256. box_bg_1 = QColor(32, 34, 35)
  257. box_bg_2 = QColor(43, 47, 48)
  258. box_shadow = QColor(89, 89, 89, 180)
  259. box_header_pixmap = None
  260. box_header_height = 14
  261. box_header_spacing = 0
  262. box_text = QPen(QColor(240, 240, 240), 0)
  263. box_text_sel = ox_text
  264. box_text_ypos = 10
  265. box_font_name = "Deja Vu Sans"
  266. box_font_size = 10
  267. box_font_state = QFont::Bold
  268. box_bg_type = THEME_BG_GRADIENT
  269. box_use_icon = false
  270. # Ports
  271. port_text = QPen(QColor(250, 250, 250), 0)
  272. port_text_ypos = 9
  273. port_bg_pixmap = None
  274. port_font_name = "Deja Vu Sans"
  275. port_font_size = 9
  276. port_font_state = QFont::Normal
  277. port_mode = THEME_PORT_POLYGON
  278. port_audio_jack_pen = QPen(QColor(63, 90, 126), 1)
  279. port_audio_jack_pen_sel = QPen(QColor(63 + 30, 90 + 30, 126 + 30), 1)
  280. port_midi_jack_pen = QPen(QColor(159, 44, 42), 1)
  281. port_midi_jack_pen_sel = QPen(QColor(159 + 30, 44 + 30, 42 + 30), 1)
  282. port_midi_alsa_pen = QPen(QColor(93, 141, 46), 1)
  283. port_midi_alsa_pen_sel = QPen(QColor(93 + 30, 141 + 30, 46 + 30), 1)
  284. port_parameter_pen = QPen(QColor(137, 76, 43), 1)
  285. port_parameter_pen_sel = QPen(QColor(137 + 30, 76 + 30, 43 + 30), 1)
  286. port_audio_jack_bg = QColor(35, 61, 99)
  287. port_audio_jack_bg_sel = QColor(35 + 50, 61 + 50, 99 + 50)
  288. port_midi_jack_bg = QColor(120, 15, 16)
  289. port_midi_jack_bg_sel = QColor(120 + 50, 15 + 50, 16 + 50)
  290. port_midi_alsa_bg = QColor(64, 112, 18)
  291. port_midi_alsa_bg_sel = QColor(64 + 50, 112 + 50, 18 + 50)
  292. port_parameter_bg = QColor(101, 47, 16)
  293. port_parameter_bg_sel = QColor(101 + 50, 47 + 50, 16 + 50)
  294. port_audio_jack_text = port_text
  295. port_audio_jack_text_sel = port_text
  296. port_midi_jack_text = port_text
  297. port_midi_jack_text_sel = port_text
  298. port_midi_alsa_text = port_text
  299. port_midi_alsa_text_sel = port_text
  300. port_parameter_text = port_text
  301. port_parameter_text_sel = port_text
  302. port_height = 12
  303. port_offset = 0
  304. port_spacing = 1
  305. port_spacingT = 1
  306. # Lines
  307. line_audio_jack = QColor(63, 90, 126)
  308. line_audio_jack_sel = QColor(63 + 90, 90 + 90, 126 + 90)
  309. line_audio_jack_glow = QColor(100, 100, 200)
  310. line_midi_jack = QColor(159, 44, 42)
  311. line_midi_jack_sel = QColor(159 + 90, 44 + 90, 42 + 90)
  312. line_midi_jack_glow = QColor(200, 100, 100)
  313. line_midi_alsa = QColor(93, 141, 46)
  314. line_midi_alsa_sel = QColor(93 + 90, 141 + 90, 46 + 90)
  315. line_midi_alsa_glow = QColor(100, 200, 100)
  316. line_parameter = QColor(137, 76, 43)
  317. line_parameter_sel = QColor(137 + 90, 76 + 90, 43 + 90)
  318. line_parameter_glow = QColor(166, 133, 133)
  319. rubberband_pen = QPen(QColor(206, 207, 208), 1, Qt::SolidLine)
  320. rubberband_brush = QColor(76, 77, 78, 100)
  321. elif idx == THEME_MODERN_LIGHT:
  322. # Canvas
  323. canvas_bg = QColor(248, 249, 250)
  324. # Boxes
  325. box_pen = QPen(QColor(176, 177, 178), 1, Qt::SolidLine)
  326. box_pen_sel = QPen(QColor(1, 2, 3), 2, Qt::DashLine)
  327. box_bg_1 = QColor(250, 250, 250)
  328. box_bg_2 = QColor(200, 200, 200)
  329. box_shadow = QColor(1, 1, 1, 100)
  330. box_header_pixmap = None
  331. box_header_height = 24
  332. box_header_spacing = 0
  333. box_text = QPen(QColor(1, 1, 1), 0)
  334. box_text_sel = ox_text
  335. box_text_ypos = 16
  336. box_font_name = "Ubuntu"
  337. box_font_size = 11
  338. box_font_state = QFont::Bold
  339. box_bg_type = THEME_BG_GRADIENT
  340. box_use_icon = True
  341. # Ports
  342. port_text = QPen(QColor(255, 255, 255), 1)
  343. port_text_ypos = 12
  344. port_bg_pixmap = None
  345. port_font_name = "Ubuntu"
  346. port_font_size = 11
  347. port_font_state = QFont::Bold
  348. port_mode = THEME_PORT_POLYGON
  349. port_audio_jack_pen = QPen(QColor(103, 130, 166), 2)
  350. port_audio_jack_pen_sel = QPen(QColor(103 + 136, 190 + 130, 226 + 130), 1)
  351. port_midi_jack_pen = QPen(QColor(159, 44, 42), 1)
  352. port_midi_jack_pen_sel = QPen(QColor(90 + 30, 44 + 30, 42 + 30), 1)
  353. port_midi_alsa_pen = QPen(QColor(93, 141, 46), 1)
  354. port_midi_alsa_pen_sel = QPen(QColor(93 + 30, 141 + 30, 46 + 30), 1)
  355. port_parameter_pen = QPen(QColor(137, 76, 43), 1)
  356. port_parameter_pen_sel = QPen(QColor(137 + 30, 76 + 30, 43 + 30), 1)
  357. port_audio_jack_bg = QColor(0, 0, 180)
  358. port_audio_jack_bg_sel = QColor(135 + 150, 161 + 150, 199 + 150)
  359. port_midi_jack_bg = QColor(130, 15, 16)
  360. port_midi_jack_bg_sel = QColor(90 + 30, 15 + 50, 16 + 50)
  361. port_midi_alsa_bg = QColor(64, 112, 18)
  362. port_midi_alsa_bg_sel = QColor(64 + 50, 112 + 50, 18 + 50)
  363. port_parameter_bg = QColor(101, 47, 16)
  364. port_parameter_bg_sel = QColor(101 + 50, 47 + 50, 16 + 50)
  365. port_audio_jack_text = port_text
  366. port_audio_jack_text_sel = port_text
  367. port_midi_jack_text = port_text
  368. port_midi_jack_text_sel = port_text
  369. port_midi_alsa_text = port_text
  370. port_midi_alsa_text_sel = port_text
  371. port_parameter_text = port_text
  372. port_parameter_text_sel = port_text
  373. port_height = 16
  374. port_offset = 0
  375. port_spacing = 2
  376. port_spacingT = 2
  377. # Lines
  378. line_audio_jack = QColor(63, 90, 126)
  379. line_audio_jack_sel = QColor(63 + 63, 90 + 90, 126 + 90)
  380. line_audio_jack_glow = QColor(100, 100, 200)
  381. line_midi_jack = QColor(159, 44, 42)
  382. line_midi_jack_sel = QColor(159 + 44, 44 + 90, 42 + 90)
  383. line_midi_jack_glow = QColor(200, 100, 100)
  384. line_midi_alsa = QColor(93, 141, 46)
  385. line_midi_alsa_sel = QColor(93 + 90, 141 + 90, 46 + 90)
  386. line_midi_alsa_glow = QColor(100, 200, 100)
  387. line_parameter = QColor(137, 43, 43)
  388. line_parameter_sel = QColor(137 + 90, 76 + 90, 43 + 90)
  389. line_parameter_glow = QColor(166, 133, 133)
  390. rubberband_pen = QPen(QColor(206, 207, 208), 1, Qt::SolidLine)
  391. rubberband_brush = QColor(76, 77, 78, 100)
  392. elif idx == THEME_CLASSIC_DARK:
  393. # Canvas
  394. canvas_bg = QColor(0, 0, 0)
  395. # Boxes
  396. box_pen = QPen(QColor(147 - 70, 151 - 70, 143 - 70), 2, Qt::SolidLine)
  397. box_pen_sel = QPen(QColor(147, 151, 143), 2, Qt::DashLine)
  398. box_bg_1 = QColor(30, 34, 36)
  399. box_bg_2 = QColor(30, 34, 36)
  400. box_shadow = QColor(89, 89, 89, 180)
  401. box_header_pixmap = None
  402. box_header_height = 19
  403. box_header_spacing = 0
  404. box_text = QPen(QColor(255, 255, 255), 0)
  405. box_text_sel = ox_text
  406. box_text_ypos = 12
  407. box_font_name = "Sans"
  408. box_font_size = 12
  409. box_font_state = QFont::Normal
  410. box_bg_type = THEME_BG_GRADIENT
  411. box_use_icon = false
  412. # Ports
  413. port_text = QPen(QColor(250, 250, 250), 0)
  414. port_text_ypos = 11
  415. port_bg_pixmap = None
  416. port_font_name = "Sans"
  417. port_font_size = 11
  418. port_font_state = QFont::Normal
  419. port_mode = THEME_PORT_SQUARE
  420. port_audio_jack_pen = QPen(QColor(35, 61, 99), Qt::NoPen, 0)
  421. port_audio_jack_pen_sel = QPen(QColor(255, 0, 0), Qt::NoPen, 0)
  422. port_midi_jack_pen = QPen(QColor(120, 15, 16), Qt::NoPen, 0)
  423. port_midi_jack_pen_sel = QPen(QColor(255, 0, 0), Qt::NoPen, 0)
  424. port_midi_alsa_pen = QPen(QColor(63, 112, 19), Qt::NoPen, 0)
  425. port_midi_alsa_pen_sel = QPen(QColor(255, 0, 0), Qt::NoPen, 0)
  426. port_parameter_pen = QPen(QColor(101, 47, 17), Qt::NoPen, 0)
  427. port_parameter_pen_sel = QPen(QColor(255, 0, 0), Qt::NoPen, 0)
  428. port_audio_jack_bg = QColor(35, 61, 99)
  429. port_audio_jack_bg_sel = QColor(255, 0, 0)
  430. port_midi_jack_bg = QColor(120, 15, 16)
  431. port_midi_jack_bg_sel = QColor(255, 0, 0)
  432. port_midi_alsa_bg = QColor(63, 112, 19)
  433. port_midi_alsa_bg_sel = QColor(255, 0, 0)
  434. port_parameter_bg = QColor(101, 47, 17)
  435. port_parameter_bg_sel = QColor(255, 0, 0)
  436. port_audio_jack_text = port_text
  437. port_audio_jack_text_sel = port_text
  438. port_midi_jack_text = port_text
  439. port_midi_jack_text_sel = port_text
  440. port_midi_alsa_text = port_text
  441. port_midi_alsa_text_sel = port_text
  442. port_parameter_text = port_text
  443. port_parameter_text_sel = port_text
  444. port_height = 14
  445. port_offset = 0
  446. port_spacing = 1
  447. port_spacingT = 0
  448. # Lines
  449. line_audio_jack = QColor(53, 78, 116)
  450. line_audio_jack_sel = QColor(255, 0, 0)
  451. line_audio_jack_glow = QColor(255, 0, 0)
  452. line_midi_jack = QColor(139, 32, 32)
  453. line_midi_jack_sel = QColor(255, 0, 0)
  454. line_midi_jack_glow = QColor(255, 0, 0)
  455. line_midi_alsa = QColor(81, 130, 36)
  456. line_midi_alsa_sel = QColor(255, 0, 0)
  457. line_midi_alsa_glow = QColor(255, 0, 0)
  458. line_parameter = QColor(120, 65, 33)
  459. line_parameter_sel = QColor(255, 0, 0)
  460. line_parameter_glow = QColor(255, 0, 0)
  461. rubberband_pen = QPen(QColor(147, 151, 143), 2, Qt::SolidLine)
  462. rubberband_brush = QColor(35, 61, 99, 100)
  463. elif idx == THEME_OOSTUDIO:
  464. # Canvas
  465. canvas_bg = QColor(11, 11, 11)
  466. # Boxes
  467. box_pen = QPen(QColor(76, 77, 78), 1, Qt::SolidLine)
  468. box_pen_sel = QPen(QColor(189, 122, 214), 1, Qt::DashLine)
  469. box_bg_1 = QColor(46, 46, 46)
  470. box_bg_2 = QColor(23, 23, 23)
  471. box_shadow = QColor(89, 89, 89, 180)
  472. box_header_pixmap = QPixmap(":/bitmaps/canvas/frame_node_header.png")
  473. box_header_height = 22
  474. box_header_spacing = 6
  475. box_text = QPen(QColor(144, 144, 144), 0)
  476. box_text_sel = QPen(QColor(189, 122, 214), 0)
  477. box_text_ypos = 16
  478. box_font_name = "Deja Vu Sans"
  479. box_font_size = 11
  480. box_font_state = QFont::Bold
  481. box_bg_type = THEME_BG_SOLID
  482. box_use_icon = false
  483. # Ports
  484. normalPortBG = QColor(46, 46, 46)
  485. selPortBG = QColor(23, 23, 23)
  486. port_text = QPen(QColor(155, 155, 155), 0)
  487. port_text_ypos = 14
  488. port_bg_pixmap = QPixmap(":/bitmaps/canvas/frame_port_bg.png")
  489. port_font_name = "Deja Vu Sans"
  490. port_font_size = 11
  491. port_font_state = QFont::Normal
  492. port_mode = THEME_PORT_SQUARE
  493. port_audio_jack_pen = QPen(selPortBG, 2)
  494. port_audio_jack_pen_sel = QPen(QColor(1, 230, 238), 1)
  495. port_midi_jack_pen = QPen(selPortBG, 2)
  496. port_midi_jack_pen_sel = QPen(QColor(252, 118, 118), 1)
  497. port_midi_alsa_pen = QPen(selPortBG, 2)
  498. port_midi_alsa_pen_sel = QPen(QColor(129, 244, 118), 0)
  499. port_parameter_pen = QPen(selPortBG, 2)
  500. port_parameter_pen_sel = QPen(QColor(137, 76, 43), 1)
  501. port_audio_jack_bg = normalPortBG
  502. port_audio_jack_bg_sel = selPortBG
  503. port_midi_jack_bg = normalPortBG
  504. port_midi_jack_bg_sel = selPortBG
  505. port_midi_alsa_bg = normalPortBG
  506. port_midi_alsa_bg_sel = selPortBG
  507. port_parameter_bg = normalPortBG
  508. port_parameter_bg_sel = selPortBG
  509. port_audio_jack_text = port_text
  510. port_audio_jack_text_sel = port_audio_jack_pen_sel
  511. port_midi_jack_text = port_text
  512. port_midi_jack_text_sel = port_midi_jack_pen_sel
  513. port_midi_alsa_text = port_text
  514. port_midi_alsa_text_sel = port_midi_alsa_pen_sel
  515. port_parameter_text = port_text
  516. port_parameter_text_sel = port_parameter_pen_sel
  517. # missing, ports 2
  518. port_height = 21
  519. port_offset = 1
  520. port_spacing = 3
  521. port_spacingT = 0
  522. # Lines
  523. line_audio_jack = QColor(64, 64, 64)
  524. line_audio_jack_sel = QColor(1, 230, 238)
  525. line_audio_jack_glow = QColor(100, 200, 100)
  526. line_midi_jack = QColor(64, 64, 64)
  527. line_midi_jack_sel = QColor(252, 118, 118)
  528. line_midi_jack_glow = QColor(200, 100, 100)
  529. line_midi_alsa = QColor(64, 64, 64)
  530. line_midi_alsa_sel = QColor(129, 244, 118)
  531. line_midi_alsa_glow = QColor(100, 200, 100)
  532. line_parameter = QColor(64, 64, 64)
  533. line_parameter_sel = QColor(137+90, 76+90, 43+90)
  534. line_parameter_glow = QColor(166, 133, 133)
  535. rubberband_pen = QPen(QColor(1, 230, 238), 2, Qt::SolidLine)
  536. rubberband_brush = QColor(90, 90, 90, 100)
  537. #endif
  538. default:
  539. break;
  540. }
  541. }
  542. CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(PrivateData)
  543. };
  544. //---------------------------------------------------------------------------------------------------------------------
  545. Theme::Theme(const Theme::List idx)
  546. : self(new PrivateData(idx)) {}
  547. Theme::~Theme()
  548. {
  549. delete self;
  550. }
  551. //---------------------------------------------------------------------------------------------------------------------