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.

theme.py 21KB

11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484
  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. # PatchBay Canvas Themes
  4. # Copyright (C) 2010-2019 Filipe Coelho <falktx@falktx.com>
  5. #
  6. # This program is free software; you can redistribute it and/or
  7. # modify it under the terms of the GNU General Public License as
  8. # published by the Free Software Foundation; either version 2 of
  9. # the License, or any later version.
  10. #
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU General Public License for more details.
  15. #
  16. # For a full copy of the GNU General Public License see the doc/GPL.txt file.
  17. # ------------------------------------------------------------------------------------------------------------
  18. # Imports (Global)
  19. from PyQt5.QtCore import Qt
  20. from PyQt5.QtGui import QColor, QFont, QPen, QPixmap
  21. # ------------------------------------------------------------------------------------------------------------
  22. class Theme(object):
  23. # enum PortType
  24. THEME_PORT_SQUARE = 0
  25. THEME_PORT_POLYGON = 1
  26. # enum List
  27. THEME_MODERN_DARK = 0
  28. THEME_MODERN_DARK_TINY = 1
  29. THEME_MODERN_LIGHT = 2
  30. THEME_CLASSIC_DARK = 3
  31. THEME_OOSTUDIO = 4
  32. THEME_MAX = 5
  33. # enum BackgroundType
  34. THEME_BG_SOLID = 0
  35. THEME_BG_GRADIENT = 1
  36. def __init__(self, idx):
  37. object.__init__(self)
  38. self.idx = idx
  39. if idx == self.THEME_MODERN_DARK:
  40. # Canvas
  41. self.canvas_bg = QColor(0, 0, 0)
  42. # Boxes
  43. self.box_pen = QPen(QColor(76, 77, 78), 1, Qt.SolidLine)
  44. self.box_pen_sel = QPen(QColor(206, 207, 208), 1, Qt.DashLine)
  45. self.box_bg_1 = QColor(32, 34, 35)
  46. self.box_bg_2 = QColor(43, 47, 48)
  47. self.box_shadow = QColor(89, 89, 89, 180)
  48. self.box_header_pixmap = None
  49. self.box_header_height = 24
  50. self.box_header_spacing = 0
  51. self.box_text = QPen(QColor(240, 240, 240), 0)
  52. self.box_text_sel = self.box_text
  53. self.box_text_ypos = 16
  54. self.box_font_name = "Deja Vu Sans"
  55. self.box_font_size = 11
  56. self.box_font_state = QFont.Bold
  57. self.box_bg_type = self.THEME_BG_GRADIENT
  58. self.box_use_icon = True
  59. # Ports
  60. self.port_text = QPen(QColor(250, 250, 250), 0)
  61. self.port_text_ypos = 12
  62. self.port_bg_pixmap = None
  63. self.port_font_name = "Deja Vu Sans"
  64. self.port_font_size = 11
  65. self.port_font_state = QFont.Normal
  66. self.port_mode = self.THEME_PORT_POLYGON
  67. self.port_audio_jack_pen = QPen(QColor(63, 90, 126), 1)
  68. self.port_audio_jack_pen_sel = QPen(QColor(63 + 30, 90 + 30, 126 + 30), 1)
  69. self.port_midi_jack_pen = QPen(QColor(159, 44, 42), 1)
  70. self.port_midi_jack_pen_sel = QPen(QColor(159 + 30, 44 + 30, 42 + 30), 1)
  71. self.port_midi_alsa_pen = QPen(QColor(93, 141, 46), 1)
  72. self.port_midi_alsa_pen_sel = QPen(QColor(93 + 30, 141 + 30, 46 + 30), 1)
  73. self.port_parameter_pen = QPen(QColor(137, 76, 43), 1)
  74. self.port_parameter_pen_sel = QPen(QColor(137 + 30, 76 + 30, 43 + 30), 1)
  75. self.port_audio_jack_bg = QColor(35, 61, 99)
  76. self.port_audio_jack_bg_sel = QColor(35 + 50, 61 + 50, 99 + 50)
  77. self.port_midi_jack_bg = QColor(120, 15, 16)
  78. self.port_midi_jack_bg_sel = QColor(120 + 50, 15 + 50, 16 + 50)
  79. self.port_midi_alsa_bg = QColor(64, 112, 18)
  80. self.port_midi_alsa_bg_sel = QColor(64 + 50, 112 + 50, 18 + 50)
  81. self.port_parameter_bg = QColor(101, 47, 16)
  82. self.port_parameter_bg_sel = QColor(101 + 50, 47 + 50, 16 + 50)
  83. self.port_audio_jack_text = self.port_text
  84. self.port_audio_jack_text_sel = self.port_text
  85. self.port_midi_jack_text = self.port_text
  86. self.port_midi_jack_text_sel = self.port_text
  87. self.port_midi_alsa_text = self.port_text
  88. self.port_midi_alsa_text_sel = self.port_text
  89. self.port_parameter_text = self.port_text
  90. self.port_parameter_text_sel = self.port_text
  91. self.port_height = 16
  92. self.port_offset = 0
  93. self.port_spacing = 2
  94. self.port_spacingT = 2
  95. # Lines
  96. self.line_audio_jack = QColor(63, 90, 126)
  97. self.line_audio_jack_sel = QColor(63 + 90, 90 + 90, 126 + 90)
  98. self.line_audio_jack_glow = QColor(100, 100, 200)
  99. self.line_midi_jack = QColor(159, 44, 42)
  100. self.line_midi_jack_sel = QColor(159 + 90, 44 + 90, 42 + 90)
  101. self.line_midi_jack_glow = QColor(200, 100, 100)
  102. self.line_midi_alsa = QColor(93, 141, 46)
  103. self.line_midi_alsa_sel = QColor(93 + 90, 141 + 90, 46 + 90)
  104. self.line_midi_alsa_glow = QColor(100, 200, 100)
  105. self.line_parameter = QColor(137, 76, 43)
  106. self.line_parameter_sel = QColor(137 + 90, 76 + 90, 43 + 90)
  107. self.line_parameter_glow = QColor(166, 133, 133)
  108. self.rubberband_pen = QPen(QColor(206, 207, 208), 1, Qt.SolidLine)
  109. self.rubberband_brush = QColor(76, 77, 78, 100)
  110. elif idx == self.THEME_MODERN_DARK_TINY:
  111. # Canvas
  112. self.canvas_bg = QColor(0, 0, 0)
  113. # Boxes
  114. self.box_pen = QPen(QColor(76, 77, 78), 1, Qt.SolidLine)
  115. self.box_pen_sel = QPen(QColor(206, 207, 208), 1, Qt.DashLine)
  116. self.box_bg_1 = QColor(32, 34, 35)
  117. self.box_bg_2 = QColor(43, 47, 48)
  118. self.box_shadow = QColor(89, 89, 89, 180)
  119. self.box_header_pixmap = None
  120. self.box_header_height = 14
  121. self.box_header_spacing = 0
  122. self.box_text = QPen(QColor(240, 240, 240), 0)
  123. self.box_text_sel = self.box_text
  124. self.box_text_ypos = 10
  125. self.box_font_name = "Deja Vu Sans"
  126. self.box_font_size = 10
  127. self.box_font_state = QFont.Bold
  128. self.box_bg_type = self.THEME_BG_GRADIENT
  129. self.box_use_icon = False
  130. # Ports
  131. self.port_text = QPen(QColor(250, 250, 250), 0)
  132. self.port_text_ypos = 9
  133. self.port_bg_pixmap = None
  134. self.port_font_name = "Deja Vu Sans"
  135. self.port_font_size = 9
  136. self.port_font_state = QFont.Normal
  137. self.port_mode = self.THEME_PORT_POLYGON
  138. self.port_audio_jack_pen = QPen(QColor(63, 90, 126), 1)
  139. self.port_audio_jack_pen_sel = QPen(QColor(63 + 30, 90 + 30, 126 + 30), 1)
  140. self.port_midi_jack_pen = QPen(QColor(159, 44, 42), 1)
  141. self.port_midi_jack_pen_sel = QPen(QColor(159 + 30, 44 + 30, 42 + 30), 1)
  142. self.port_midi_alsa_pen = QPen(QColor(93, 141, 46), 1)
  143. self.port_midi_alsa_pen_sel = QPen(QColor(93 + 30, 141 + 30, 46 + 30), 1)
  144. self.port_parameter_pen = QPen(QColor(137, 76, 43), 1)
  145. self.port_parameter_pen_sel = QPen(QColor(137 + 30, 76 + 30, 43 + 30), 1)
  146. self.port_audio_jack_bg = QColor(35, 61, 99)
  147. self.port_audio_jack_bg_sel = QColor(35 + 50, 61 + 50, 99 + 50)
  148. self.port_midi_jack_bg = QColor(120, 15, 16)
  149. self.port_midi_jack_bg_sel = QColor(120 + 50, 15 + 50, 16 + 50)
  150. self.port_midi_alsa_bg = QColor(64, 112, 18)
  151. self.port_midi_alsa_bg_sel = QColor(64 + 50, 112 + 50, 18 + 50)
  152. self.port_parameter_bg = QColor(101, 47, 16)
  153. self.port_parameter_bg_sel = QColor(101 + 50, 47 + 50, 16 + 50)
  154. self.port_audio_jack_text = self.port_text
  155. self.port_audio_jack_text_sel = self.port_text
  156. self.port_midi_jack_text = self.port_text
  157. self.port_midi_jack_text_sel = self.port_text
  158. self.port_midi_alsa_text = self.port_text
  159. self.port_midi_alsa_text_sel = self.port_text
  160. self.port_parameter_text = self.port_text
  161. self.port_parameter_text_sel = self.port_text
  162. self.port_height = 12
  163. self.port_offset = 0
  164. self.port_spacing = 1
  165. self.port_spacingT = 1
  166. # Lines
  167. self.line_audio_jack = QColor(63, 90, 126)
  168. self.line_audio_jack_sel = QColor(63 + 90, 90 + 90, 126 + 90)
  169. self.line_audio_jack_glow = QColor(100, 100, 200)
  170. self.line_midi_jack = QColor(159, 44, 42)
  171. self.line_midi_jack_sel = QColor(159 + 90, 44 + 90, 42 + 90)
  172. self.line_midi_jack_glow = QColor(200, 100, 100)
  173. self.line_midi_alsa = QColor(93, 141, 46)
  174. self.line_midi_alsa_sel = QColor(93 + 90, 141 + 90, 46 + 90)
  175. self.line_midi_alsa_glow = QColor(100, 200, 100)
  176. self.line_parameter = QColor(137, 76, 43)
  177. self.line_parameter_sel = QColor(137 + 90, 76 + 90, 43 + 90)
  178. self.line_parameter_glow = QColor(166, 133, 133)
  179. self.rubberband_pen = QPen(QColor(206, 207, 208), 1, Qt.SolidLine)
  180. self.rubberband_brush = QColor(76, 77, 78, 100)
  181. elif idx == self.THEME_MODERN_LIGHT:
  182. # Canvas
  183. self.canvas_bg = QColor(248, 249, 250)
  184. # Boxes
  185. self.box_pen = QPen(QColor(176, 177, 178), 1, Qt.SolidLine)
  186. self.box_pen_sel = QPen(QColor(1, 2, 3), 2, Qt.DashLine)
  187. self.box_bg_1 = QColor(250, 250, 250)
  188. self.box_bg_2 = QColor(200, 200, 200)
  189. self.box_shadow = QColor(1, 1, 1, 100)
  190. self.box_header_pixmap = None
  191. self.box_header_height = 24
  192. self.box_header_spacing = 0
  193. self.box_text = QPen(QColor(1, 1, 1), 0)
  194. self.box_text_sel = self.box_text
  195. self.box_text_ypos = 16
  196. self.box_font_name = "Ubuntu"
  197. self.box_font_size = 11
  198. self.box_font_state = QFont.Bold
  199. self.box_bg_type = self.THEME_BG_GRADIENT
  200. self.box_use_icon = True
  201. # Ports
  202. self.port_text = QPen(QColor(255, 255, 255), 1)
  203. self.port_text_ypos = 12
  204. self.port_bg_pixmap = None
  205. self.port_font_name = "Ubuntu"
  206. self.port_font_size = 11
  207. self.port_font_state = QFont.Bold
  208. self.port_mode = self.THEME_PORT_POLYGON
  209. self.port_audio_jack_pen = QPen(QColor(103, 130, 166), 2)
  210. self.port_audio_jack_pen_sel = QPen(QColor(103 + 136, 190 + 130, 226 + 130), 1)
  211. self.port_midi_jack_pen = QPen(QColor(159, 44, 42), 1)
  212. self.port_midi_jack_pen_sel = QPen(QColor(90 + 30, 44 + 30, 42 + 30), 1)
  213. self.port_midi_alsa_pen = QPen(QColor(93, 141, 46), 1)
  214. self.port_midi_alsa_pen_sel = QPen(QColor(93 + 30, 141 + 30, 46 + 30), 1)
  215. self.port_parameter_pen = QPen(QColor(137, 76, 43), 1)
  216. self.port_parameter_pen_sel = QPen(QColor(137 + 30, 76 + 30, 43 + 30), 1)
  217. self.port_audio_jack_bg = QColor(0, 0, 180)
  218. self.port_audio_jack_bg_sel = QColor(135 + 150, 161 + 150, 199 + 150)
  219. self.port_midi_jack_bg = QColor(130, 15, 16)
  220. self.port_midi_jack_bg_sel = QColor(90 + 30, 15 + 50, 16 + 50)
  221. self.port_midi_alsa_bg = QColor(64, 112, 18)
  222. self.port_midi_alsa_bg_sel = QColor(64 + 50, 112 + 50, 18 + 50)
  223. self.port_parameter_bg = QColor(101, 47, 16)
  224. self.port_parameter_bg_sel = QColor(101 + 50, 47 + 50, 16 + 50)
  225. self.port_audio_jack_text = self.port_text
  226. self.port_audio_jack_text_sel = self.port_text
  227. self.port_midi_jack_text = self.port_text
  228. self.port_midi_jack_text_sel = self.port_text
  229. self.port_midi_alsa_text = self.port_text
  230. self.port_midi_alsa_text_sel = self.port_text
  231. self.port_parameter_text = self.port_text
  232. self.port_parameter_text_sel = self.port_text
  233. self.port_height = 16
  234. self.port_offset = 0
  235. self.port_spacing = 2
  236. self.port_spacingT = 2
  237. # Lines
  238. self.line_audio_jack = QColor(63, 90, 126)
  239. self.line_audio_jack_sel = QColor(63 + 63, 90 + 90, 126 + 90)
  240. self.line_audio_jack_glow = QColor(100, 100, 200)
  241. self.line_midi_jack = QColor(159, 44, 42)
  242. self.line_midi_jack_sel = QColor(159 + 44, 44 + 90, 42 + 90)
  243. self.line_midi_jack_glow = QColor(200, 100, 100)
  244. self.line_midi_alsa = QColor(93, 141, 46)
  245. self.line_midi_alsa_sel = QColor(93 + 90, 141 + 90, 46 + 90)
  246. self.line_midi_alsa_glow = QColor(100, 200, 100)
  247. self.line_parameter = QColor(137, 43, 43)
  248. self.line_parameter_sel = QColor(137 + 90, 76 + 90, 43 + 90)
  249. self.line_parameter_glow = QColor(166, 133, 133)
  250. self.rubberband_pen = QPen(QColor(206, 207, 208), 1, Qt.SolidLine)
  251. self.rubberband_brush = QColor(76, 77, 78, 100)
  252. elif idx == self.THEME_CLASSIC_DARK:
  253. # Canvas
  254. self.canvas_bg = QColor(0, 0, 0)
  255. # Boxes
  256. self.box_pen = QPen(QColor(147 - 70, 151 - 70, 143 - 70), 2, Qt.SolidLine)
  257. self.box_pen_sel = QPen(QColor(147, 151, 143), 2, Qt.DashLine)
  258. self.box_bg_1 = QColor(30, 34, 36)
  259. self.box_bg_2 = QColor(30, 34, 36)
  260. self.box_shadow = QColor(89, 89, 89, 180)
  261. self.box_header_pixmap = None
  262. self.box_header_height = 19
  263. self.box_header_spacing = 0
  264. self.box_text = QPen(QColor(255, 255, 255), 0)
  265. self.box_text_sel = self.box_text
  266. self.box_text_ypos = 12
  267. self.box_font_name = "Sans"
  268. self.box_font_size = 12
  269. self.box_font_state = QFont.Normal
  270. self.box_bg_type = self.THEME_BG_GRADIENT
  271. self.box_use_icon = False
  272. # Ports
  273. self.port_text = QPen(QColor(250, 250, 250), 0)
  274. self.port_text_ypos = 11
  275. self.port_bg_pixmap = None
  276. self.port_font_name = "Sans"
  277. self.port_font_size = 11
  278. self.port_font_state = QFont.Normal
  279. self.port_mode = self.THEME_PORT_SQUARE
  280. self.port_audio_jack_pen = QPen(QColor(35, 61, 99), Qt.NoPen, 0)
  281. self.port_audio_jack_pen_sel = QPen(QColor(255, 0, 0), Qt.NoPen, 0)
  282. self.port_midi_jack_pen = QPen(QColor(120, 15, 16), Qt.NoPen, 0)
  283. self.port_midi_jack_pen_sel = QPen(QColor(255, 0, 0), Qt.NoPen, 0)
  284. self.port_midi_alsa_pen = QPen(QColor(63, 112, 19), Qt.NoPen, 0)
  285. self.port_midi_alsa_pen_sel = QPen(QColor(255, 0, 0), Qt.NoPen, 0)
  286. self.port_parameter_pen = QPen(QColor(101, 47, 17), Qt.NoPen, 0)
  287. self.port_parameter_pen_sel = QPen(QColor(255, 0, 0), Qt.NoPen, 0)
  288. self.port_audio_jack_bg = QColor(35, 61, 99)
  289. self.port_audio_jack_bg_sel = QColor(255, 0, 0)
  290. self.port_midi_jack_bg = QColor(120, 15, 16)
  291. self.port_midi_jack_bg_sel = QColor(255, 0, 0)
  292. self.port_midi_alsa_bg = QColor(63, 112, 19)
  293. self.port_midi_alsa_bg_sel = QColor(255, 0, 0)
  294. self.port_parameter_bg = QColor(101, 47, 17)
  295. self.port_parameter_bg_sel = QColor(255, 0, 0)
  296. self.port_audio_jack_text = self.port_text
  297. self.port_audio_jack_text_sel = self.port_text
  298. self.port_midi_jack_text = self.port_text
  299. self.port_midi_jack_text_sel = self.port_text
  300. self.port_midi_alsa_text = self.port_text
  301. self.port_midi_alsa_text_sel = self.port_text
  302. self.port_parameter_text = self.port_text
  303. self.port_parameter_text_sel = self.port_text
  304. self.port_height = 14
  305. self.port_offset = 0
  306. self.port_spacing = 1
  307. self.port_spacingT = 0
  308. # Lines
  309. self.line_audio_jack = QColor(53, 78, 116)
  310. self.line_audio_jack_sel = QColor(255, 0, 0)
  311. self.line_audio_jack_glow = QColor(255, 0, 0)
  312. self.line_midi_jack = QColor(139, 32, 32)
  313. self.line_midi_jack_sel = QColor(255, 0, 0)
  314. self.line_midi_jack_glow = QColor(255, 0, 0)
  315. self.line_midi_alsa = QColor(81, 130, 36)
  316. self.line_midi_alsa_sel = QColor(255, 0, 0)
  317. self.line_midi_alsa_glow = QColor(255, 0, 0)
  318. self.line_parameter = QColor(120, 65, 33)
  319. self.line_parameter_sel = QColor(255, 0, 0)
  320. self.line_parameter_glow = QColor(255, 0, 0)
  321. self.rubberband_pen = QPen(QColor(147, 151, 143), 2, Qt.SolidLine)
  322. self.rubberband_brush = QColor(35, 61, 99, 100)
  323. elif idx == self.THEME_OOSTUDIO:
  324. # Canvas
  325. self.canvas_bg = QColor(11, 11, 11)
  326. # Boxes
  327. self.box_pen = QPen(QColor(76, 77, 78), 1, Qt.SolidLine)
  328. self.box_pen_sel = QPen(QColor(189, 122, 214), 1, Qt.DashLine)
  329. self.box_bg_1 = QColor(46, 46, 46)
  330. self.box_bg_2 = QColor(23, 23, 23)
  331. self.box_shadow = QColor(89, 89, 89, 180)
  332. self.box_header_pixmap = QPixmap(":/bitmaps/canvas/frame_node_header.png")
  333. self.box_header_height = 22
  334. self.box_header_spacing = 6
  335. self.box_text = QPen(QColor(144, 144, 144), 0)
  336. self.box_text_sel = QPen(QColor(189, 122, 214), 0)
  337. self.box_text_ypos = 16
  338. self.box_font_name = "Deja Vu Sans"
  339. self.box_font_size = 11
  340. self.box_font_state = QFont.Bold
  341. self.box_bg_type = self.THEME_BG_SOLID
  342. self.box_use_icon = False
  343. # Ports
  344. normalPortBG = QColor(46, 46, 46)
  345. selPortBG = QColor(23, 23, 23)
  346. self.port_text = QPen(QColor(155, 155, 155), 0)
  347. self.port_text_ypos = 14
  348. self.port_bg_pixmap = QPixmap(":/bitmaps/canvas/frame_port_bg.png")
  349. self.port_font_name = "Deja Vu Sans"
  350. self.port_font_size = 11
  351. self.port_font_state = QFont.Normal
  352. self.port_mode = self.THEME_PORT_SQUARE
  353. self.port_audio_jack_pen = QPen(selPortBG, 2)
  354. self.port_audio_jack_pen_sel = QPen(QColor(1, 230, 238), 1)
  355. self.port_midi_jack_pen = QPen(selPortBG, 2)
  356. self.port_midi_jack_pen_sel = QPen(QColor(252, 118, 118), 1)
  357. self.port_midi_alsa_pen = QPen(selPortBG, 2)
  358. self.port_midi_alsa_pen_sel = QPen(QColor(129, 244, 118), 0)
  359. self.port_parameter_pen = QPen(selPortBG, 2)
  360. self.port_parameter_pen_sel = QPen(QColor(137, 76, 43), 1)
  361. self.port_audio_jack_bg = normalPortBG
  362. self.port_audio_jack_bg_sel = selPortBG
  363. self.port_midi_jack_bg = normalPortBG
  364. self.port_midi_jack_bg_sel = selPortBG
  365. self.port_midi_alsa_bg = normalPortBG
  366. self.port_midi_alsa_bg_sel = selPortBG
  367. self.port_parameter_bg = normalPortBG
  368. self.port_parameter_bg_sel = selPortBG
  369. self.port_audio_jack_text = self.port_text
  370. self.port_audio_jack_text_sel = self.port_audio_jack_pen_sel
  371. self.port_midi_jack_text = self.port_text
  372. self.port_midi_jack_text_sel = self.port_midi_jack_pen_sel
  373. self.port_midi_alsa_text = self.port_text
  374. self.port_midi_alsa_text_sel = self.port_midi_alsa_pen_sel
  375. self.port_parameter_text = self.port_text
  376. self.port_parameter_text_sel = self.port_parameter_pen_sel
  377. # missing, ports 2
  378. self.port_height = 21
  379. self.port_offset = 1
  380. self.port_spacing = 3
  381. self.port_spacingT = 0
  382. # Lines
  383. self.line_audio_jack = QColor(64, 64, 64)
  384. self.line_audio_jack_sel = QColor(1, 230, 238)
  385. self.line_audio_jack_glow = QColor(100, 200, 100)
  386. self.line_midi_jack = QColor(64, 64, 64)
  387. self.line_midi_jack_sel = QColor(252, 118, 118)
  388. self.line_midi_jack_glow = QColor(200, 100, 100)
  389. self.line_midi_alsa = QColor(64, 64, 64)
  390. self.line_midi_alsa_sel = QColor(129, 244, 118)
  391. self.line_midi_alsa_glow = QColor(100, 200, 100)
  392. self.line_parameter = QColor(64, 64, 64)
  393. self.line_parameter_sel = QColor(137+90, 76+90, 43+90)
  394. self.line_parameter_glow = QColor(166, 133, 133)
  395. self.rubberband_pen = QPen(QColor(1, 230, 238), 2, Qt.SolidLine)
  396. self.rubberband_brush = QColor(90, 90, 90, 100)
  397. # ------------------------------------------------------------------------------------------------------------
  398. def getDefaultTheme():
  399. return Theme.THEME_MODERN_DARK
  400. def getThemeName(idx):
  401. if idx == Theme.THEME_MODERN_DARK:
  402. return "Modern Dark"
  403. if idx == Theme.THEME_MODERN_DARK_TINY:
  404. return "Modern Dark (Tiny)"
  405. if idx == Theme.THEME_MODERN_LIGHT:
  406. return "Modern Light"
  407. if idx == Theme.THEME_CLASSIC_DARK:
  408. return "Classic Dark"
  409. if idx == Theme.THEME_OOSTUDIO:
  410. return "OpenOctave Studio"
  411. return ""
  412. def getDefaultThemeName():
  413. return "Modern Dark"
  414. # ------------------------------------------------------------------------------------------------------------