The JUCE cross-platform C++ framework, with DISTRHO/KXStudio specific changes
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.

509 lines
24KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library.
  4. Copyright (c) 2015 - ROLI Ltd.
  5. Permission is granted to use this software under the terms of either:
  6. a) the GPL v2 (or any later version)
  7. b) the Affero GPL v3
  8. Details of these licenses can be found at: www.gnu.org/licenses
  9. JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
  10. WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  11. A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  12. ------------------------------------------------------------------------------
  13. To release a closed-source product which uses JUCE, commercial licenses are
  14. available: visit www.juce.com for more information.
  15. ==============================================================================
  16. */
  17. #include "../jucer_Headers.h"
  18. #include "jucer_ProjucerLookAndFeel.h"
  19. #include "../Application/jucer_Application.h"
  20. ProjucerLookAndFeel::ProjucerLookAndFeel()
  21. {
  22. setupColours();
  23. }
  24. void ProjucerLookAndFeel::drawTabButton (TabBarButton& button, Graphics& g, bool isMouseOver, bool isMouseDown)
  25. {
  26. const auto area = button.getActiveArea();
  27. auto backgroundColour = findColour (button.isFrontTab() ? secondaryBackgroundColourId
  28. : inactiveTabBackgroundColourId);
  29. auto iconColour = findColour (button.isFrontTab() ? activeTabIconColourId
  30. : inactiveTabIconColourId);
  31. g.setColour (backgroundColour);
  32. g.fillRect (area);
  33. const auto alpha = button.isEnabled() ? ((isMouseOver || isMouseDown) ? 1.0f : 0.8f) : 0.3f;
  34. #ifndef BUILDING_JUCE_COMPILEENGINE
  35. if (button.getName() == "Project")
  36. {
  37. auto icon = Icon (getIcons().closedFolder, iconColour.withMultipliedAlpha (alpha));
  38. icon.draw (g, button.getTextArea().reduced (8, 8).toFloat(), false);
  39. }
  40. else if (button.getName() == "Build")
  41. {
  42. auto icon = Icon (getIcons().buildTab, iconColour.withMultipliedAlpha (alpha));
  43. icon.draw (g, button.getTextArea().reduced (8, 8).toFloat(), false);
  44. }
  45. else
  46. #endif
  47. {
  48. auto textColour = findColour (defaultTextColourId).withMultipliedAlpha (alpha);
  49. TextLayout textLayout;
  50. LookAndFeel_V3::createTabTextLayout (button, (float) area.getWidth(), (float) area.getHeight(), textColour, textLayout);
  51. textLayout.draw (g, button.getTextArea().toFloat());
  52. }
  53. }
  54. int ProjucerLookAndFeel::getTabButtonBestWidth (TabBarButton& button, int)
  55. {
  56. if (TabbedButtonBar* bar = button.findParentComponentOfClass<TabbedButtonBar>())
  57. return bar->getWidth() / bar->getNumTabs();
  58. return 120;
  59. }
  60. void ProjucerLookAndFeel::drawPropertyComponentLabel (Graphics& g, int width, int height, PropertyComponent& component)
  61. {
  62. ignoreUnused (width);
  63. g.setColour (component.findColour (defaultTextColourId)
  64. .withMultipliedAlpha (component.isEnabled() ? 1.0f : 0.6f));
  65. auto textWidth = getTextWidthForPropertyComponent (&component);
  66. g.setFont (getPropertyComponentFont());
  67. g.drawFittedText (component.getName(), 0, 0, textWidth - 5, height, Justification::centredLeft, 5, 1.0f);
  68. }
  69. Rectangle<int> ProjucerLookAndFeel::getPropertyComponentContentPosition (PropertyComponent& component)
  70. {
  71. const auto textW = getTextWidthForPropertyComponent (&component);
  72. return { textW, 0, component.getWidth() - textW, component.getHeight() - 1 };
  73. }
  74. void ProjucerLookAndFeel::drawButtonBackground (Graphics& g,
  75. Button& button,
  76. const Colour& backgroundColour,
  77. bool isMouseOverButton,
  78. bool isButtonDown)
  79. {
  80. const auto cornerSize = button.findParentComponentOfClass<PropertyComponent>() != nullptr ? 0.0f : 3.0f;
  81. const auto bounds = button.getLocalBounds().toFloat();
  82. auto baseColour = backgroundColour.withMultipliedSaturation (button.hasKeyboardFocus (true) ? 1.3f : 0.9f)
  83. .withMultipliedAlpha (button.isEnabled() ? 1.0f : 0.5f);
  84. if (isButtonDown || isMouseOverButton)
  85. baseColour = baseColour.contrasting (isButtonDown ? 0.2f : 0.05f);
  86. g.setColour (baseColour);
  87. if (button.isConnectedOnLeft() || button.isConnectedOnRight())
  88. {
  89. Path path;
  90. path.addRoundedRectangle (bounds.getX(), bounds.getY(),
  91. bounds.getWidth(), bounds.getHeight(),
  92. cornerSize, cornerSize,
  93. ! button.isConnectedOnLeft(),
  94. ! button.isConnectedOnRight(),
  95. ! button.isConnectedOnLeft(),
  96. ! button.isConnectedOnRight());
  97. g.fillPath (path);
  98. }
  99. else
  100. {
  101. g.fillRoundedRectangle (bounds, cornerSize);
  102. }
  103. }
  104. void ProjucerLookAndFeel::drawButtonText (Graphics& g, TextButton& button, bool isMouseOverButton, bool isButtonDown)
  105. {
  106. ignoreUnused (isMouseOverButton, isButtonDown);
  107. g.setFont (getTextButtonFont (button, button.getHeight()));
  108. g.setColour (button.findColour (button.getToggleState() ? TextButton::textColourOnId
  109. : TextButton::textColourOffId)
  110. .withMultipliedAlpha (button.isEnabled() ? 1.0f
  111. : 0.5f));
  112. auto xIndent = jmin (12, button.getWidth() / 10);
  113. auto yIndent = jmin (3, button.getHeight() / 6);
  114. auto textBounds = button.getLocalBounds().reduced (xIndent, yIndent);
  115. g.drawFittedText (button.getButtonText(), textBounds, Justification::centred, 3, 1.0f);
  116. }
  117. void ProjucerLookAndFeel::drawToggleButton (Graphics& g, ToggleButton& button, bool isMouseOverButton, bool isButtonDown)
  118. {
  119. ignoreUnused (isMouseOverButton, isButtonDown);
  120. if (! button.isEnabled())
  121. g.setOpacity (0.5f);
  122. bool isTextEmpty = button.getButtonText().isEmpty();
  123. auto bounds = button.getLocalBounds();
  124. auto rectBounds = isTextEmpty ? bounds
  125. : bounds.removeFromLeft (jmin (bounds.getHeight(), bounds.getWidth() / 3));
  126. auto sideLength = jmin (rectBounds.getWidth(), rectBounds.getHeight());
  127. rectBounds = rectBounds.withSizeKeepingCentre (sideLength, sideLength).reduced (4);
  128. g.setColour (button.findColour (ToggleButton::tickDisabledColourId));
  129. g.drawRoundedRectangle (rectBounds.toFloat(), 2.0f, 1.0f);
  130. if (button.getToggleState())
  131. {
  132. g.setColour (button.findColour (ToggleButton::tickColourId));
  133. const auto tick = getTickShape (0.75f);
  134. g.fillPath (tick, tick.getTransformToScaleToFit (rectBounds.reduced (4, 5).toFloat(), false));
  135. }
  136. if (! isTextEmpty)
  137. {
  138. bounds.removeFromLeft (5);
  139. auto isPropertyComponentChild = (button.findParentComponentOfClass<BooleanPropertyComponent>() != nullptr);
  140. const auto fontSize = jmin (15.0f, button.getHeight() * 0.75f);
  141. g.setFont (fontSize);
  142. g.setColour (isPropertyComponentChild ? findColour (widgetTextColourId)
  143. : button.findColour (ToggleButton::textColourId));
  144. g.drawFittedText (button.getButtonText(), bounds, Justification::centredLeft, 2);
  145. }
  146. }
  147. Font ProjucerLookAndFeel::getTextButtonFont (TextButton&, int buttonHeight)
  148. {
  149. return Font (jmin (12.0f, buttonHeight * 0.6f));
  150. }
  151. void ProjucerLookAndFeel::fillTextEditorBackground (Graphics& g, int width, int height, TextEditor& textEditor)
  152. {
  153. g.setColour (textEditor.findColour (TextEditor::backgroundColourId));
  154. g.fillRect (0, 0, width, height);
  155. g.setColour (textEditor.findColour (TextEditor::outlineColourId));
  156. g.drawHorizontalLine (height - 1, 0.0f, static_cast<float> (width));
  157. }
  158. void ProjucerLookAndFeel::layoutFileBrowserComponent (FileBrowserComponent& browserComp,
  159. DirectoryContentsDisplayComponent* fileListComponent,
  160. FilePreviewComponent* previewComp,
  161. ComboBox* currentPathBox,
  162. TextEditor* filenameBox,
  163. Button* goUpButton)
  164. {
  165. const auto sectionHeight = 22;
  166. const auto buttonWidth = 50;
  167. auto b = browserComp.getLocalBounds().reduced (20, 5);
  168. auto topSlice = b.removeFromTop (sectionHeight);
  169. auto bottomSlice = b.removeFromBottom (sectionHeight);
  170. currentPathBox->setBounds (topSlice.removeFromLeft (topSlice.getWidth() - buttonWidth));
  171. currentPathBox->setColour (ComboBox::backgroundColourId, findColour (backgroundColourId));
  172. currentPathBox->setColour (ComboBox::textColourId, findColour (defaultTextColourId));
  173. currentPathBox->setColour (ComboBox::arrowColourId, findColour (defaultTextColourId));
  174. topSlice.removeFromLeft (6);
  175. goUpButton->setBounds (topSlice);
  176. bottomSlice.removeFromLeft (20);
  177. filenameBox->setBounds (bottomSlice);
  178. filenameBox->setColour (TextEditor::backgroundColourId, findColour (backgroundColourId));
  179. filenameBox->setColour (TextEditor::textColourId, findColour (defaultTextColourId));
  180. filenameBox->setColour (TextEditor::outlineColourId, findColour (defaultTextColourId));
  181. filenameBox->applyFontToAllText (filenameBox->getFont());
  182. if (previewComp != nullptr)
  183. previewComp->setBounds (b.removeFromRight (b.getWidth() / 3));
  184. if (auto listAsComp = dynamic_cast<Component*> (fileListComponent))
  185. listAsComp->setBounds (b.reduced (0, 10));
  186. }
  187. void ProjucerLookAndFeel::drawFileBrowserRow (Graphics& g, int width, int height,
  188. const String& filename, Image* icon,
  189. const String& fileSizeDescription,
  190. const String& fileTimeDescription,
  191. const bool isDirectory, const bool isItemSelected,
  192. const int itemIndex, DirectoryContentsDisplayComponent& dcc)
  193. {
  194. if (auto fileListComp = dynamic_cast<Component*> (&dcc))
  195. {
  196. fileListComp->setColour (DirectoryContentsDisplayComponent::textColourId,
  197. findColour (isItemSelected ? defaultHighlightedTextColourId : defaultTextColourId));
  198. fileListComp->setColour (DirectoryContentsDisplayComponent::highlightColourId,
  199. findColour (defaultHighlightColourId));
  200. }
  201. LookAndFeel_V2::drawFileBrowserRow (g, width, height, filename, icon,
  202. fileSizeDescription, fileTimeDescription,
  203. isDirectory, isItemSelected, itemIndex, dcc);
  204. }
  205. void ProjucerLookAndFeel::drawCallOutBoxBackground (CallOutBox&, Graphics& g, const Path& path, Image&)
  206. {
  207. g.setColour (findColour (secondaryBackgroundColourId));
  208. g.fillPath (path);
  209. g.setColour (findColour (userButtonBackgroundColourId));
  210. g.strokePath (path, PathStrokeType (2.0f));
  211. }
  212. void ProjucerLookAndFeel::drawMenuBarBackground (Graphics& g, int width, int height,
  213. bool, MenuBarComponent& menuBar)
  214. {
  215. const auto colour = menuBar.findColour (backgroundColourId).withAlpha (0.75f);
  216. Rectangle<int> r (width, height);
  217. g.setColour (colour.contrasting (0.15f));
  218. g.fillRect (r.removeFromTop (1));
  219. g.fillRect (r.removeFromBottom (1));
  220. g.setGradientFill (ColourGradient (colour, 0, 0, colour.darker (0.2f), 0, (float)height, false));
  221. g.fillRect (r);
  222. }
  223. void ProjucerLookAndFeel::drawMenuBarItem (Graphics& g, int width, int height,
  224. int itemIndex, const String& itemText,
  225. bool isMouseOverItem, bool isMenuOpen,
  226. bool /*isMouseOverBar*/, MenuBarComponent& menuBar)
  227. {
  228. if (! menuBar.isEnabled())
  229. {
  230. g.setColour (menuBar.findColour (defaultTextColourId)
  231. .withMultipliedAlpha (0.5f));
  232. }
  233. else if (isMenuOpen || isMouseOverItem)
  234. {
  235. g.fillAll (menuBar.findColour (defaultHighlightColourId));
  236. g.setColour (menuBar.findColour (defaultHighlightedTextColourId));
  237. }
  238. else
  239. {
  240. g.setColour (menuBar.findColour (defaultTextColourId));
  241. }
  242. g.setFont (getMenuBarFont (menuBar, itemIndex, itemText));
  243. g.drawFittedText (itemText, 0, 0, width, height, Justification::centred, 1);
  244. }
  245. void ProjucerLookAndFeel::drawResizableFrame (Graphics& g, int w, int h, const BorderSize<int>& border)
  246. {
  247. if (! border.isEmpty())
  248. {
  249. const Rectangle<int> fullSize (0, 0, w, h);
  250. const Rectangle<int> centreArea (border.subtractedFrom (fullSize));
  251. g.excludeClipRegion (centreArea);
  252. g.fillAll (getCurrentColourScheme().getUIColour (LookAndFeel_V4::ColourScheme::UIColour::windowBackground));
  253. }
  254. }
  255. void ProjucerLookAndFeel::drawComboBox (Graphics& g, int width, int height, bool,
  256. int, int, int, int, ComboBox& box)
  257. {
  258. const auto cornerSize = box.findParentComponentOfClass<ChoicePropertyComponent>() != nullptr ? 0.0f : 1.5f;
  259. Rectangle<int> boxBounds (0, 0, width, height);
  260. auto isChoiceCompChild = (box.findParentComponentOfClass<ChoicePropertyComponent>() != nullptr);
  261. if (isChoiceCompChild)
  262. {
  263. box.setColour (ComboBox::textColourId, findColour (widgetTextColourId));
  264. g.setColour (findColour (widgetBackgroundColourId));
  265. g.fillRect (boxBounds);
  266. auto arrowZone = boxBounds.removeFromRight (boxBounds.getHeight()).reduced (0, 2).toFloat();
  267. g.setColour (Colours::black);
  268. g.fillPath (getChoiceComponentArrowPath (arrowZone));
  269. }
  270. else
  271. {
  272. g.setColour (box.findColour (ComboBox::outlineColourId));
  273. g.drawRoundedRectangle (boxBounds.toFloat().reduced (0.5f, 0.5f), cornerSize, 1.0f);
  274. auto arrowZone = boxBounds.removeFromRight (boxBounds.getHeight()).toFloat();
  275. g.setColour (box.findColour (ComboBox::arrowColourId).withAlpha ((box.isEnabled() ? 0.9f : 0.2f)));
  276. g.fillPath (getArrowPath (arrowZone, 2, true, Justification::centred));
  277. }
  278. }
  279. void ProjucerLookAndFeel::drawTreeviewPlusMinusBox (Graphics& g, const Rectangle<float>& area,
  280. Colour, bool isOpen, bool /**isMouseOver*/)
  281. {
  282. g.strokePath (getArrowPath (area, isOpen ? 2 : 1, false, Justification::centredRight), PathStrokeType (2.0f));
  283. }
  284. //==============================================================================
  285. Path ProjucerLookAndFeel::getArrowPath (Rectangle<float> arrowZone, const int direction,
  286. bool filled, const Justification justification)
  287. {
  288. auto w = jmin (arrowZone.getWidth(), (direction == 0 || direction == 2) ? 8.0f : filled ? 5.0f : 8.0f);
  289. auto h = jmin (arrowZone.getHeight(), (direction == 0 || direction == 2) ? 5.0f : filled ? 8.0f : 5.0f);
  290. if (justification == Justification::centred)
  291. {
  292. arrowZone.reduce ((arrowZone.getWidth() - w) / 2, (arrowZone.getHeight() - h) / 2);
  293. }
  294. else if (justification == Justification::centredRight)
  295. {
  296. arrowZone.removeFromLeft (arrowZone.getWidth() - w);
  297. arrowZone.reduce (0, (arrowZone.getHeight() - h) / 2);
  298. }
  299. else if (justification == Justification::centredLeft)
  300. {
  301. arrowZone.removeFromRight (arrowZone.getWidth() - w);
  302. arrowZone.reduce (0, (arrowZone.getHeight() - h) / 2);
  303. }
  304. else
  305. {
  306. jassertfalse; // currently only supports centred justifications
  307. }
  308. Path path;
  309. path.startNewSubPath (arrowZone.getX(), arrowZone.getBottom());
  310. path.lineTo (arrowZone.getCentreX(), arrowZone.getY());
  311. path.lineTo (arrowZone.getRight(), arrowZone.getBottom());
  312. if (filled)
  313. path.closeSubPath();
  314. path.applyTransform (AffineTransform::rotation (direction * (float_Pi / 2.0f), arrowZone.getCentreX(), arrowZone.getCentreY()));
  315. return path;
  316. }
  317. Path ProjucerLookAndFeel::getChoiceComponentArrowPath (Rectangle<float> arrowZone)
  318. {
  319. auto topBounds = arrowZone.removeFromTop (arrowZone.getHeight() * 0.5f);
  320. auto bottomBounds = arrowZone;
  321. auto topArrow = getArrowPath (topBounds, 0, true, Justification::centred);
  322. auto bottomArrow = getArrowPath (bottomBounds, 2, true, Justification::centred);
  323. topArrow.addPath (bottomArrow);
  324. return topArrow;
  325. }
  326. //==============================================================================
  327. void ProjucerLookAndFeel::setupColours()
  328. {
  329. auto& colourScheme = getCurrentColourScheme();
  330. if (colourScheme == getDarkColourScheme())
  331. {
  332. setColour (backgroundColourId, Colour (0xff323e44));
  333. setColour (secondaryBackgroundColourId, Colour (0xff263238));
  334. setColour (defaultTextColourId, Colours::white);
  335. setColour (widgetTextColourId, Colours::white);
  336. setColour (defaultButtonBackgroundColourId, Colour (0xffa45c94));
  337. setColour (secondaryButtonBackgroundColourId, Colours::black);
  338. setColour (userButtonBackgroundColourId, Colour (0xffa45c94));
  339. setColour (defaultIconColourId, Colours::white);
  340. setColour (treeIconColourId, Colour (0xffa9a9a9));
  341. setColour (defaultHighlightColourId, Colour (0xffe0ec65));
  342. setColour (defaultHighlightedTextColourId, Colours::black);
  343. setColour (codeEditorLineNumberColourId, Colour (0xffaaaaaa));
  344. setColour (activeTabIconColourId, Colours::white);
  345. setColour (inactiveTabBackgroundColourId, Colour (0xff181f22));
  346. setColour (inactiveTabIconColourId, Colour (0xffa9a9a9));
  347. setColour (contentHeaderBackgroundColourId, Colours::black);
  348. setColour (widgetBackgroundColourId, Colour (0xff495358));
  349. setColour (secondaryWidgetBackgroundColourId, Colour (0xff303b41));
  350. colourScheme.setUIColour (LookAndFeel_V4::ColourScheme::UIColour::defaultFill, Colour (0xffa45c94));
  351. }
  352. else if (colourScheme == getGreyColourScheme())
  353. {
  354. setColour (backgroundColourId, Colour (0xff505050));
  355. setColour (secondaryBackgroundColourId, Colour (0xff424241));
  356. setColour (defaultTextColourId, Colours::white);
  357. setColour (widgetTextColourId, Colours::black);
  358. setColour (defaultButtonBackgroundColourId, Colour (0xff26ba90));
  359. setColour (secondaryButtonBackgroundColourId, Colours::black);
  360. setColour (userButtonBackgroundColourId, Colour (0xff26ba90));
  361. setColour (defaultIconColourId, Colours::white);
  362. setColour (treeIconColourId, Colour (0xffa9a9a9));
  363. setColour (defaultHighlightColourId, Colour (0xffe0ec65));
  364. setColour (defaultHighlightedTextColourId, Colours::black);
  365. setColour (codeEditorLineNumberColourId, Colour (0xffaaaaaa));
  366. setColour (activeTabIconColourId, Colours::white);
  367. setColour (inactiveTabBackgroundColourId, Colour (0xff373737));
  368. setColour (inactiveTabIconColourId, Colour (0xffa9a9a9));
  369. setColour (contentHeaderBackgroundColourId, Colours::black);
  370. setColour (widgetBackgroundColourId, Colours::white);
  371. setColour (secondaryWidgetBackgroundColourId, Colour (0xffdddddd));
  372. }
  373. else if (colourScheme == getLightColourScheme())
  374. {
  375. setColour (backgroundColourId, Colour (0xffefefef));
  376. setColour (secondaryBackgroundColourId, Colour (0xfff9f9f9));
  377. setColour (defaultTextColourId, Colours::black);
  378. setColour (widgetTextColourId, Colours::black);
  379. setColour (defaultButtonBackgroundColourId, Colour (0xff42a2c8));
  380. setColour (secondaryButtonBackgroundColourId, Colour (0xffa1c677));
  381. setColour (userButtonBackgroundColourId, Colour (0xffff5b5b));
  382. setColour (defaultIconColourId, Colours::white);
  383. setColour (treeIconColourId, Colour (0xffa9a9a9));
  384. setColour (defaultHighlightColourId, Colour (0xffffd05b));
  385. setColour (defaultHighlightedTextColourId, Colour (0xff585656));
  386. setColour (codeEditorLineNumberColourId, Colour (0xff888888));
  387. setColour (activeTabIconColourId, Colour (0xff42a2c8));
  388. setColour (inactiveTabBackgroundColourId, Colour (0xffd5d5d5));
  389. setColour (inactiveTabIconColourId, Colour (0xffa9a9a9));
  390. setColour (contentHeaderBackgroundColourId, Colour (0xff42a2c8));
  391. setColour (widgetBackgroundColourId, Colours::white);
  392. setColour (secondaryWidgetBackgroundColourId, Colour (0xfff4f4f4));
  393. }
  394. setColour (Label::textColourId, findColour (defaultTextColourId));
  395. setColour (Label::textColourId, findColour (defaultTextColourId));
  396. setColour (TextEditor::highlightColourId, findColour (defaultHighlightColourId));
  397. setColour (TextEditor::highlightedTextColourId, findColour (defaultHighlightedTextColourId));
  398. setColour (TextEditor::outlineColourId, Colours::transparentBlack);
  399. setColour (TextEditor::focusedOutlineColourId, Colours::transparentBlack);
  400. setColour (TextEditor::backgroundColourId, findColour (widgetBackgroundColourId));
  401. setColour (TextEditor::textColourId, findColour (widgetTextColourId));
  402. setColour (TextButton::buttonColourId, findColour (defaultButtonBackgroundColourId));
  403. setColour (ScrollBar::ColourIds::thumbColourId, Colour (0xffd0d8e0));
  404. setColour (TextPropertyComponent::outlineColourId, Colours::transparentBlack);
  405. setColour (TextPropertyComponent::backgroundColourId, findColour (widgetBackgroundColourId));
  406. setColour (TextPropertyComponent::textColourId, findColour (widgetTextColourId));
  407. setColour (BooleanPropertyComponent::outlineColourId, Colours::transparentBlack);
  408. setColour (BooleanPropertyComponent::backgroundColourId, findColour (widgetBackgroundColourId));
  409. setColour (ToggleButton::tickDisabledColourId, Colour (0xffa9a9a9));
  410. setColour (ToggleButton::tickColourId, findColour (defaultButtonBackgroundColourId));
  411. setColour (CodeEditorComponent::backgroundColourId, findColour (secondaryBackgroundColourId));
  412. setColour (CodeEditorComponent::lineNumberTextId, findColour (codeEditorLineNumberColourId));
  413. setColour (CodeEditorComponent::lineNumberBackgroundId, findColour (backgroundColourId));
  414. setColour (CaretComponent::caretColourId, findColour (defaultButtonBackgroundColourId));
  415. setColour (TreeView::selectedItemBackgroundColourId, findColour (defaultHighlightColourId));
  416. }