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.

511 lines
24KB

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