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.

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