Collection of tools useful for audio production
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.

179 lines
5.9KB

  1. /*
  2. * Patchbay Canvas engine using QGraphicsView/Scene
  3. * Copyright (C) 2010-2012 Filipe Coelho <falktx@falktx.com>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * 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 COPYING file
  16. */
  17. #include "patchcanvas-theme.h"
  18. START_NAMESPACE_PATCHCANVAS
  19. Theme::Theme(List id)
  20. {
  21. switch (id)
  22. {
  23. case THEME_MODERN_DARK:
  24. // Name this theme
  25. name = "Modern Dark";
  26. // Canvas
  27. canvas_bg = QColor(0, 0, 0);
  28. // Boxes
  29. box_pen = QPen(QColor(76,77,78), 1, Qt::SolidLine);
  30. box_pen_sel = QPen(QColor(206,207,208), 1, Qt::DashLine);
  31. box_bg_1 = QColor(32,34,35);
  32. box_bg_2 = QColor(43,47,48);
  33. box_shadow = QColor(89,89,89,180);
  34. box_text = QPen(QColor(240,240,240), 0);
  35. box_font_name = "Deja Vu Sans";
  36. box_font_size = 8;
  37. box_font_state = QFont::Bold;
  38. // Ports
  39. port_audio_jack_pen = QPen(QColor(63,90,126), 1);
  40. port_audio_jack_pen_sel = QPen(QColor(63+30,90+30,126+30), 1);
  41. port_midi_jack_pen = QPen(QColor(159,44,42), 1);
  42. port_midi_jack_pen_sel = QPen(QColor(159+30,44+30,42+30), 1);
  43. port_midi_a2j_pen = QPen(QColor(137,76,43), 1);
  44. port_midi_a2j_pen_sel = QPen(QColor(137+30,76+30,43+30), 1);
  45. port_midi_alsa_pen = QPen(QColor(93,141,46), 1);
  46. port_midi_alsa_pen_sel = QPen(QColor(93+30,141+30,46+30), 1);
  47. port_audio_jack_bg = QColor(35,61,99);
  48. port_audio_jack_bg_sel = QColor(35+50,61+50,99+50);
  49. port_midi_jack_bg = QColor(120,15,16);
  50. port_midi_jack_bg_sel = QColor(120+50,15+50,16+50);
  51. port_midi_a2j_bg = QColor(101,47,16);
  52. port_midi_a2j_bg_sel = QColor(101+50,47+50,16+50);
  53. port_midi_alsa_bg = QColor(64,112,18);
  54. port_midi_alsa_bg_sel = QColor(64+50,112+50,18+50);
  55. port_text = QPen(QColor(250,250,250), 0);
  56. port_font_name = "Deja Vu Sans";
  57. port_font_size = 8;
  58. port_font_state = QFont::Normal;
  59. port_mode = THEME_PORT_POLYGON;
  60. // Lines
  61. line_audio_jack = QColor(63,90,126);
  62. line_audio_jack_sel = QColor(63+90,90+90,126+90);
  63. line_audio_jack_glow = QColor(100,100,200);
  64. line_midi_jack = QColor(159,44,42);
  65. line_midi_jack_sel = QColor(159+90,44+90,42+90);
  66. line_midi_jack_glow = QColor(200,100,100);
  67. line_midi_a2j = QColor(137,76,43);
  68. line_midi_a2j_sel = QColor(137+90,76+90,43+90);
  69. line_midi_a2j_glow = QColor(166,133,133);
  70. line_midi_alsa = QColor(93,141,46);
  71. line_midi_alsa_sel = QColor(93+90,141+90,46+90);
  72. line_midi_alsa_glow = QColor(100,200,100);
  73. rubberband_pen = QPen(QColor(206,207,208), 1, Qt::SolidLine);
  74. rubberband_brush = QColor(76,77,78,100);
  75. break;
  76. case THEME_CLASSIC_DARK:
  77. // Name this theme
  78. name = "Classic Dark";
  79. // Canvas
  80. canvas_bg = QColor(0,0,0);
  81. // Boxes
  82. box_pen = QPen(QColor(147-70,151-70,143-70), 2, Qt::SolidLine);
  83. box_pen_sel = QPen(QColor(147,151,143), 2, Qt::DashLine);
  84. box_bg_1 = QColor(30,34,36);
  85. box_bg_2 = QColor(30,34,36);
  86. box_shadow = QColor(89,89,89,180);
  87. box_text = QPen(QColor(255,255,255), 0);
  88. box_font_name = "Sans";
  89. box_font_size = 9;
  90. box_font_state = QFont::Normal;
  91. // Ports
  92. port_audio_jack_pen = QPen(QColor(35,61,99), 0);
  93. port_audio_jack_pen_sel = QPen(QColor(255,0,0), 0);
  94. port_midi_jack_pen = QPen(QColor(120,15,16), 0);
  95. port_midi_jack_pen_sel = QPen(QColor(255,0,0), 0);
  96. port_midi_a2j_pen = QPen(QColor(101,47,17), 0);
  97. port_midi_a2j_pen_sel = QPen(QColor(255,0,0), 0);
  98. port_midi_alsa_pen = QPen(QColor(63,112,19), 0);
  99. port_midi_alsa_pen_sel = QPen(QColor(255,0,0), 0);
  100. port_audio_jack_bg = QColor(35,61,99);
  101. port_audio_jack_bg_sel = QColor(255,0,0);
  102. port_midi_jack_bg = QColor(120,15,16);
  103. port_midi_jack_bg_sel = QColor(255,0,0);
  104. port_midi_a2j_bg = QColor(101,47,17);
  105. port_midi_a2j_bg_sel = QColor(255,0,0);
  106. port_midi_alsa_bg = QColor(63,112,19);
  107. port_midi_alsa_bg_sel = QColor(255,0,0);
  108. port_text = QPen(QColor(250,250,250), 0);
  109. port_font_name = "Sans";
  110. port_font_size = 8;
  111. port_font_state = QFont::Normal;
  112. port_mode = THEME_PORT_SQUARE;
  113. // Lines
  114. line_audio_jack = QColor(53,78,116);
  115. line_audio_jack_sel = QColor(255,0,0);
  116. line_audio_jack_glow = QColor(255,0,0);
  117. line_midi_jack = QColor(139,32,32);
  118. line_midi_jack_sel = QColor(255,0,0);
  119. line_midi_jack_glow = QColor(255,0,0);
  120. line_midi_a2j = QColor(120,65,33);
  121. line_midi_a2j_sel = QColor(255,0,0);
  122. line_midi_a2j_glow = QColor(255,0,0);
  123. line_midi_alsa = QColor(81,130,36);
  124. line_midi_alsa_sel = QColor(255,0,0);
  125. line_midi_alsa_glow = QColor(255,0,0);
  126. rubberband_pen = QPen(QColor(147,151,143), 2, Qt::SolidLine);
  127. rubberband_brush = QColor(35,61,99,100);
  128. break;
  129. default:
  130. break;
  131. }
  132. }
  133. Theme::List getDefaultTheme()
  134. {
  135. return Theme::THEME_MODERN_DARK;
  136. }
  137. QString getThemeName(Theme::List id)
  138. {
  139. switch (id)
  140. {
  141. case Theme::THEME_MODERN_DARK:
  142. return "Modern Dark";
  143. case Theme::THEME_CLASSIC_DARK:
  144. return "Classic Dark";
  145. default:
  146. return "";
  147. }
  148. }
  149. QString getDefaultThemeName()
  150. {
  151. return "Modern Dark";
  152. }
  153. END_NAMESPACE_PATCHCANVAS